1
This commit is contained in:
parent
def77eaddf
commit
08ca2046f3
@ -24,6 +24,7 @@ void KillMgr::UnInit()
|
|||||||
dead.name
|
dead.name
|
||||||
weapon.name
|
weapon.name
|
||||||
weapon.text_icon
|
weapon.text_icon
|
||||||
|
image.id:
|
||||||
*/
|
*/
|
||||||
void KillMgr::OnHumanDead(Human* dead_hum, KillInfo* info)
|
void KillMgr::OnHumanDead(Human* dead_hum, KillInfo* info)
|
||||||
{
|
{
|
||||||
@ -49,15 +50,21 @@ void KillMgr::FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hin
|
|||||||
case VP_Buff:
|
case VP_Buff:
|
||||||
{
|
{
|
||||||
hint_info.killer_name = "";
|
hint_info.killer_name = "";
|
||||||
hint_info.template_name = "battle_server_dead_text_gas";
|
hint_info.template_name = a8::Format("battle_server_dead_text_buff_%d", {1});
|
||||||
hint_info.template_defval = "%s 被${weapon_text_icon}干掉";
|
if (!MetaMgr::Instance()->HasText(hint_info.template_name)) {
|
||||||
|
hint_info.template_name = "battle_server_dead_text_buff_default";
|
||||||
|
}
|
||||||
|
hint_info.template_defval = "%s 被";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VP_Explosion:
|
case VP_Explosion:
|
||||||
{
|
{
|
||||||
hint_info.killer_name = "";
|
hint_info.killer_name = "";
|
||||||
hint_info.template_name = "battle_server_dead_text_gas";
|
hint_info.template_name = a8::Format("battle_server_dead_text_explosion_%d", {1});
|
||||||
hint_info.template_defval = "%s 被${weapon_text_icon}干掉";
|
if (!MetaMgr::Instance()->HasText(hint_info.template_name)) {
|
||||||
|
hint_info.template_name = "battle_server_dead_text_explosion_default";
|
||||||
|
}
|
||||||
|
hint_info.template_defval = "%s 被";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1025,3 +1025,14 @@ std::string MetaMgr::GetText(const std::string& textid, const std::string& def_t
|
|||||||
auto itr = loader_->text_hash.find(textid);
|
auto itr = loader_->text_hash.find(textid);
|
||||||
return itr != loader_->text_hash.end() ? itr->second : def_text;
|
return itr != loader_->text_hash.end() ? itr->second : def_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MetaMgr::HasText(const std::string& textid)
|
||||||
|
{
|
||||||
|
auto itr = loader_->text_hash.find(textid);
|
||||||
|
return itr != loader_->text_hash.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::tuple<int, std::string>>* MetaMgr::GetTextElements(const std::string& textid)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
@ -60,6 +60,8 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
|||||||
MetaData::AI* GetAndroidAI(int ai_level, int ai_mode);
|
MetaData::AI* GetAndroidAI(int ai_level, int ai_mode);
|
||||||
MetaData::AI* GetHeroAI(int id);
|
MetaData::AI* GetHeroAI(int id);
|
||||||
std::string GetText(const std::string& textid, const std::string& def_text="");
|
std::string GetText(const std::string& textid, const std::string& def_text="");
|
||||||
|
bool HasText(const std::string& textid);
|
||||||
|
std::vector<std::tuple<int, std::string>>* GetTextElements(const std::string& textid);
|
||||||
|
|
||||||
int gas_inactive_time = 10;
|
int gas_inactive_time = 10;
|
||||||
int newbie_gas_inactive_time = 5;
|
int newbie_gas_inactive_time = 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user