mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
chore(Core/MiscHandler): SendAreaTriggerMessage with integer parameter (#16506)
Add the possibility for SendAreaTriggerMessage to accept an integer parameter
This commit is contained in:
@@ -718,6 +718,27 @@ void WorldSession::SendAreaTriggerMessage(const char* Text, ...)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendAreaTriggerMessage(uint32 entry, ...)
|
||||
{
|
||||
char const* format = GetAcoreString(entry);
|
||||
if (format)
|
||||
{
|
||||
va_list ap;
|
||||
char szStr[1024];
|
||||
szStr[0] = '\0';
|
||||
|
||||
va_start(ap, entry);
|
||||
vsnprintf(szStr, 1024, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
uint32 length = strlen(szStr) + 1;
|
||||
WorldPacket data(SMSG_AREA_TRIGGER_MESSAGE, 4 + length);
|
||||
data << length;
|
||||
data << szStr;
|
||||
SendPacket(&data);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
uint32 triggerId;
|
||||
|
||||
@@ -349,6 +349,7 @@ public:
|
||||
void SendPetNameInvalid(uint32 error, std::string const& name, DeclinedName* declinedName);
|
||||
void SendPartyResult(PartyOperation operation, std::string const& member, PartyResult res, uint32 val = 0);
|
||||
void SendAreaTriggerMessage(const char* Text, ...) ATTR_PRINTF(2, 3);
|
||||
void SendAreaTriggerMessage(uint32 entry, ...);
|
||||
void SendSetPhaseShift(uint32 phaseShift);
|
||||
void SendQueryTimeResponse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user