From b4b4af5985c16a6606451844dac2cddc821b1ae2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 20 Mar 2024 18:00:55 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 1 + server/gameserver/pbutils.cc | 10 ++++++++++ server/gameserver/room.h | 3 +++ 3 files changed, 14 insertions(+) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index d864cfd5..2eee0688 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -432,6 +432,7 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, in } } GetTrigger()->HpChg(); + room->OnHumanHpChg(this); } void Human::AddToNewObjects(Entity* entity) diff --git a/server/gameserver/pbutils.cc b/server/gameserver/pbutils.cc index 4472f562..dcc11a67 100644 --- a/server/gameserver/pbutils.cc +++ b/server/gameserver/pbutils.cc @@ -2634,6 +2634,16 @@ void Room::NotifyKillList(const std::vector& uniid_list) }); } +void Room::SendSMTeamFull(Human* hum) +{ + +} + +void Room::OnHumanHpChg(Human* hum) +{ + +} + int Room::InitWithCustomBattle(long ip_saddr, int socket_handle, std::shared_ptr msg, std::shared_ptr p) { diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 04d27ced..8d5847fc 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -285,6 +285,8 @@ public: void CreateAndroid(int android_num, std::shared_ptr team = nullptr); int GetFullLevelIdx() { return ++curr_full_level_idx_;} std::shared_ptr GetRoomOb(); + void SendSMTeamFull(Human* hum); + void OnHumanHpChg(Human* hum); private: void ShuaAndroid(); @@ -397,6 +399,7 @@ private: std::map alive_human_hash_; std::map alive_player_hash_; std::map last_human_hash_; + std::map hpchg_human_hash_; std::map> born_point_hash_; std::map> task_hash_;