Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Fix addon messaging to get AIO to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Jan 4, 2024
1 parent 7f896a0 commit c1a408b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/server/game/Handlers/ChatHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
return;
}

std::string luaMessage = prefix + "\t" + message;
switch (type)
{
case CHAT_MSG_BATTLEGROUND:
Expand All @@ -717,7 +718,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
if (!group || !group->isBGGroup())
return;
#ifdef ELUNA
if (!sEluna->OnChat(sender, type, LANG_ADDON, message, group))
if (!sEluna->OnChat(sender, type, LANG_ADDON, luaMessage, group))
return;
#endif

Expand All @@ -733,7 +734,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
if (Guild* guild = sGuildMgr->GetGuildById(sender->GetGuildId()))
{
#ifdef ELUNA
if (!sEluna->OnChat(sender, type, LANG_ADDON, message, guild))
if (!sEluna->OnChat(sender, type, LANG_ADDON, luaMessage, guild))
return;
#endif
guild->BroadcastAddonToGuild(this, type == CHAT_MSG_OFFICER, message, prefix);
Expand All @@ -748,7 +749,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
if (!receiver)
break;
#ifdef ELUNA
if (!sEluna->OnChat(sender, type, LANG_ADDON, message, receiver))
if (!sEluna->OnChat(sender, type, LANG_ADDON, luaMessage, receiver))
return;
#endif

Expand All @@ -763,7 +764,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
if (!group || group->isBGGroup())
break;
#ifdef ELUNA
if (!sEluna->OnChat(sender, type, LANG_ADDON, message, group))
if (!sEluna->OnChat(sender, type, LANG_ADDON, luaMessage, group))
return;
#endif

Expand Down

0 comments on commit c1a408b

Please sign in to comment.