#pragma once #include namespace cs { class SMRollMsg; } struct KillInfo { int root_master_id = 0; int killer_id = 0; std::string killer_name; int weapon_id = 0; int real_killer_id = 0; 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>* hint_template = nullptr; bool Replace(int idx, std::string& text); }; class Human; class KillMgr : public a8::Singleton { private: KillMgr() {}; friend class a8::Singleton; 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 pb_msg, RollMsgHintInfo& hint_info); void BoradcastRollMsg(Human* dead_hum, KillInfo* info, int killer_team_id, std::shared_ptr pb_msg); void BoradcastRollMsgCb(Human* dead_hum, KillInfo* info, int killer_team_id, std::shared_ptr pb_msg); friend class PBUtils; };