1
This commit is contained in:
parent
0ec3f70199
commit
db4f0e676a
@ -8,48 +8,37 @@
|
||||
|
||||
#include "cs_proto.pb.h"
|
||||
|
||||
struct RollMsgHintInfo
|
||||
bool RollMsgHintInfo::Replace(int idx, std::string& text)
|
||||
{
|
||||
std::string master_name;
|
||||
std::string killer_name;
|
||||
std::string dead_name;
|
||||
std::string weapon_text_icon;
|
||||
|
||||
std::vector<std::tuple<int, std::string>>* hint_template = nullptr;
|
||||
|
||||
bool Replace(int idx, std::string& text)
|
||||
{
|
||||
switch (idx) {
|
||||
case kFieldIdxMasterName:
|
||||
{
|
||||
text = master_name;
|
||||
}
|
||||
break;
|
||||
case kFieldIdxKillerName:
|
||||
{
|
||||
text = killer_name;
|
||||
}
|
||||
break;
|
||||
case kFieldIdxDeadName:
|
||||
{
|
||||
text = dead_name;
|
||||
}
|
||||
break;
|
||||
case kFieldIdxWeaponTextIcon:
|
||||
{
|
||||
text = weapon_text_icon;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
switch (idx) {
|
||||
case kFieldIdxMasterName:
|
||||
{
|
||||
text = master_name;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
case kFieldIdxKillerName:
|
||||
{
|
||||
text = killer_name;
|
||||
}
|
||||
break;
|
||||
case kFieldIdxDeadName:
|
||||
{
|
||||
text = dead_name;
|
||||
}
|
||||
break;
|
||||
case kFieldIdxWeaponTextIcon:
|
||||
{
|
||||
text = weapon_text_icon;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
void KillMgr::Init()
|
||||
{
|
||||
|
@ -17,8 +17,18 @@ struct KillInfo
|
||||
std::string real_killer_name;
|
||||
};
|
||||
|
||||
struct RollMsgHintInfo
|
||||
{
|
||||
std::string master_name;
|
||||
std::string killer_name;
|
||||
std::string dead_name;
|
||||
std::string weapon_text_icon;
|
||||
|
||||
std::vector<std::tuple<int, std::string>>* hint_template = nullptr;
|
||||
bool Replace(int idx, std::string& text);
|
||||
};
|
||||
|
||||
class Human;
|
||||
struct RollMsgHintInfo;
|
||||
class KillMgr : public a8::Singleton<KillMgr>
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user