1
This commit is contained in:
parent
3e86e734f5
commit
1d94e34ee7
@ -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);
|
||||||
|
@ -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;
|
||||||
|
@ -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; //杀手名称
|
||||||
|
Loading…
x
Reference in New Issue
Block a user