This commit is contained in:
aozhiwei 2023-05-05 19:23:00 +08:00
parent 3226878c93
commit 4f5b8d0d9b

View File

@ -52,6 +52,9 @@ void KillMgr::UnInit()
void KillMgr::FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hint_info)
{
#ifdef DEBUG
std::string dbg_str;
#endif
hint_info.dead_name = dead_hum->GetName();
switch (info->killer_id) {
@ -60,6 +63,14 @@ void KillMgr::FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hin
hint_info.killer_name = "";
hint_info.hint_template = mt::Text::GetTextElements
("battle_server_dead_text_gas");
#ifdef DEBUG
dbg_str = a8::Format("死者:%s(%s) 凶手:%s",
{
dead_hum->name,
dead_hum->IsAndroid() ? "机器人" : "玩家",
"毒圈"
});
#endif
}
break;
case VP_Buff:
@ -82,6 +93,14 @@ void KillMgr::FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hin
hint_info.hint_template = mt::Text::GetTextElements
("battle_server_dead_text_explosion_default");
}
#ifdef DEBUG
dbg_str = a8::Format("死者:%s(%s) 凶手:%s",
{
dead_hum->name,
dead_hum->IsAndroid() ? "机器人" : "玩家",
"炸弹"
});
#endif
}
break;
case VP_Water:
@ -89,6 +108,14 @@ void KillMgr::FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hin
hint_info.killer_name = "";
hint_info.hint_template = mt::Text::GetTextElements
("battle_server_dead_text_drown");
#ifdef DEBUG
dbg_str = a8::Format("死者:%s(%s) 凶手:%s",
{
dead_hum->name,
dead_hum->IsAndroid() ? "机器人" : "玩家",
""
});
#endif
}
break;
default:
@ -104,14 +131,37 @@ void KillMgr::FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hin
//${dead.name} 自杀
hint_info.hint_template = mt::Text::GetTextElements
("battle_server_dead_text_specate");
#ifdef DEBUG
dbg_str = a8::Format("死者:%s(%s) 凶手:%s(%s)",
{
dead_hum->name,
dead_hum->IsAndroid() ? "机器人" : "玩家",
dead_hum->name,
dead_hum->IsAndroid() ? "机器人" : "玩家"
});
#endif
} else {
//${killer.name} 使用 ${weapon.text_icon} 干掉了 ${dead.name}
hint_info.hint_template = mt::Text::GetTextElements
("battle_server_dead_text_weapon");
#ifdef DEBUG
if (killer->IsCreature(dead_hum->room)) {
dbg_str = a8::Format("死者:%s(%s) 凶手:%s(%s)",
{
dead_hum->name,
dead_hum->IsAndroid() ? "机器人" : "玩家",
((Creature*)killer)->GetName(),
((Creature*)killer)->IsAndroid() ? "机器人" : "玩家"
});
}
#endif
}
} else {
}
}
break;
}
#ifdef DEBUG
dead_hum->room->BroadcastDebugMsg(dbg_str);
#endif
}