mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
Playerbot helper
This commit is contained in:
@@ -34,6 +34,17 @@ class WorldObject;
|
||||
|
||||
struct GameTele;
|
||||
|
||||
enum PlayerChatTag
|
||||
{
|
||||
CHAT_TAG_NONE = 0x00,
|
||||
CHAT_TAG_AFK = 0x01,
|
||||
CHAT_TAG_DND = 0x02,
|
||||
CHAT_TAG_GM = 0x04,
|
||||
CHAT_TAG_COM = 0x08, // Commentator
|
||||
CHAT_TAG_DEV = 0x10, // Developer
|
||||
};
|
||||
typedef uint32 ChatTagFlags;
|
||||
|
||||
class AC_GAME_API ChatHandler
|
||||
{
|
||||
public:
|
||||
@@ -48,6 +59,13 @@ public:
|
||||
// Builds chat packet and returns receiver guid position in the packet to substitute in whisper builders
|
||||
static size_t BuildChatPacket(WorldPacket& data, ChatMsg chatType, Language language, WorldObject const* sender, WorldObject const* receiver, std::string_view message, uint32 achievementId = 0, std::string const& channelName = "", LocaleConstant locale = DEFAULT_LOCALE);
|
||||
|
||||
// All in one chat message builder
|
||||
static void BuildChatPacket(
|
||||
WorldPacket& data, ChatMsg msgtype, std::string_view message, Language language = LANG_UNIVERSAL, PlayerChatTag chatTag = CHAT_TAG_NONE,
|
||||
ObjectGuid const& senderGuid = ObjectGuid(), std::string_view senderName = nullptr,
|
||||
ObjectGuid const& targetGuid = ObjectGuid(), std::string_view targetName = nullptr,
|
||||
std::string_view channelName = nullptr, uint32 achievementId = 0);
|
||||
|
||||
static char* LineFromMessage(char*& pos) { char* start = strtok(pos, "\n"); pos = nullptr; return start; }
|
||||
|
||||
// function with different implementation for chat/console
|
||||
|
||||
Reference in New Issue
Block a user