This commit is contained in:
aozhiwei 2024-03-25 20:57:12 +08:00
parent 57ff329703
commit 2ae8fe18cc
3 changed files with 11 additions and 1 deletions

View File

@ -304,5 +304,5 @@ void CustomBattle::OnEnter(std::shared_ptr<cs::CMJoin> join_msg, long ip_saddr,
void CustomBattle::OnMemberReady(CustomMember* member)
{
NotifyState();
}

View File

@ -51,9 +51,11 @@ class CustomBattle
private:
void CalcTeam1AverageHeroLv();
void NotifyState();
private:
bool parse_ok_ = false;
int state_ = 0;
Room *room_ = nullptr;
int custom_room_type_ = CUSTOM_ROOM_CUSTOM;
bool is_moba_ = false;

View File

@ -3031,3 +3031,11 @@ int Creature::Throw(int slot, const glm::vec3& bomb_pos, const glm::vec3& bomb_d
}
return 0;
}
void CustomBattle::NotifyState()
{
cs::SMBattlePreInfoUpdate notify_msg;
for (auto& pair : socket_hash_) {
GGListener::Instance()->SendToClient(pair.first, 0, notify_msg);
}
}