- add: select character now actually sends the character data to the client

- add: character data response when a character is requested from the service
This commit is contained in:
2025-01-08 03:46:08 -05:00
parent 6d35d15ac3
commit 32fe2d65a7
6 changed files with 209 additions and 53 deletions

View File

@@ -8,7 +8,7 @@ service CharacterService {
rpc GetCharacterList(GetCharacterListRequest) returns (GetCharacterListResponse);
rpc CreateCharacter(CreateCharacterRequest) returns (CreateCharacterResponse);
rpc DeleteCharacter(DeleteCharacterRequest) returns (DeleteCharacterResponse);
rpc GetCharacter(GetCharacterRequest) returns (Empty);
rpc GetCharacter(GetCharacterRequest) returns (GetCharacterResponse);
}
message GetCharacterListRequest {
@@ -45,6 +45,11 @@ message DeleteCharacterResponse {
message GetCharacterRequest {
string user_id = 1;
string char_id = 2;
}
message GetCharacterResponse {
character_common.CharacterFull character = 1;
}
message Empty {}

View File

@@ -5,12 +5,32 @@ package character_common;
message Stats {
int32 level = 1;
int32 job = 2;
int32 str = 3;
int32 dex = 4;
int32 int = 5;
int32 con = 6;
int32 charm = 7;
int32 sense = 8;
int32 max_hp = 9;
int32 max_mp = 10;
int32 hp = 11;
int32 mp = 12;
int64 xp = 13;
int32 head_size = 14;
int32 body_size = 15;
int32 stat_points = 16;
int32 skill_points = 17;
int32 penalty_xp = 18;
int32 stamina = 19;
int32 pat_hp = 20;
int32 pat_cooldown_time = 21;
}
message Looks {
int32 race = 1;
int32 hair = 2;
int32 face = 3;
int32 stone = 4;
}
message EquippedItem {
@@ -21,6 +41,27 @@ message EquippedItem {
int32 slot = 5;
}
message Item {
int32 item_id = 1;
int32 item_type = 2;
int32 is_created = 3;
int32 gem_option = 4;
float durability = 5;
float life = 6;
int32 socket = 7;
int32 is_appraised = 8;
int32 grade = 9;
int32 count = 10;
int32 slot = 11;
}
message Location {
int32 map_id = 1;
float x = 2;
float y = 3;
int32 spawn_id = 4;
}
message Character {
string character_id = 1; // Unique ID for the character
string name = 2; // Name of the character
@@ -29,4 +70,13 @@ message Character {
Stats stats = 5; // Character's stats
Looks looks = 6; // Character's Looks
repeated EquippedItem items = 7;
}
message CharacterFull {
string character_id = 1; // Unique ID for the character
string name = 2; // Name of the character
Location position = 3; // Character's position
Looks looks = 4; // Character's Looks
Stats stats = 5; // Character's stats
repeated Item items = 6; // Character inventory
}