syntax = "proto3";

option csharp_namespace = "MariesWonderland.Proto.Weapon";

import "proto/data.proto";

package apb.api.weapon;

service WeaponService {
	rpc Sell (SellRequest) returns (SellResponse);
	rpc Protect (ProtectRequest) returns (ProtectResponse);
	rpc Unprotect (UnprotectRequest) returns (UnprotectResponse);
	rpc EnhanceByWeapon (EnhanceByWeaponRequest) returns (EnhanceByWeaponResponse);
	rpc EnhanceByMaterial (EnhanceByMaterialRequest) returns (EnhanceByMaterialResponse);
	rpc EnhanceSkill (EnhanceSkillRequest) returns (EnhanceSkillResponse);
	rpc EnhanceAbility (EnhanceAbilityRequest) returns (EnhanceAbilityResponse);
	rpc LimitBreakByWeapon (LimitBreakByWeaponRequest) returns (LimitBreakByWeaponResponse);
	rpc LimitBreakByMaterial (LimitBreakByMaterialRequest) returns (LimitBreakByMaterialResponse);
	rpc Evolve (EvolveRequest) returns (EvolveResponse);
	rpc Awaken (AwakenRequest) returns (AwakenResponse);
}

message SellRequest {
	repeated string userWeaponUuid = 1;
}

message SellResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message ProtectRequest {
	repeated string userWeaponUuid = 1;
}

message ProtectResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message UnprotectRequest {
	repeated string userWeaponUuid = 1;
}

message UnprotectResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message EnhanceByWeaponRequest {
	string userWeaponUuid = 1;
	repeated string materialUserWeaponUuids = 2;
}

message EnhanceByWeaponResponse {
	bool isGreatSuccess = 1;
	repeated string surplusEnhanceWeapon = 2;
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message EnhanceByMaterialRequest {
	string userWeaponUuid = 1;
	map<int32, int32> materials = 2;
}

message EnhanceByMaterialResponse {
	bool isGreatSuccess = 1;
	map<int32, int32> surplusEnhanceMaterial = 2;
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message EnhanceSkillRequest {
	string userWeaponUuid = 1;
	int32 skillId = 2;
	int32 addLevelCount = 3;
}

message EnhanceSkillResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message EnhanceAbilityRequest {
	string userWeaponUuid = 1;
	int32 abilityId = 2;
	int32 addLevelCount = 3;
}

message EnhanceAbilityResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message LimitBreakByWeaponRequest {
	string userWeaponUuid = 1;
	repeated string materialUserWeaponUuids = 2;
}

message LimitBreakByWeaponResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message LimitBreakByMaterialRequest {
	string userWeaponUuid = 1;
	map<int32, int32> materials = 2;
}

message LimitBreakByMaterialResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message EvolveRequest {
	string userWeaponUuid = 1;
}

message EvolveResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}

message AwakenRequest {
	string userWeaponUuid = 1;
}

message AwakenResponse {
	map<string, apb.api.data.DiffData> diffUserData = 99;
}