44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
#pragma once
|
|
|
|
namespace cs
|
|
{
|
|
class SMRollMsg;
|
|
}
|
|
|
|
struct KillInfo
|
|
{
|
|
int root_master_id = 0;
|
|
int killer_id = 0;
|
|
std::string killer_name;
|
|
int weapon_id = 0;
|
|
};
|
|
|
|
class Human;
|
|
struct RollMsgHintInfo;
|
|
class KillMgr : public a8::Singleton<KillMgr>
|
|
{
|
|
|
|
private:
|
|
KillMgr() {};
|
|
friend class a8::Singleton<KillMgr>;
|
|
|
|
public:
|
|
|
|
void Init();
|
|
void UnInit();
|
|
void OnHumanDead(Human* dead_hum, KillInfo* info);
|
|
|
|
private:
|
|
void FillHintInfo(Human* dead_hum, KillInfo* info, RollMsgHintInfo& hint_info);
|
|
void PreprocessRollMsg(std::shared_ptr<cs::SMRollMsg> pb_msg,
|
|
RollMsgHintInfo& hint_info);
|
|
void BoradcastRollMsg(Human* dead_hum,
|
|
KillInfo* info,
|
|
int killer_team_id,
|
|
std::shared_ptr<cs::SMRollMsg> pb_msg);
|
|
void BoradcastRollMsgCb(Human* dead_hum,
|
|
KillInfo* info,
|
|
int killer_team_id,
|
|
std::shared_ptr<cs::SMRollMsg> pb_msg);
|
|
};
|