添加公会信息

This commit is contained in:
aozhiwei 2020-11-19 16:48:30 +08:00
parent ff0b198474
commit db16743f9a
4 changed files with 15 additions and 0 deletions

View File

@ -222,6 +222,9 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data
p->set_max_energy_shield(max_energy_shield); p->set_max_energy_shield(max_energy_shield);
} }
#endif #endif
if (guild_id != 0) {
p->set_guild_id(guild_id);
}
p->set_vip(vip); p->set_vip(vip);
p->set_sdmg(sdmg); p->set_sdmg(sdmg);
p->set_kill_count(stats.kills); p->set_kill_count(stats.kills);
@ -306,6 +309,9 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb)
} }
stats_pb->set_account_id(account_id); stats_pb->set_account_id(account_id);
if (guild_id != 0) {
stats_pb->set_guild_id(guild_id);
}
for (auto& pair : stats.items) { for (auto& pair : stats.items) {
auto p = stats_pb->add_items(); auto p = stats_pb->add_items();
@ -378,6 +384,9 @@ void Human::FillMFTeamData(cs::MFTeamData* team_data, bool is_game_over)
team_data->set_user_value1(user_value1); team_data->set_user_value1(user_value1);
team_data->set_user_value2(user_value2); team_data->set_user_value2(user_value2);
team_data->set_user_value3(user_value3); team_data->set_user_value3(user_value3);
if (guild_id != 0) {
team_data->set_guild_id(guild_id);
}
} }
} }
} }

View File

@ -62,6 +62,7 @@ class Human : public MoveableEntity
long long user_value1 = 0; long long user_value1 = 0;
long long user_value2 = 0; long long user_value2 = 0;
long long user_value3 = 0; long long user_value3 = 0;
long long guild_id = 0;
long long last_cmmove_frameno = 0; long long last_cmmove_frameno = 0;
bool downed = false; bool downed = false;
bool disconnected = false; bool disconnected = false;

View File

@ -72,6 +72,7 @@ Player* PlayerMgr::CreatePlayerByCMJoin(Player* hum,
hum->user_value1 = msg.user_value1(); hum->user_value1 = msg.user_value1();
hum->user_value2 = msg.user_value2(); hum->user_value2 = msg.user_value2();
hum->user_value3 = msg.user_value3(); hum->user_value3 = msg.user_value3();
hum->guild_id = msg.guild_id();
#if 0 #if 0
if (hum->atk_add > 0.9999f) { if (hum->atk_add > 0.9999f) {
hum->atk_add = hum->atk_add / 100.0f; hum->atk_add = hum->atk_add / 100.0f;

View File

@ -187,6 +187,7 @@ message MFPlayerFull
optional int32 obj_uniid = 1; //id optional int32 obj_uniid = 1; //id
optional MFVec2 pos = 2; // optional MFVec2 pos = 2; //
optional MFVec2 dir = 3; // optional MFVec2 dir = 3; //
optional int64 guild_id = 4; //id
optional float max_health = 5; // optional float max_health = 5; //
optional float health = 6; // optional float health = 6; //
@ -527,6 +528,7 @@ message MFTeamData
optional int64 user_value1 = 31; //user_value1 optional int64 user_value1 = 31; //user_value1
optional int64 user_value2 = 32; //user_value2 optional int64 user_value2 = 32; //user_value2
optional int64 user_value3 = 33; //user_value3 optional int64 user_value3 = 33; //user_value3
optional int64 guild_id = 34; //id
} }
// //
@ -612,6 +614,7 @@ message MFPlayerStats
optional string killer_account_id = 42; //accountid() optional string killer_account_id = 42; //accountid()
optional string account_id = 21; //id optional string account_id = 21; //id
optional int64 guild_id = 22; //id
} }
// //
@ -732,6 +735,7 @@ message CMJoin
optional int64 user_value1 = 31; //user_value1 optional int64 user_value1 = 31; //user_value1
optional int64 user_value2 = 32; //user_value2 optional int64 user_value2 = 32; //user_value2
optional int64 user_value3 = 33; //user_value3 optional int64 user_value3 = 33; //user_value3
optional int64 guild_id = 34; //id
optional bool force_entry_newbie_room = 50; // optional bool force_entry_newbie_room = 50; //
repeated MFTeamMember team_members = 51; // repeated MFTeamMember team_members = 51; //
optional int32 room_mode = 52; //0: 1: optional int32 room_mode = 52; //0: 1: