This commit is contained in:
aozhiwei 2021-06-04 19:07:30 +08:00
parent 21e9cf1b43
commit 744507e9b3

View File

@ -3827,16 +3827,18 @@ void Human::SendRollMsgEx(KillInfo& info,
[target, info, &msg] (Human* hum, a8::XParams& param) -> bool
{
for (int i = 0; i < msg->elements_size(); ++i) {
auto element = msg->elements(i);
if (element.element_type() == 1) {
auto element = msg->mutable_elements(i);
if (element->element_type() == 1) {
if (info->killer_id == hum->GetEntityUniId()){
element.mutable_union_obj_1()->set_color(MetaMgr::Instance()->self_kill_color);
element->mutable_union_obj_1()->set_color(MetaMgr::Instance()->self_kill_color);
} else if (info->killer_team_id == hum->team_id) {
element.mutable_union_obj_1()->set_color(MetaMgr::Instance()->teammate_kill_color);
element->mutable_union_obj_1()->set_color(MetaMgr::Instance()->teammate_kill_color);
} else if (target == hum) {
element.mutable_union_obj_1()->set_color(MetaMgr::Instance()->self_bekill_color);
element->mutable_union_obj_1()->set_color(MetaMgr::Instance()->self_bekill_color);
} else if (target->team_id == hum->team_id) {
element.mutable_union_obj_1()->set_color(MetaMgr::Instance()->teammate_bekill_color);
element->mutable_union_obj_1()->set_color(MetaMgr::Instance()->teammate_bekill_color);
} else{
element->mutable_union_obj_1()->set_color(0);
}
}
}