This commit is contained in:
aozhiwei 2019-07-02 09:39:23 +08:00
parent 3e86e734f5
commit 1d94e34ee7
3 changed files with 20 additions and 0 deletions

View File

@ -1983,6 +1983,22 @@ void Human::InternalSendGameOver()
hum->stats.history_kills = data.Get("kill_his"); hum->stats.history_kills = data.Get("kill_his");
hum->stats.history_damage_amount = data.Get("harm_his"); hum->stats.history_damage_amount = data.Get("harm_his");
hum->stats.history_heal_amount = data.Get("add_HP_his"); hum->stats.history_heal_amount = data.Get("add_HP_his");
{
std::string extra_drop = data.Get("extra_drop");
std::vector<std::string> strings1;
a8::Split(extra_drop, strings1, '|');
for (std::string& str1 : strings1) {
std::vector<std::string> strings2;
a8::Split(str1, strings2, ':');
if (strings2.size() == 2) {
hum->stats.extra_drop.push_back(std::make_pair(
a8::XValue(strings2[0]).GetInt(),
a8::XValue(strings2[1]).GetInt()
)
);
}
}
}
cs::SMGameOver msg; cs::SMGameOver msg;
hum->FillSMGameOver(msg); hum->FillSMGameOver(msg);
hum->SendNotifyMsg(msg); hum->SendNotifyMsg(msg);

View File

@ -83,6 +83,8 @@ struct PlayerStats
int gold = 0; int gold = 0;
int score = 0; int score = 0;
std::vector<std::pair<int, int>> extra_drop;
int killer_id = 0; int killer_id = 0;
std::string killer_name; std::string killer_name;
int weapon_id = 0; int weapon_id = 0;

View File

@ -532,6 +532,8 @@ message MFPlayerStats
optional int32 gold = 10; // optional int32 gold = 10; //
optional int32 score = 11; // optional int32 score = 11; //
repeated MFPair extra_drop = 12; //,key:item_id value:(广)
optional bool dead = 5; // optional bool dead = 5; //
optional int32 killer_id = 7; //id() id: -1: optional int32 killer_id = 7; //id() id: -1:
optional string killer_name = 40; // optional string killer_name = 40; //