Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-07-23 18:23:10 +08:00
83 changed files with 320 additions and 247 deletions
+1 -1
View File
@@ -186,6 +186,7 @@ enum WorldBoolConfigs
CONFIG_STRICT_NAMES_PROFANITY,
CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH,
CONFIG_MUNCHING_BLIZZLIKE,
CONFIG_ENABLE_DAZE,
BOOL_CONFIG_VALUE_COUNT
};
@@ -567,7 +568,6 @@ public:
virtual void LoadConfigSettings(bool reload = false) = 0;
virtual void SendWorldText(uint32 string_id, ...) = 0;
virtual void SendWorldTextOptional(uint32 string_id, uint32 flag, ...) = 0;
virtual void SendGlobalText(const char* text, WorldSession* self) = 0;
virtual void SendGMText(uint32 string_id, ...) = 0;
virtual void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0;
virtual void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0;
+2 -18
View File
@@ -1285,6 +1285,8 @@ void World::LoadConfigSettings(bool reload)
_bool_configs[CONFIG_MUNCHING_BLIZZLIKE] = sConfigMgr->GetOption<bool>("MunchingBlizzlike.Enabled", true);
_bool_configs[CONFIG_ENABLE_DAZE] = sConfigMgr->GetOption<bool>("Daze.Enabled", true);
_int_configs[CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD] = sConfigMgr->GetOption<uint32>("DailyRBGArenaPoints.MinLevel", 71);
_int_configs[CONFIG_AUCTION_HOUSE_SEARCH_TIMEOUT] = sConfigMgr->GetOption<uint32>("AuctionHouse.SearchTimeout", 1000);
@@ -2653,24 +2655,6 @@ void World::SendGMText(uint32 string_id, ...)
va_end(ap);
}
/// @deprecated only for debug purpose. Send a System Message to all players (except self if mentioned)
void World::SendGlobalText(const char* text, WorldSession* self)
{
WorldPacket data;
// need copy to prevent corruption by strtok call in LineFromMessage original string
char* buf = strdup(text);
char* pos = buf;
while (char* line = ChatHandler::LineFromMessage(pos))
{
ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line);
SendGlobalMessage(&data, self);
}
free(buf);
}
/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
bool World::SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession* self, TeamId teamId)
{
-1
View File
@@ -239,7 +239,6 @@ public:
void LoadConfigSettings(bool reload = false) override;
void SendWorldText(uint32 string_id, ...) override;
void SendGlobalText(const char* text, WorldSession* self) override;
void SendGMText(uint32 string_id, ...) override;
void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override;
void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override;