Refactoring bot chat and sayaction caused by group crash <NOT FINISHED>

This commit is contained in:
Atidot3
2024-07-31 22:39:59 +02:00
parent f96f909b6e
commit 79d0f3fd28
10 changed files with 482 additions and 208 deletions

View File

@@ -105,7 +105,6 @@ class MinValueCalculator
void* param;
float minValue;
};
enum ChatChannelSource
{
SRC_GUILD,
@@ -128,6 +127,27 @@ enum ChatChannelSource
SRC_UNDEFINED
};
static std::map<ChatChannelSource, std::string> ChatChannelSourceStr = {
{ SRC_GUILD, "SRC_GUILD"},
{ SRC_WORLD, "SRC_WORLD"},
{ SRC_GENERAL, "SRC_GENERAL"},
{ SRC_TRADE, "SRC_TRADE"},
{ SRC_LOOKING_FOR_GROUP, "SRC_LOOKING_FOR_GROUP"},
{ SRC_LOCAL_DEFENSE, "SRC_LOCAL_DEFENSE"},
{ SRC_WORLD_DEFENSE, "SRC_WORLD_DEFENSE"},
{ SRC_GUILD_RECRUITMENT, "SRC_GUILD_RECRUITMENT"},
{ SRC_SAY, "SRC_SAY"},
{ SRC_WHISPER, "SRC_WHISPER"},
{ SRC_EMOTE, "SRC_EMOTE"},
{ SRC_TEXT_EMOTE, "SRC_TEXT_EMOTE"},
{ SRC_YELL, "SRC_YELL"},
{ SRC_PARTY, "SRC_PARTY"},
{ SRC_RAID, "SRC_RAID"},
{ SRC_UNDEFINED, "SRC_UNDEFINED"}
};
enum ChatChannelId
{
GENERAL = 1,
@@ -513,6 +533,10 @@ class PlayerbotAI : public PlayerbotAIBase
private:
static void _fillGearScoreData(Player* player, Item* item, std::vector<uint32>* gearScore, uint32& twoHandScore, bool mixed = false);
bool IsTellAllowed(PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL);
void HandleCommands();
void HandleCommand(uint32 type, const std::string& text, Player& fromPlayer, const uint32 lang = LANG_UNIVERSAL);
protected:
Player* bot;
Player* master;