feat(Core/EnumUtils): add more enum for support chat command (#8828)

This commit is contained in:
Kargatum
2021-11-03 16:50:11 +07:00
committed by GitHub
parent 34d32f689a
commit aa7932e971
18 changed files with 3455 additions and 80 deletions

View File

@@ -1,7 +1,18 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
* Copyright (C) 2021+ WarheadCore <https://github.com/WarheadCore>
* Copyright (C) 2008-2021 TrinityCore <http://www.trinitycore.org/>
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ArenaTeam.h"

View File

@@ -29,7 +29,8 @@ class Player;
#define CHANNEL_BAN_DURATION DAY*60
enum ChatNotify
// EnumUtils: DESCRIBE THIS
enum ChatNotify : uint8
{
CHAT_JOINED_NOTICE = 0x00, //+ "%s joined channel.";
CHAT_LEFT_NOTICE = 0x01, //+ "%s left channel.";

View File

@@ -0,0 +1,166 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Channel.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/************************************************************\
|* data for enum 'ChatNotify' in 'Channel.h' auto-generated *|
\************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<ChatNotify>::ToString(ChatNotify value)
{
switch (value)
{
case CHAT_JOINED_NOTICE: return { "CHAT_JOINED_NOTICE", "CHAT_JOINED_NOTICE", "+ \042%s joined channel.\042;" };
case CHAT_LEFT_NOTICE: return { "CHAT_LEFT_NOTICE", "CHAT_LEFT_NOTICE", "+ \042%s left channel.\042;" };
case CHAT_YOU_JOINED_NOTICE: return { "CHAT_YOU_JOINED_NOTICE", "CHAT_YOU_JOINED_NOTICE", "+ \042Joined Channel: [%s]\042; -- You joined" };
case CHAT_YOU_LEFT_NOTICE: return { "CHAT_YOU_LEFT_NOTICE", "CHAT_YOU_LEFT_NOTICE", "+ \042Left Channel: [%s]\042; -- You left" };
case CHAT_WRONG_PASSWORD_NOTICE: return { "CHAT_WRONG_PASSWORD_NOTICE", "CHAT_WRONG_PASSWORD_NOTICE", "+ \042Wrong password for %s.\042;" };
case CHAT_NOT_MEMBER_NOTICE: return { "CHAT_NOT_MEMBER_NOTICE", "CHAT_NOT_MEMBER_NOTICE", "+ \042Not on channel %s.\042;" };
case CHAT_NOT_MODERATOR_NOTICE: return { "CHAT_NOT_MODERATOR_NOTICE", "CHAT_NOT_MODERATOR_NOTICE", "+ \042Not a moderator of %s.\042;" };
case CHAT_PASSWORD_CHANGED_NOTICE: return { "CHAT_PASSWORD_CHANGED_NOTICE", "CHAT_PASSWORD_CHANGED_NOTICE", "+ \042[%s] Password changed by %s.\042;" };
case CHAT_OWNER_CHANGED_NOTICE: return { "CHAT_OWNER_CHANGED_NOTICE", "CHAT_OWNER_CHANGED_NOTICE", "+ \042[%s] Owner changed to %s.\042;" };
case CHAT_PLAYER_NOT_FOUND_NOTICE: return { "CHAT_PLAYER_NOT_FOUND_NOTICE", "CHAT_PLAYER_NOT_FOUND_NOTICE", "+ \042[%s] Player %s was not found.\042;" };
case CHAT_NOT_OWNER_NOTICE: return { "CHAT_NOT_OWNER_NOTICE", "CHAT_NOT_OWNER_NOTICE", "+ \042[%s] You are not the channel owner.\042;" };
case CHAT_CHANNEL_OWNER_NOTICE: return { "CHAT_CHANNEL_OWNER_NOTICE", "CHAT_CHANNEL_OWNER_NOTICE", "+ \042[%s] Channel owner is %s.\042;" };
case CHAT_MODE_CHANGE_NOTICE: return { "CHAT_MODE_CHANGE_NOTICE", "CHAT_MODE_CHANGE_NOTICE", "?" };
case CHAT_ANNOUNCEMENTS_ON_NOTICE: return { "CHAT_ANNOUNCEMENTS_ON_NOTICE", "CHAT_ANNOUNCEMENTS_ON_NOTICE", "+ \042[%s] Channel announcements enabled by %s.\042;" };
case CHAT_ANNOUNCEMENTS_OFF_NOTICE: return { "CHAT_ANNOUNCEMENTS_OFF_NOTICE", "CHAT_ANNOUNCEMENTS_OFF_NOTICE", "+ \042[%s] Channel announcements disabled by %s.\042;" };
case CHAT_MODERATION_ON_NOTICE: return { "CHAT_MODERATION_ON_NOTICE", "CHAT_MODERATION_ON_NOTICE", "+ \042[%s] Channel moderation enabled by %s.\042;" };
case CHAT_MODERATION_OFF_NOTICE: return { "CHAT_MODERATION_OFF_NOTICE", "CHAT_MODERATION_OFF_NOTICE", "+ \042[%s] Channel moderation disabled by %s.\042;" };
case CHAT_MUTED_NOTICE: return { "CHAT_MUTED_NOTICE", "CHAT_MUTED_NOTICE", "+ \042[%s] You do not have permission to speak.\042;" };
case CHAT_PLAYER_KICKED_NOTICE: return { "CHAT_PLAYER_KICKED_NOTICE", "CHAT_PLAYER_KICKED_NOTICE", "? \042[%s] Player %s kicked by %s.\042;" };
case CHAT_BANNED_NOTICE: return { "CHAT_BANNED_NOTICE", "CHAT_BANNED_NOTICE", "+ \042[%s] You are bannedStore from that channel.\042;" };
case CHAT_PLAYER_BANNED_NOTICE: return { "CHAT_PLAYER_BANNED_NOTICE", "CHAT_PLAYER_BANNED_NOTICE", "? \042[%s] Player %s bannedStore by %s.\042;" };
case CHAT_PLAYER_UNBANNED_NOTICE: return { "CHAT_PLAYER_UNBANNED_NOTICE", "CHAT_PLAYER_UNBANNED_NOTICE", "? \042[%s] Player %s unbanned by %s.\042;" };
case CHAT_PLAYER_NOT_BANNED_NOTICE: return { "CHAT_PLAYER_NOT_BANNED_NOTICE", "CHAT_PLAYER_NOT_BANNED_NOTICE", "+ \042[%s] Player %s is not bannedStore.\042;" };
case CHAT_PLAYER_ALREADY_MEMBER_NOTICE: return { "CHAT_PLAYER_ALREADY_MEMBER_NOTICE", "CHAT_PLAYER_ALREADY_MEMBER_NOTICE", "+ \042[%s] Player %s is already on the channel.\042;" };
case CHAT_INVITE_NOTICE: return { "CHAT_INVITE_NOTICE", "CHAT_INVITE_NOTICE", "+ \042%2$s has invited you to join the channel '%1$s'.\042;" };
case CHAT_INVITE_WRONG_FACTION_NOTICE: return { "CHAT_INVITE_WRONG_FACTION_NOTICE", "CHAT_INVITE_WRONG_FACTION_NOTICE", "+ \042Target is in the wrong alliance for %s.\042;" };
case CHAT_WRONG_FACTION_NOTICE: return { "CHAT_WRONG_FACTION_NOTICE", "CHAT_WRONG_FACTION_NOTICE", "+ \042Wrong alliance for %s.\042;" };
case CHAT_INVALID_NAME_NOTICE: return { "CHAT_INVALID_NAME_NOTICE", "CHAT_INVALID_NAME_NOTICE", "+ \042Invalid channel name\042;" };
case CHAT_NOT_MODERATED_NOTICE: return { "CHAT_NOT_MODERATED_NOTICE", "CHAT_NOT_MODERATED_NOTICE", "+ \042%s is not moderated\042;" };
case CHAT_PLAYER_INVITED_NOTICE: return { "CHAT_PLAYER_INVITED_NOTICE", "CHAT_PLAYER_INVITED_NOTICE", "+ \042[%s] You invited %s to join the channel\042;" };
case CHAT_PLAYER_INVITE_BANNED_NOTICE: return { "CHAT_PLAYER_INVITE_BANNED_NOTICE", "CHAT_PLAYER_INVITE_BANNED_NOTICE", "+ \042[%s] %s has been bannedStore.\042;" };
case CHAT_THROTTLED_NOTICE: return { "CHAT_THROTTLED_NOTICE", "CHAT_THROTTLED_NOTICE", "+ \042[%s] The number of messages that can be sent to this channel is limited, please wait to send another message.\042;" };
case CHAT_NOT_IN_AREA_NOTICE: return { "CHAT_NOT_IN_AREA_NOTICE", "CHAT_NOT_IN_AREA_NOTICE", "+ \042[%s] You are not in the correct area for this channel.\042; -- The user is trying to send a chat to a zone specific channel, and they're not physically in that zone." };
case CHAT_NOT_IN_LFG_NOTICE: return { "CHAT_NOT_IN_LFG_NOTICE", "CHAT_NOT_IN_LFG_NOTICE", "+ \042[%s] You must be queued in looking for group before joining this channel.\042; -- The user must be in the looking for group system to join LFG chat channels." };
case CHAT_VOICE_ON_NOTICE: return { "CHAT_VOICE_ON_NOTICE", "CHAT_VOICE_ON_NOTICE", "+ \042[%s] Channel voice enabled by %s.\042;" };
case CHAT_VOICE_OFF_NOTICE: return { "CHAT_VOICE_OFF_NOTICE", "CHAT_VOICE_OFF_NOTICE", "+ \042[%s] Channel voice disabled by %s.\042;" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<ChatNotify>::Count() { return 36; }
template <>
AC_API_EXPORT ChatNotify EnumUtils<ChatNotify>::FromIndex(size_t index)
{
switch (index)
{
case 0: return CHAT_JOINED_NOTICE;
case 1: return CHAT_LEFT_NOTICE;
case 2: return CHAT_YOU_JOINED_NOTICE;
case 3: return CHAT_YOU_LEFT_NOTICE;
case 4: return CHAT_WRONG_PASSWORD_NOTICE;
case 5: return CHAT_NOT_MEMBER_NOTICE;
case 6: return CHAT_NOT_MODERATOR_NOTICE;
case 7: return CHAT_PASSWORD_CHANGED_NOTICE;
case 8: return CHAT_OWNER_CHANGED_NOTICE;
case 9: return CHAT_PLAYER_NOT_FOUND_NOTICE;
case 10: return CHAT_NOT_OWNER_NOTICE;
case 11: return CHAT_CHANNEL_OWNER_NOTICE;
case 12: return CHAT_MODE_CHANGE_NOTICE;
case 13: return CHAT_ANNOUNCEMENTS_ON_NOTICE;
case 14: return CHAT_ANNOUNCEMENTS_OFF_NOTICE;
case 15: return CHAT_MODERATION_ON_NOTICE;
case 16: return CHAT_MODERATION_OFF_NOTICE;
case 17: return CHAT_MUTED_NOTICE;
case 18: return CHAT_PLAYER_KICKED_NOTICE;
case 19: return CHAT_BANNED_NOTICE;
case 20: return CHAT_PLAYER_BANNED_NOTICE;
case 21: return CHAT_PLAYER_UNBANNED_NOTICE;
case 22: return CHAT_PLAYER_NOT_BANNED_NOTICE;
case 23: return CHAT_PLAYER_ALREADY_MEMBER_NOTICE;
case 24: return CHAT_INVITE_NOTICE;
case 25: return CHAT_INVITE_WRONG_FACTION_NOTICE;
case 26: return CHAT_WRONG_FACTION_NOTICE;
case 27: return CHAT_INVALID_NAME_NOTICE;
case 28: return CHAT_NOT_MODERATED_NOTICE;
case 29: return CHAT_PLAYER_INVITED_NOTICE;
case 30: return CHAT_PLAYER_INVITE_BANNED_NOTICE;
case 31: return CHAT_THROTTLED_NOTICE;
case 32: return CHAT_NOT_IN_AREA_NOTICE;
case 33: return CHAT_NOT_IN_LFG_NOTICE;
case 34: return CHAT_VOICE_ON_NOTICE;
case 35: return CHAT_VOICE_OFF_NOTICE;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<ChatNotify>::ToIndex(ChatNotify value)
{
switch (value)
{
case CHAT_JOINED_NOTICE: return 0;
case CHAT_LEFT_NOTICE: return 1;
case CHAT_YOU_JOINED_NOTICE: return 2;
case CHAT_YOU_LEFT_NOTICE: return 3;
case CHAT_WRONG_PASSWORD_NOTICE: return 4;
case CHAT_NOT_MEMBER_NOTICE: return 5;
case CHAT_NOT_MODERATOR_NOTICE: return 6;
case CHAT_PASSWORD_CHANGED_NOTICE: return 7;
case CHAT_OWNER_CHANGED_NOTICE: return 8;
case CHAT_PLAYER_NOT_FOUND_NOTICE: return 9;
case CHAT_NOT_OWNER_NOTICE: return 10;
case CHAT_CHANNEL_OWNER_NOTICE: return 11;
case CHAT_MODE_CHANGE_NOTICE: return 12;
case CHAT_ANNOUNCEMENTS_ON_NOTICE: return 13;
case CHAT_ANNOUNCEMENTS_OFF_NOTICE: return 14;
case CHAT_MODERATION_ON_NOTICE: return 15;
case CHAT_MODERATION_OFF_NOTICE: return 16;
case CHAT_MUTED_NOTICE: return 17;
case CHAT_PLAYER_KICKED_NOTICE: return 18;
case CHAT_BANNED_NOTICE: return 19;
case CHAT_PLAYER_BANNED_NOTICE: return 20;
case CHAT_PLAYER_UNBANNED_NOTICE: return 21;
case CHAT_PLAYER_NOT_BANNED_NOTICE: return 22;
case CHAT_PLAYER_ALREADY_MEMBER_NOTICE: return 23;
case CHAT_INVITE_NOTICE: return 24;
case CHAT_INVITE_WRONG_FACTION_NOTICE: return 25;
case CHAT_WRONG_FACTION_NOTICE: return 26;
case CHAT_INVALID_NAME_NOTICE: return 27;
case CHAT_NOT_MODERATED_NOTICE: return 28;
case CHAT_PLAYER_INVITED_NOTICE: return 29;
case CHAT_PLAYER_INVITE_BANNED_NOTICE: return 30;
case CHAT_THROTTLED_NOTICE: return 31;
case CHAT_NOT_IN_AREA_NOTICE: return 32;
case CHAT_NOT_IN_LFG_NOTICE: return 33;
case CHAT_VOICE_ON_NOTICE: return 34;
case CHAT_VOICE_OFF_NOTICE: return 35;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -39,9 +39,10 @@
#define MAX_EQUIPMENT_ITEMS 3
// TODO: Implement missing flags from TC in places that custom flags from xinef&pussywizzard use flag values.
// EnumUtils: DESCRIBE THIS
enum CreatureFlagsExtra : uint32
{
// TODO: Implement missing flags from TC in places that custom flags from xinef&pussywizzard use flag values.
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility)
CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry
@@ -51,7 +52,7 @@ enum CreatureFlagsExtra : uint32
CREATURE_FLAG_EXTRA_NO_XP = 0x00000040, // creature kill does not provide XP
CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature
CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and 'attack me' effects
CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE = 0x00000200, // creature won't update movement flags
CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE = 0x00000200, // creature won't update movement flags
CREATURE_FLAG_EXTRA_GHOST_VISIBILITY = 0x00000400, // creature will only be visible to dead players
CREATURE_FLAG_EXTRA_UNUSED_12 = 0x00000800, // TODO: Implement CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK (creature will use offhand attacks)
CREATURE_FLAG_EXTRA_NO_SELL_VENDOR = 0x00001000, // players can't sell items to this vendor
@@ -77,8 +78,9 @@ enum CreatureFlagsExtra : uint32
// Masks
CREATURE_FLAG_EXTRA_UNUSED = (CREATURE_FLAG_EXTRA_UNUSED_12 | CREATURE_FLAG_EXTRA_UNUSED_25 | CREATURE_FLAG_EXTRA_UNUSED_26 |
CREATURE_FLAG_EXTRA_UNUSED_27 | CREATURE_FLAG_EXTRA_UNUSED_28),
CREATURE_FLAG_EXTRA_DB_ALLOWED = (0xFFFFFFFF & ~(CREATURE_FLAG_EXTRA_UNUSED | CREATURE_FLAG_EXTRA_DUNGEON_BOSS))
CREATURE_FLAG_EXTRA_UNUSED_27 | CREATURE_FLAG_EXTRA_UNUSED_28), // SKIP
CREATURE_FLAG_EXTRA_DB_ALLOWED = (0xFFFFFFFF & ~(CREATURE_FLAG_EXTRA_UNUSED | CREATURE_FLAG_EXTRA_DUNGEON_BOSS)) // SKIP
};
// from `creature_template` table

View File

@@ -0,0 +1,154 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CreatureData.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/*************************************************************************\
|* data for enum 'CreatureFlagsExtra' in 'CreatureData.h' auto-generated *|
\*************************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<CreatureFlagsExtra>::ToString(CreatureFlagsExtra value)
{
switch (value)
{
case CREATURE_FLAG_EXTRA_INSTANCE_BIND: return { "CREATURE_FLAG_EXTRA_INSTANCE_BIND", "CREATURE_FLAG_EXTRA_INSTANCE_BIND", "creature kill bind instance with killer and killer's group" };
case CREATURE_FLAG_EXTRA_CIVILIAN: return { "CREATURE_FLAG_EXTRA_CIVILIAN", "CREATURE_FLAG_EXTRA_CIVILIAN", "not aggro (ignore faction/reputation hostility)" };
case CREATURE_FLAG_EXTRA_NO_PARRY: return { "CREATURE_FLAG_EXTRA_NO_PARRY", "CREATURE_FLAG_EXTRA_NO_PARRY", "creature can't parry" };
case CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN: return { "CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN", "CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN", "creature can't counter-attack at parry" };
case CREATURE_FLAG_EXTRA_NO_BLOCK: return { "CREATURE_FLAG_EXTRA_NO_BLOCK", "CREATURE_FLAG_EXTRA_NO_BLOCK", "creature can't block" };
case CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS: return { "CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS", "CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS", "creature can't do crush attacks" };
case CREATURE_FLAG_EXTRA_NO_XP: return { "CREATURE_FLAG_EXTRA_NO_XP", "CREATURE_FLAG_EXTRA_NO_XP", "creature kill does not provide XP" };
case CREATURE_FLAG_EXTRA_TRIGGER: return { "CREATURE_FLAG_EXTRA_TRIGGER", "CREATURE_FLAG_EXTRA_TRIGGER", "trigger creature" };
case CREATURE_FLAG_EXTRA_NO_TAUNT: return { "CREATURE_FLAG_EXTRA_NO_TAUNT", "CREATURE_FLAG_EXTRA_NO_TAUNT", "creature is immune to taunt auras and 'attack me' effects" };
case CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE: return { "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "creature won't update movement flags" };
case CREATURE_FLAG_EXTRA_GHOST_VISIBILITY: return { "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "creature will only be visible to dead players" };
case CREATURE_FLAG_EXTRA_UNUSED_12: return { "CREATURE_FLAG_EXTRA_UNUSED_12", "CREATURE_FLAG_EXTRA_UNUSED_12", "TODO: Implement CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK (creature will use offhand attacks)" };
case CREATURE_FLAG_EXTRA_NO_SELL_VENDOR: return { "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "players can't sell items to this vendor" };
case CREATURE_FLAG_EXTRA_IGNORE_COMBAT: return { "CREATURE_FLAG_EXTRA_IGNORE_COMBAT", "CREATURE_FLAG_EXTRA_IGNORE_COMBAT", "" };
case CREATURE_FLAG_EXTRA_WORLDEVENT: return { "CREATURE_FLAG_EXTRA_WORLDEVENT", "CREATURE_FLAG_EXTRA_WORLDEVENT", "custom flag for world event creatures (left room for merging)" };
case CREATURE_FLAG_EXTRA_GUARD: return { "CREATURE_FLAG_EXTRA_GUARD", "CREATURE_FLAG_EXTRA_GUARD", "Creature is guard" };
case CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH: return { "CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH", "CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH", "creature ignores feign death" };
case CREATURE_FLAG_EXTRA_NO_CRIT: return { "CREATURE_FLAG_EXTRA_NO_CRIT", "CREATURE_FLAG_EXTRA_NO_CRIT", "creature can't do critical strikes" };
case CREATURE_FLAG_EXTRA_NO_SKILL_GAINS: return { "CREATURE_FLAG_EXTRA_NO_SKILL_GAINS", "CREATURE_FLAG_EXTRA_NO_SKILL_GAINS", "creature won't increase weapon skills" };
case CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS: return { "CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS", "CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS", "Taunt is subject to diminishing returns on this creature" };
case CREATURE_FLAG_EXTRA_ALL_DIMINISH: return { "CREATURE_FLAG_EXTRA_ALL_DIMINISH", "CREATURE_FLAG_EXTRA_ALL_DIMINISH", "creature is subject to all diminishing returns as players are" };
case CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ: return { "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "creature does not need to take player damage for kill credit" };
case CREATURE_FLAG_EXTRA_AVOID_AOE: return { "CREATURE_FLAG_EXTRA_AVOID_AOE", "CREATURE_FLAG_EXTRA_AVOID_AOE", "pussywizard: ignored by aoe attacks (for icc blood prince council npc - Dark Nucleus)" };
case CREATURE_FLAG_EXTRA_NO_DODGE: return { "CREATURE_FLAG_EXTRA_NO_DODGE", "CREATURE_FLAG_EXTRA_NO_DODGE", "xinef: target cannot dodge" };
case CREATURE_FLAG_EXTRA_UNUSED_25: return { "CREATURE_FLAG_EXTRA_UNUSED_25", "CREATURE_FLAG_EXTRA_UNUSED_25", "" };
case CREATURE_FLAG_EXTRA_UNUSED_26: return { "CREATURE_FLAG_EXTRA_UNUSED_26", "CREATURE_FLAG_EXTRA_UNUSED_26", "" };
case CREATURE_FLAG_EXTRA_UNUSED_27: return { "CREATURE_FLAG_EXTRA_UNUSED_27", "CREATURE_FLAG_EXTRA_UNUSED_27", "" };
case CREATURE_FLAG_EXTRA_UNUSED_28: return { "CREATURE_FLAG_EXTRA_UNUSED_28", "CREATURE_FLAG_EXTRA_UNUSED_28", "" };
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return { "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)" };
case CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING: return { "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "creature ignore pathfinding" };
case CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK: return { "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "creature is immune to knockback effects" };
case CREATURE_FLAG_EXTRA_HARD_RESET: return { "CREATURE_FLAG_EXTRA_HARD_RESET", "CREATURE_FLAG_EXTRA_HARD_RESET", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<CreatureFlagsExtra>::Count() { return 32; }
template <>
AC_API_EXPORT CreatureFlagsExtra EnumUtils<CreatureFlagsExtra>::FromIndex(size_t index)
{
switch (index)
{
case 0: return CREATURE_FLAG_EXTRA_INSTANCE_BIND;
case 1: return CREATURE_FLAG_EXTRA_CIVILIAN;
case 2: return CREATURE_FLAG_EXTRA_NO_PARRY;
case 3: return CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN;
case 4: return CREATURE_FLAG_EXTRA_NO_BLOCK;
case 5: return CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS;
case 6: return CREATURE_FLAG_EXTRA_NO_XP;
case 7: return CREATURE_FLAG_EXTRA_TRIGGER;
case 8: return CREATURE_FLAG_EXTRA_NO_TAUNT;
case 9: return CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE;
case 10: return CREATURE_FLAG_EXTRA_GHOST_VISIBILITY;
case 11: return CREATURE_FLAG_EXTRA_UNUSED_12;
case 12: return CREATURE_FLAG_EXTRA_NO_SELL_VENDOR;
case 13: return CREATURE_FLAG_EXTRA_IGNORE_COMBAT;
case 14: return CREATURE_FLAG_EXTRA_WORLDEVENT;
case 15: return CREATURE_FLAG_EXTRA_GUARD;
case 16: return CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH;
case 17: return CREATURE_FLAG_EXTRA_NO_CRIT;
case 18: return CREATURE_FLAG_EXTRA_NO_SKILL_GAINS;
case 19: return CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS;
case 20: return CREATURE_FLAG_EXTRA_ALL_DIMINISH;
case 21: return CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ;
case 22: return CREATURE_FLAG_EXTRA_AVOID_AOE;
case 23: return CREATURE_FLAG_EXTRA_NO_DODGE;
case 24: return CREATURE_FLAG_EXTRA_UNUSED_25;
case 25: return CREATURE_FLAG_EXTRA_UNUSED_26;
case 26: return CREATURE_FLAG_EXTRA_UNUSED_27;
case 27: return CREATURE_FLAG_EXTRA_UNUSED_28;
case 28: return CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
case 29: return CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING;
case 30: return CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK;
case 31: return CREATURE_FLAG_EXTRA_HARD_RESET;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<CreatureFlagsExtra>::ToIndex(CreatureFlagsExtra value)
{
switch (value)
{
case CREATURE_FLAG_EXTRA_INSTANCE_BIND: return 0;
case CREATURE_FLAG_EXTRA_CIVILIAN: return 1;
case CREATURE_FLAG_EXTRA_NO_PARRY: return 2;
case CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN: return 3;
case CREATURE_FLAG_EXTRA_NO_BLOCK: return 4;
case CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS: return 5;
case CREATURE_FLAG_EXTRA_NO_XP: return 6;
case CREATURE_FLAG_EXTRA_TRIGGER: return 7;
case CREATURE_FLAG_EXTRA_NO_TAUNT: return 8;
case CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE: return 9;
case CREATURE_FLAG_EXTRA_GHOST_VISIBILITY: return 10;
case CREATURE_FLAG_EXTRA_UNUSED_12: return 11;
case CREATURE_FLAG_EXTRA_NO_SELL_VENDOR: return 12;
case CREATURE_FLAG_EXTRA_IGNORE_COMBAT: return 13;
case CREATURE_FLAG_EXTRA_WORLDEVENT: return 14;
case CREATURE_FLAG_EXTRA_GUARD: return 15;
case CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH: return 16;
case CREATURE_FLAG_EXTRA_NO_CRIT: return 17;
case CREATURE_FLAG_EXTRA_NO_SKILL_GAINS: return 18;
case CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS: return 19;
case CREATURE_FLAG_EXTRA_ALL_DIMINISH: return 20;
case CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ: return 21;
case CREATURE_FLAG_EXTRA_AVOID_AOE: return 22;
case CREATURE_FLAG_EXTRA_NO_DODGE: return 23;
case CREATURE_FLAG_EXTRA_UNUSED_25: return 24;
case CREATURE_FLAG_EXTRA_UNUSED_26: return 25;
case CREATURE_FLAG_EXTRA_UNUSED_27: return 26;
case CREATURE_FLAG_EXTRA_UNUSED_28: return 27;
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return 28;
case CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING: return 29;
case CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK: return 30;
case CREATURE_FLAG_EXTRA_HARD_RESET: return 31;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -35,6 +35,7 @@ struct ItemSetEffect
SpellInfo const* spells[8];
};
// EnumUtils: DESCRIBE THIS
enum InventoryResult
{
EQUIP_ERR_OK = 0,
@@ -128,6 +129,7 @@ enum InventoryResult
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED = 89
};
// EnumUtils: DESCRIBE THIS
enum BuyResult
{
BUY_ERR_CANT_FIND_ITEM = 0,
@@ -141,6 +143,7 @@ enum BuyResult
BUY_ERR_REPUTATION_REQUIRE = 12
};
// EnumUtils: DESCRIBE THIS
enum SellResult
{
SELL_ERR_CANT_FIND_ITEM = 1, // The item was not found.

View File

@@ -0,0 +1,442 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Item.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/**************************************************************\
|* data for enum 'InventoryResult' in 'Item.h' auto-generated *|
\**************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<InventoryResult>::ToString(InventoryResult value)
{
switch (value)
{
case EQUIP_ERR_OK: return { "EQUIP_ERR_OK", "EQUIP_ERR_OK", "" };
case EQUIP_ERR_CANT_EQUIP_LEVEL_I: return { "EQUIP_ERR_CANT_EQUIP_LEVEL_I", "EQUIP_ERR_CANT_EQUIP_LEVEL_I", "" };
case EQUIP_ERR_CANT_EQUIP_SKILL: return { "EQUIP_ERR_CANT_EQUIP_SKILL", "EQUIP_ERR_CANT_EQUIP_SKILL", "" };
case EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT: return { "EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT", "EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT", "" };
case EQUIP_ERR_BAG_FULL: return { "EQUIP_ERR_BAG_FULL", "EQUIP_ERR_BAG_FULL", "" };
case EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG: return { "EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG", "EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG", "" };
case EQUIP_ERR_CANT_TRADE_EQUIP_BAGS: return { "EQUIP_ERR_CANT_TRADE_EQUIP_BAGS", "EQUIP_ERR_CANT_TRADE_EQUIP_BAGS", "" };
case EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE: return { "EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE", "EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE", "" };
case EQUIP_ERR_NO_REQUIRED_PROFICIENCY: return { "EQUIP_ERR_NO_REQUIRED_PROFICIENCY", "EQUIP_ERR_NO_REQUIRED_PROFICIENCY", "" };
case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE: return { "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE", "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE", "" };
case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM: return { "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM", "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM", "" };
case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2: return { "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2", "EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2", "" };
case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2: return { "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2", "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2", "" };
case EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED: return { "EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED", "EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED", "" };
case EQUIP_ERR_CANT_DUAL_WIELD: return { "EQUIP_ERR_CANT_DUAL_WIELD", "EQUIP_ERR_CANT_DUAL_WIELD", "" };
case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG: return { "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG", "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG", "" };
case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2: return { "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2", "EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2", "" };
case EQUIP_ERR_CANT_CARRY_MORE_OF_THIS: return { "EQUIP_ERR_CANT_CARRY_MORE_OF_THIS", "EQUIP_ERR_CANT_CARRY_MORE_OF_THIS", "" };
case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3: return { "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3", "EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3", "" };
case EQUIP_ERR_ITEM_CANT_STACK: return { "EQUIP_ERR_ITEM_CANT_STACK", "EQUIP_ERR_ITEM_CANT_STACK", "" };
case EQUIP_ERR_ITEM_CANT_BE_EQUIPPED: return { "EQUIP_ERR_ITEM_CANT_BE_EQUIPPED", "EQUIP_ERR_ITEM_CANT_BE_EQUIPPED", "" };
case EQUIP_ERR_ITEMS_CANT_BE_SWAPPED: return { "EQUIP_ERR_ITEMS_CANT_BE_SWAPPED", "EQUIP_ERR_ITEMS_CANT_BE_SWAPPED", "" };
case EQUIP_ERR_SLOT_IS_EMPTY: return { "EQUIP_ERR_SLOT_IS_EMPTY", "EQUIP_ERR_SLOT_IS_EMPTY", "" };
case EQUIP_ERR_ITEM_NOT_FOUND: return { "EQUIP_ERR_ITEM_NOT_FOUND", "EQUIP_ERR_ITEM_NOT_FOUND", "" };
case EQUIP_ERR_CANT_DROP_SOULBOUND: return { "EQUIP_ERR_CANT_DROP_SOULBOUND", "EQUIP_ERR_CANT_DROP_SOULBOUND", "" };
case EQUIP_ERR_OUT_OF_RANGE: return { "EQUIP_ERR_OUT_OF_RANGE", "EQUIP_ERR_OUT_OF_RANGE", "" };
case EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT: return { "EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT", "EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT", "" };
case EQUIP_ERR_COULDNT_SPLIT_ITEMS: return { "EQUIP_ERR_COULDNT_SPLIT_ITEMS", "EQUIP_ERR_COULDNT_SPLIT_ITEMS", "" };
case EQUIP_ERR_MISSING_REAGENT: return { "EQUIP_ERR_MISSING_REAGENT", "EQUIP_ERR_MISSING_REAGENT", "" };
case EQUIP_ERR_NOT_ENOUGH_MONEY: return { "EQUIP_ERR_NOT_ENOUGH_MONEY", "EQUIP_ERR_NOT_ENOUGH_MONEY", "" };
case EQUIP_ERR_NOT_A_BAG: return { "EQUIP_ERR_NOT_A_BAG", "EQUIP_ERR_NOT_A_BAG", "" };
case EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS: return { "EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS", "EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS", "" };
case EQUIP_ERR_DONT_OWN_THAT_ITEM: return { "EQUIP_ERR_DONT_OWN_THAT_ITEM", "EQUIP_ERR_DONT_OWN_THAT_ITEM", "" };
case EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER: return { "EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER", "EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER", "" };
case EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT: return { "EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT", "EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT", "" };
case EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK: return { "EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK", "EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK", "" };
case EQUIP_ERR_ITEM_LOCKED: return { "EQUIP_ERR_ITEM_LOCKED", "EQUIP_ERR_ITEM_LOCKED", "" };
case EQUIP_ERR_YOU_ARE_STUNNED: return { "EQUIP_ERR_YOU_ARE_STUNNED", "EQUIP_ERR_YOU_ARE_STUNNED", "" };
case EQUIP_ERR_YOU_ARE_DEAD: return { "EQUIP_ERR_YOU_ARE_DEAD", "EQUIP_ERR_YOU_ARE_DEAD", "" };
case EQUIP_ERR_CANT_DO_RIGHT_NOW: return { "EQUIP_ERR_CANT_DO_RIGHT_NOW", "EQUIP_ERR_CANT_DO_RIGHT_NOW", "" };
case EQUIP_ERR_INT_BAG_ERROR: return { "EQUIP_ERR_INT_BAG_ERROR", "EQUIP_ERR_INT_BAG_ERROR", "" };
case EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT: return { "EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT", "EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT", "" };
case EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH: return { "EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH", "EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH", "" };
case EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED: return { "EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED", "EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED", "" };
case EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED: return { "EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED", "EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED", "" };
case EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED: return { "EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED", "EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED", "" };
case EQUIP_ERR_BOUND_CANT_BE_WRAPPED: return { "EQUIP_ERR_BOUND_CANT_BE_WRAPPED", "EQUIP_ERR_BOUND_CANT_BE_WRAPPED", "" };
case EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED: return { "EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED", "EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED", "" };
case EQUIP_ERR_BAGS_CANT_BE_WRAPPED: return { "EQUIP_ERR_BAGS_CANT_BE_WRAPPED", "EQUIP_ERR_BAGS_CANT_BE_WRAPPED", "" };
case EQUIP_ERR_ALREADY_LOOTED: return { "EQUIP_ERR_ALREADY_LOOTED", "EQUIP_ERR_ALREADY_LOOTED", "" };
case EQUIP_ERR_INVENTORY_FULL: return { "EQUIP_ERR_INVENTORY_FULL", "EQUIP_ERR_INVENTORY_FULL", "" };
case EQUIP_ERR_BANK_FULL: return { "EQUIP_ERR_BANK_FULL", "EQUIP_ERR_BANK_FULL", "" };
case EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT: return { "EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT", "EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT", "" };
case EQUIP_ERR_BAG_FULL3: return { "EQUIP_ERR_BAG_FULL3", "EQUIP_ERR_BAG_FULL3", "" };
case EQUIP_ERR_ITEM_NOT_FOUND2: return { "EQUIP_ERR_ITEM_NOT_FOUND2", "EQUIP_ERR_ITEM_NOT_FOUND2", "" };
case EQUIP_ERR_ITEM_CANT_STACK2: return { "EQUIP_ERR_ITEM_CANT_STACK2", "EQUIP_ERR_ITEM_CANT_STACK2", "" };
case EQUIP_ERR_BAG_FULL4: return { "EQUIP_ERR_BAG_FULL4", "EQUIP_ERR_BAG_FULL4", "" };
case EQUIP_ERR_ITEM_SOLD_OUT: return { "EQUIP_ERR_ITEM_SOLD_OUT", "EQUIP_ERR_ITEM_SOLD_OUT", "" };
case EQUIP_ERR_OBJECT_IS_BUSY: return { "EQUIP_ERR_OBJECT_IS_BUSY", "EQUIP_ERR_OBJECT_IS_BUSY", "" };
case EQUIP_ERR_NONE: return { "EQUIP_ERR_NONE", "EQUIP_ERR_NONE", "" };
case EQUIP_ERR_NOT_IN_COMBAT: return { "EQUIP_ERR_NOT_IN_COMBAT", "EQUIP_ERR_NOT_IN_COMBAT", "" };
case EQUIP_ERR_NOT_WHILE_DISARMED: return { "EQUIP_ERR_NOT_WHILE_DISARMED", "EQUIP_ERR_NOT_WHILE_DISARMED", "" };
case EQUIP_ERR_BAG_FULL6: return { "EQUIP_ERR_BAG_FULL6", "EQUIP_ERR_BAG_FULL6", "" };
case EQUIP_ERR_CANT_EQUIP_RANK: return { "EQUIP_ERR_CANT_EQUIP_RANK", "EQUIP_ERR_CANT_EQUIP_RANK", "" };
case EQUIP_ERR_CANT_EQUIP_REPUTATION: return { "EQUIP_ERR_CANT_EQUIP_REPUTATION", "EQUIP_ERR_CANT_EQUIP_REPUTATION", "" };
case EQUIP_ERR_TOO_MANY_SPECIAL_BAGS: return { "EQUIP_ERR_TOO_MANY_SPECIAL_BAGS", "EQUIP_ERR_TOO_MANY_SPECIAL_BAGS", "" };
case EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW: return { "EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW", "EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW", "" };
case EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE: return { "EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE", "EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE", "" };
case EQUIP_ERR_VENDOR_MISSING_TURNINS: return { "EQUIP_ERR_VENDOR_MISSING_TURNINS", "EQUIP_ERR_VENDOR_MISSING_TURNINS", "" };
case EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS: return { "EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS", "EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS", "" };
case EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS: return { "EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS", "EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS", "" };
case EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED: return { "EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED", "EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED", "" };
case EQUIP_ERR_MAIL_BOUND_ITEM: return { "EQUIP_ERR_MAIL_BOUND_ITEM", "EQUIP_ERR_MAIL_BOUND_ITEM", "" };
case EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING: return { "EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING", "EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING", "" };
case EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED: return { "EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED", "EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED", "" };
case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED: return { "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED", "EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED", "" };
case EQUIP_ERR_TOO_MUCH_GOLD: return { "EQUIP_ERR_TOO_MUCH_GOLD", "EQUIP_ERR_TOO_MUCH_GOLD", "" };
case EQUIP_ERR_NOT_DURING_ARENA_MATCH: return { "EQUIP_ERR_NOT_DURING_ARENA_MATCH", "EQUIP_ERR_NOT_DURING_ARENA_MATCH", "" };
case EQUIP_ERR_CANNOT_TRADE_THAT: return { "EQUIP_ERR_CANNOT_TRADE_THAT", "EQUIP_ERR_CANNOT_TRADE_THAT", "" };
case EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW: return { "EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW", "EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW", "" };
case EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM: return { "EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM", "EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM", "" };
case EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS: return { "EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS", "EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS", "" };
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED", "" };
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED", "" };
case EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED: return { "EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED", "EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED", "" };
case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: return { "EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW", "EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW", "" };
case EQUIP_ERR_CANT_EQUIP_NEED_TALENT: return { "EQUIP_ERR_CANT_EQUIP_NEED_TALENT", "EQUIP_ERR_CANT_EQUIP_NEED_TALENT", "" };
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED: return { "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED", "EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<InventoryResult>::Count() { return 88; }
template <>
AC_API_EXPORT InventoryResult EnumUtils<InventoryResult>::FromIndex(size_t index)
{
switch (index)
{
case 0: return EQUIP_ERR_OK;
case 1: return EQUIP_ERR_CANT_EQUIP_LEVEL_I;
case 2: return EQUIP_ERR_CANT_EQUIP_SKILL;
case 3: return EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT;
case 4: return EQUIP_ERR_BAG_FULL;
case 5: return EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG;
case 6: return EQUIP_ERR_CANT_TRADE_EQUIP_BAGS;
case 7: return EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE;
case 8: return EQUIP_ERR_NO_REQUIRED_PROFICIENCY;
case 9: return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE;
case 10: return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM;
case 11: return EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2;
case 12: return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2;
case 13: return EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED;
case 14: return EQUIP_ERR_CANT_DUAL_WIELD;
case 15: return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
case 16: return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2;
case 17: return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
case 18: return EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3;
case 19: return EQUIP_ERR_ITEM_CANT_STACK;
case 20: return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED;
case 21: return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
case 22: return EQUIP_ERR_SLOT_IS_EMPTY;
case 23: return EQUIP_ERR_ITEM_NOT_FOUND;
case 24: return EQUIP_ERR_CANT_DROP_SOULBOUND;
case 25: return EQUIP_ERR_OUT_OF_RANGE;
case 26: return EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT;
case 27: return EQUIP_ERR_COULDNT_SPLIT_ITEMS;
case 28: return EQUIP_ERR_MISSING_REAGENT;
case 29: return EQUIP_ERR_NOT_ENOUGH_MONEY;
case 30: return EQUIP_ERR_NOT_A_BAG;
case 31: return EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS;
case 32: return EQUIP_ERR_DONT_OWN_THAT_ITEM;
case 33: return EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER;
case 34: return EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT;
case 35: return EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK;
case 36: return EQUIP_ERR_ITEM_LOCKED;
case 37: return EQUIP_ERR_YOU_ARE_STUNNED;
case 38: return EQUIP_ERR_YOU_ARE_DEAD;
case 39: return EQUIP_ERR_CANT_DO_RIGHT_NOW;
case 40: return EQUIP_ERR_INT_BAG_ERROR;
case 41: return EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT;
case 42: return EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH;
case 43: return EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED;
case 44: return EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED;
case 45: return EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED;
case 46: return EQUIP_ERR_BOUND_CANT_BE_WRAPPED;
case 47: return EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED;
case 48: return EQUIP_ERR_BAGS_CANT_BE_WRAPPED;
case 49: return EQUIP_ERR_ALREADY_LOOTED;
case 50: return EQUIP_ERR_INVENTORY_FULL;
case 51: return EQUIP_ERR_BANK_FULL;
case 52: return EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT;
case 53: return EQUIP_ERR_BAG_FULL3;
case 54: return EQUIP_ERR_ITEM_NOT_FOUND2;
case 55: return EQUIP_ERR_ITEM_CANT_STACK2;
case 56: return EQUIP_ERR_BAG_FULL4;
case 57: return EQUIP_ERR_ITEM_SOLD_OUT;
case 58: return EQUIP_ERR_OBJECT_IS_BUSY;
case 59: return EQUIP_ERR_NONE;
case 60: return EQUIP_ERR_NOT_IN_COMBAT;
case 61: return EQUIP_ERR_NOT_WHILE_DISARMED;
case 62: return EQUIP_ERR_BAG_FULL6;
case 63: return EQUIP_ERR_CANT_EQUIP_RANK;
case 64: return EQUIP_ERR_CANT_EQUIP_REPUTATION;
case 65: return EQUIP_ERR_TOO_MANY_SPECIAL_BAGS;
case 66: return EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW;
case 67: return EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE;
case 68: return EQUIP_ERR_VENDOR_MISSING_TURNINS;
case 69: return EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS;
case 70: return EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS;
case 71: return EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED;
case 72: return EQUIP_ERR_MAIL_BOUND_ITEM;
case 73: return EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING;
case 74: return EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED;
case 75: return EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED;
case 76: return EQUIP_ERR_TOO_MUCH_GOLD;
case 77: return EQUIP_ERR_NOT_DURING_ARENA_MATCH;
case 78: return EQUIP_ERR_CANNOT_TRADE_THAT;
case 79: return EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW;
case 80: return EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM;
case 81: return EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS;
case 82: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED;
case 83: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED;
case 84: return EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED;
case 85: return EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW;
case 86: return EQUIP_ERR_CANT_EQUIP_NEED_TALENT;
case 87: return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<InventoryResult>::ToIndex(InventoryResult value)
{
switch (value)
{
case EQUIP_ERR_OK: return 0;
case EQUIP_ERR_CANT_EQUIP_LEVEL_I: return 1;
case EQUIP_ERR_CANT_EQUIP_SKILL: return 2;
case EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT: return 3;
case EQUIP_ERR_BAG_FULL: return 4;
case EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG: return 5;
case EQUIP_ERR_CANT_TRADE_EQUIP_BAGS: return 6;
case EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE: return 7;
case EQUIP_ERR_NO_REQUIRED_PROFICIENCY: return 8;
case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE: return 9;
case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM: return 10;
case EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2: return 11;
case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2: return 12;
case EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED: return 13;
case EQUIP_ERR_CANT_DUAL_WIELD: return 14;
case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG: return 15;
case EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2: return 16;
case EQUIP_ERR_CANT_CARRY_MORE_OF_THIS: return 17;
case EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3: return 18;
case EQUIP_ERR_ITEM_CANT_STACK: return 19;
case EQUIP_ERR_ITEM_CANT_BE_EQUIPPED: return 20;
case EQUIP_ERR_ITEMS_CANT_BE_SWAPPED: return 21;
case EQUIP_ERR_SLOT_IS_EMPTY: return 22;
case EQUIP_ERR_ITEM_NOT_FOUND: return 23;
case EQUIP_ERR_CANT_DROP_SOULBOUND: return 24;
case EQUIP_ERR_OUT_OF_RANGE: return 25;
case EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT: return 26;
case EQUIP_ERR_COULDNT_SPLIT_ITEMS: return 27;
case EQUIP_ERR_MISSING_REAGENT: return 28;
case EQUIP_ERR_NOT_ENOUGH_MONEY: return 29;
case EQUIP_ERR_NOT_A_BAG: return 30;
case EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS: return 31;
case EQUIP_ERR_DONT_OWN_THAT_ITEM: return 32;
case EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER: return 33;
case EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT: return 34;
case EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK: return 35;
case EQUIP_ERR_ITEM_LOCKED: return 36;
case EQUIP_ERR_YOU_ARE_STUNNED: return 37;
case EQUIP_ERR_YOU_ARE_DEAD: return 38;
case EQUIP_ERR_CANT_DO_RIGHT_NOW: return 39;
case EQUIP_ERR_INT_BAG_ERROR: return 40;
case EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT: return 41;
case EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH: return 42;
case EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED: return 43;
case EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED: return 44;
case EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED: return 45;
case EQUIP_ERR_BOUND_CANT_BE_WRAPPED: return 46;
case EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED: return 47;
case EQUIP_ERR_BAGS_CANT_BE_WRAPPED: return 48;
case EQUIP_ERR_ALREADY_LOOTED: return 49;
case EQUIP_ERR_INVENTORY_FULL: return 50;
case EQUIP_ERR_BANK_FULL: return 51;
case EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT: return 52;
case EQUIP_ERR_BAG_FULL3: return 53;
case EQUIP_ERR_ITEM_NOT_FOUND2: return 54;
case EQUIP_ERR_ITEM_CANT_STACK2: return 55;
case EQUIP_ERR_BAG_FULL4: return 56;
case EQUIP_ERR_ITEM_SOLD_OUT: return 57;
case EQUIP_ERR_OBJECT_IS_BUSY: return 58;
case EQUIP_ERR_NONE: return 59;
case EQUIP_ERR_NOT_IN_COMBAT: return 60;
case EQUIP_ERR_NOT_WHILE_DISARMED: return 61;
case EQUIP_ERR_BAG_FULL6: return 62;
case EQUIP_ERR_CANT_EQUIP_RANK: return 63;
case EQUIP_ERR_CANT_EQUIP_REPUTATION: return 64;
case EQUIP_ERR_TOO_MANY_SPECIAL_BAGS: return 65;
case EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW: return 66;
case EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE: return 67;
case EQUIP_ERR_VENDOR_MISSING_TURNINS: return 68;
case EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS: return 69;
case EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS: return 70;
case EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED: return 71;
case EQUIP_ERR_MAIL_BOUND_ITEM: return 72;
case EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING: return 73;
case EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED: return 74;
case EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED: return 75;
case EQUIP_ERR_TOO_MUCH_GOLD: return 76;
case EQUIP_ERR_NOT_DURING_ARENA_MATCH: return 77;
case EQUIP_ERR_CANNOT_TRADE_THAT: return 78;
case EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW: return 79;
case EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM: return 80;
case EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS: return 81;
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED: return 82;
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED: return 83;
case EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED: return 84;
case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: return 85;
case EQUIP_ERR_CANT_EQUIP_NEED_TALENT: return 86;
case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED: return 87;
default: throw std::out_of_range("value");
}
}
/********************************************************\
|* data for enum 'BuyResult' in 'Item.h' auto-generated *|
\********************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<BuyResult>::ToString(BuyResult value)
{
switch (value)
{
case BUY_ERR_CANT_FIND_ITEM: return { "BUY_ERR_CANT_FIND_ITEM", "BUY_ERR_CANT_FIND_ITEM", "" };
case BUY_ERR_ITEM_ALREADY_SOLD: return { "BUY_ERR_ITEM_ALREADY_SOLD", "BUY_ERR_ITEM_ALREADY_SOLD", "" };
case BUY_ERR_NOT_ENOUGHT_MONEY: return { "BUY_ERR_NOT_ENOUGHT_MONEY", "BUY_ERR_NOT_ENOUGHT_MONEY", "" };
case BUY_ERR_SELLER_DONT_LIKE_YOU: return { "BUY_ERR_SELLER_DONT_LIKE_YOU", "BUY_ERR_SELLER_DONT_LIKE_YOU", "" };
case BUY_ERR_DISTANCE_TOO_FAR: return { "BUY_ERR_DISTANCE_TOO_FAR", "BUY_ERR_DISTANCE_TOO_FAR", "" };
case BUY_ERR_ITEM_SOLD_OUT: return { "BUY_ERR_ITEM_SOLD_OUT", "BUY_ERR_ITEM_SOLD_OUT", "" };
case BUY_ERR_CANT_CARRY_MORE: return { "BUY_ERR_CANT_CARRY_MORE", "BUY_ERR_CANT_CARRY_MORE", "" };
case BUY_ERR_RANK_REQUIRE: return { "BUY_ERR_RANK_REQUIRE", "BUY_ERR_RANK_REQUIRE", "" };
case BUY_ERR_REPUTATION_REQUIRE: return { "BUY_ERR_REPUTATION_REQUIRE", "BUY_ERR_REPUTATION_REQUIRE", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<BuyResult>::Count() { return 9; }
template <>
AC_API_EXPORT BuyResult EnumUtils<BuyResult>::FromIndex(size_t index)
{
switch (index)
{
case 0: return BUY_ERR_CANT_FIND_ITEM;
case 1: return BUY_ERR_ITEM_ALREADY_SOLD;
case 2: return BUY_ERR_NOT_ENOUGHT_MONEY;
case 3: return BUY_ERR_SELLER_DONT_LIKE_YOU;
case 4: return BUY_ERR_DISTANCE_TOO_FAR;
case 5: return BUY_ERR_ITEM_SOLD_OUT;
case 6: return BUY_ERR_CANT_CARRY_MORE;
case 7: return BUY_ERR_RANK_REQUIRE;
case 8: return BUY_ERR_REPUTATION_REQUIRE;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<BuyResult>::ToIndex(BuyResult value)
{
switch (value)
{
case BUY_ERR_CANT_FIND_ITEM: return 0;
case BUY_ERR_ITEM_ALREADY_SOLD: return 1;
case BUY_ERR_NOT_ENOUGHT_MONEY: return 2;
case BUY_ERR_SELLER_DONT_LIKE_YOU: return 3;
case BUY_ERR_DISTANCE_TOO_FAR: return 4;
case BUY_ERR_ITEM_SOLD_OUT: return 5;
case BUY_ERR_CANT_CARRY_MORE: return 6;
case BUY_ERR_RANK_REQUIRE: return 7;
case BUY_ERR_REPUTATION_REQUIRE: return 8;
default: throw std::out_of_range("value");
}
}
/*********************************************************\
|* data for enum 'SellResult' in 'Item.h' auto-generated *|
\*********************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<SellResult>::ToString(SellResult value)
{
switch (value)
{
case SELL_ERR_CANT_FIND_ITEM: return { "SELL_ERR_CANT_FIND_ITEM", "SELL_ERR_CANT_FIND_ITEM", "The item was not found." };
case SELL_ERR_CANT_SELL_ITEM: return { "SELL_ERR_CANT_SELL_ITEM", "SELL_ERR_CANT_SELL_ITEM", "The merchant doesn't want that item." };
case SELL_ERR_CANT_FIND_VENDOR: return { "SELL_ERR_CANT_FIND_VENDOR", "SELL_ERR_CANT_FIND_VENDOR", "The merchant doesn't like you." };
case SELL_ERR_YOU_DONT_OWN_THAT_ITEM: return { "SELL_ERR_YOU_DONT_OWN_THAT_ITEM", "SELL_ERR_YOU_DONT_OWN_THAT_ITEM", "You don't own that item." };
case SELL_ERR_UNK: return { "SELL_ERR_UNK", "SELL_ERR_UNK", "Nothing appears..." };
case SELL_ERR_ONLY_EMPTY_BAG: return { "SELL_ERR_ONLY_EMPTY_BAG", "SELL_ERR_ONLY_EMPTY_BAG", "You can only do that with empty bags." };
case SELL_ERR_CANT_SELL_TO_THIS_MERCHANT: return { "SELL_ERR_CANT_SELL_TO_THIS_MERCHANT", "SELL_ERR_CANT_SELL_TO_THIS_MERCHANT", "You cannot sell items to this merchant." };
case SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE: return { "SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE", "SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE", "You must repair that item's durability to use it." };
case SELL_INTERNAL_BAG_ERROR: return { "SELL_INTERNAL_BAG_ERROR", "SELL_INTERNAL_BAG_ERROR", "Internal Bag Error" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<SellResult>::Count() { return 9; }
template <>
AC_API_EXPORT SellResult EnumUtils<SellResult>::FromIndex(size_t index)
{
switch (index)
{
case 0: return SELL_ERR_CANT_FIND_ITEM;
case 1: return SELL_ERR_CANT_SELL_ITEM;
case 2: return SELL_ERR_CANT_FIND_VENDOR;
case 3: return SELL_ERR_YOU_DONT_OWN_THAT_ITEM;
case 4: return SELL_ERR_UNK;
case 5: return SELL_ERR_ONLY_EMPTY_BAG;
case 6: return SELL_ERR_CANT_SELL_TO_THIS_MERCHANT;
case 7: return SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE;
case 8: return SELL_INTERNAL_BAG_ERROR;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<SellResult>::ToIndex(SellResult value)
{
switch (value)
{
case SELL_ERR_CANT_FIND_ITEM: return 0;
case SELL_ERR_CANT_SELL_ITEM: return 1;
case SELL_ERR_CANT_FIND_VENDOR: return 2;
case SELL_ERR_YOU_DONT_OWN_THAT_ITEM: return 3;
case SELL_ERR_UNK: return 4;
case SELL_ERR_ONLY_EMPTY_BAG: return 5;
case SELL_ERR_CANT_SELL_TO_THIS_MERCHANT: return 6;
case SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE: return 7;
case SELL_INTERNAL_BAG_ERROR: return 8;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -599,6 +599,7 @@ enum DamageEffectType
};
// Value masks for UNIT_FIELD_FLAGS
// EnumUtils: DESCRIBE THIS
enum UnitFlags
{
UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, // set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner
@@ -659,7 +660,8 @@ enum UnitFlags2
};
/// Non Player Character flags
enum NPCFlags
// EnumUtils: DESCRIBE THIS
enum NPCFlags : uint32
{
UNIT_NPC_FLAG_NONE = 0x00000000, // SKIP
UNIT_NPC_FLAG_GOSSIP = 0x00000001, // TITLE has gossip menu DESCRIPTION 100%

View File

@@ -0,0 +1,268 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Unit.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/********************************************************\
|* data for enum 'UnitFlags' in 'Unit.h' auto-generated *|
\********************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<UnitFlags>::ToString(UnitFlags value)
{
switch (value)
{
case UNIT_FLAG_SERVER_CONTROLLED: return { "UNIT_FLAG_SERVER_CONTROLLED", "UNIT_FLAG_SERVER_CONTROLLED", "set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner" };
case UNIT_FLAG_NON_ATTACKABLE: return { "UNIT_FLAG_NON_ATTACKABLE", "UNIT_FLAG_NON_ATTACKABLE", "not attackable" };
case UNIT_FLAG_DISABLE_MOVE: return { "UNIT_FLAG_DISABLE_MOVE", "UNIT_FLAG_DISABLE_MOVE", "" };
case UNIT_FLAG_PLAYER_CONTROLLED: return { "UNIT_FLAG_PLAYER_CONTROLLED", "UNIT_FLAG_PLAYER_CONTROLLED", "controlled by player, use _IMMUNE_TO_PC instead of _IMMUNE_TO_NPC" };
case UNIT_FLAG_RENAME: return { "UNIT_FLAG_RENAME", "UNIT_FLAG_RENAME", "" };
case UNIT_FLAG_PREPARATION: return { "UNIT_FLAG_PREPARATION", "UNIT_FLAG_PREPARATION", "don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA" };
case UNIT_FLAG_UNK_6: return { "UNIT_FLAG_UNK_6", "UNIT_FLAG_UNK_6", "" };
case UNIT_FLAG_NOT_ATTACKABLE_1: return { "UNIT_FLAG_NOT_ATTACKABLE_1", "UNIT_FLAG_NOT_ATTACKABLE_1", "?? (UNIT_FLAG_PLAYER_CONTROLLED | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE" };
case UNIT_FLAG_IMMUNE_TO_PC: return { "UNIT_FLAG_IMMUNE_TO_PC", "UNIT_FLAG_IMMUNE_TO_PC", "disables combat/assistance with PlayerCharacters (PC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget" };
case UNIT_FLAG_IMMUNE_TO_NPC: return { "UNIT_FLAG_IMMUNE_TO_NPC", "UNIT_FLAG_IMMUNE_TO_NPC", "disables combat/assistance with NonPlayerCharacters (NPC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget" };
case UNIT_FLAG_LOOTING: return { "UNIT_FLAG_LOOTING", "UNIT_FLAG_LOOTING", "loot animation" };
case UNIT_FLAG_PET_IN_COMBAT: return { "UNIT_FLAG_PET_IN_COMBAT", "UNIT_FLAG_PET_IN_COMBAT", "in combat?, 2.0.8" };
case UNIT_FLAG_PVP: return { "UNIT_FLAG_PVP", "UNIT_FLAG_PVP", "changed in 3.0.3" };
case UNIT_FLAG_SILENCED: return { "UNIT_FLAG_SILENCED", "UNIT_FLAG_SILENCED", "silenced, 2.1.1" };
case UNIT_FLAG_CANNOT_SWIM: return { "UNIT_FLAG_CANNOT_SWIM", "UNIT_FLAG_CANNOT_SWIM", "2.0.8" };
case UNIT_FLAG_SWIMMING: return { "UNIT_FLAG_SWIMMING", "UNIT_FLAG_SWIMMING", "shows swim animation in water" };
case UNIT_FLAG_NON_ATTACKABLE_2: return { "UNIT_FLAG_NON_ATTACKABLE_2", "UNIT_FLAG_NON_ATTACKABLE_2", "removes attackable icon, if on yourself, cannot assist self but can cast TARGET_SELF spells - added by SPELL_AURA_MOD_UNATTACKABLE" };
case UNIT_FLAG_PACIFIED: return { "UNIT_FLAG_PACIFIED", "UNIT_FLAG_PACIFIED", "3.0.3 ok" };
case UNIT_FLAG_STUNNED: return { "UNIT_FLAG_STUNNED", "UNIT_FLAG_STUNNED", "3.0.3 ok" };
case UNIT_FLAG_IN_COMBAT: return { "UNIT_FLAG_IN_COMBAT", "UNIT_FLAG_IN_COMBAT", "" };
case UNIT_FLAG_TAXI_FLIGHT: return { "UNIT_FLAG_TAXI_FLIGHT", "UNIT_FLAG_TAXI_FLIGHT", "disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag" };
case UNIT_FLAG_DISARMED: return { "UNIT_FLAG_DISARMED", "UNIT_FLAG_DISARMED", "3.0.3, disable melee spells casting..., \042Required melee weapon\042 added to melee spells tooltip." };
case UNIT_FLAG_CONFUSED: return { "UNIT_FLAG_CONFUSED", "UNIT_FLAG_CONFUSED", "" };
case UNIT_FLAG_FLEEING: return { "UNIT_FLAG_FLEEING", "UNIT_FLAG_FLEEING", "" };
case UNIT_FLAG_POSSESSED: return { "UNIT_FLAG_POSSESSED", "UNIT_FLAG_POSSESSED", "under direct client control by a player (possess or vehicle)" };
case UNIT_FLAG_NOT_SELECTABLE: return { "UNIT_FLAG_NOT_SELECTABLE", "UNIT_FLAG_NOT_SELECTABLE", "" };
case UNIT_FLAG_SKINNABLE: return { "UNIT_FLAG_SKINNABLE", "UNIT_FLAG_SKINNABLE", "" };
case UNIT_FLAG_MOUNT: return { "UNIT_FLAG_MOUNT", "UNIT_FLAG_MOUNT", "" };
case UNIT_FLAG_UNK_28: return { "UNIT_FLAG_UNK_28", "UNIT_FLAG_UNK_28", "" };
case UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT: return { "UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT", "UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT", "Prevent automatically playing emotes from parsing chat text, for example \042lol\042 in /say, ending message with ? or !, or using /yell" };
case UNIT_FLAG_SHEATHE: return { "UNIT_FLAG_SHEATHE", "UNIT_FLAG_SHEATHE", "" };
case UNIT_FLAG_IMMUNE: return { "UNIT_FLAG_IMMUNE", "UNIT_FLAG_IMMUNE", "Immune to damage" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<UnitFlags>::Count() { return 32; }
template <>
AC_API_EXPORT UnitFlags EnumUtils<UnitFlags>::FromIndex(size_t index)
{
switch (index)
{
case 0: return UNIT_FLAG_SERVER_CONTROLLED;
case 1: return UNIT_FLAG_NON_ATTACKABLE;
case 2: return UNIT_FLAG_DISABLE_MOVE;
case 3: return UNIT_FLAG_PLAYER_CONTROLLED;
case 4: return UNIT_FLAG_RENAME;
case 5: return UNIT_FLAG_PREPARATION;
case 6: return UNIT_FLAG_UNK_6;
case 7: return UNIT_FLAG_NOT_ATTACKABLE_1;
case 8: return UNIT_FLAG_IMMUNE_TO_PC;
case 9: return UNIT_FLAG_IMMUNE_TO_NPC;
case 10: return UNIT_FLAG_LOOTING;
case 11: return UNIT_FLAG_PET_IN_COMBAT;
case 12: return UNIT_FLAG_PVP;
case 13: return UNIT_FLAG_SILENCED;
case 14: return UNIT_FLAG_CANNOT_SWIM;
case 15: return UNIT_FLAG_SWIMMING;
case 16: return UNIT_FLAG_NON_ATTACKABLE_2;
case 17: return UNIT_FLAG_PACIFIED;
case 18: return UNIT_FLAG_STUNNED;
case 19: return UNIT_FLAG_IN_COMBAT;
case 20: return UNIT_FLAG_TAXI_FLIGHT;
case 21: return UNIT_FLAG_DISARMED;
case 22: return UNIT_FLAG_CONFUSED;
case 23: return UNIT_FLAG_FLEEING;
case 24: return UNIT_FLAG_POSSESSED;
case 25: return UNIT_FLAG_NOT_SELECTABLE;
case 26: return UNIT_FLAG_SKINNABLE;
case 27: return UNIT_FLAG_MOUNT;
case 28: return UNIT_FLAG_UNK_28;
case 29: return UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT;
case 30: return UNIT_FLAG_SHEATHE;
case 31: return UNIT_FLAG_IMMUNE;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<UnitFlags>::ToIndex(UnitFlags value)
{
switch (value)
{
case UNIT_FLAG_SERVER_CONTROLLED: return 0;
case UNIT_FLAG_NON_ATTACKABLE: return 1;
case UNIT_FLAG_DISABLE_MOVE: return 2;
case UNIT_FLAG_PLAYER_CONTROLLED: return 3;
case UNIT_FLAG_RENAME: return 4;
case UNIT_FLAG_PREPARATION: return 5;
case UNIT_FLAG_UNK_6: return 6;
case UNIT_FLAG_NOT_ATTACKABLE_1: return 7;
case UNIT_FLAG_IMMUNE_TO_PC: return 8;
case UNIT_FLAG_IMMUNE_TO_NPC: return 9;
case UNIT_FLAG_LOOTING: return 10;
case UNIT_FLAG_PET_IN_COMBAT: return 11;
case UNIT_FLAG_PVP: return 12;
case UNIT_FLAG_SILENCED: return 13;
case UNIT_FLAG_CANNOT_SWIM: return 14;
case UNIT_FLAG_SWIMMING: return 15;
case UNIT_FLAG_NON_ATTACKABLE_2: return 16;
case UNIT_FLAG_PACIFIED: return 17;
case UNIT_FLAG_STUNNED: return 18;
case UNIT_FLAG_IN_COMBAT: return 19;
case UNIT_FLAG_TAXI_FLIGHT: return 20;
case UNIT_FLAG_DISARMED: return 21;
case UNIT_FLAG_CONFUSED: return 22;
case UNIT_FLAG_FLEEING: return 23;
case UNIT_FLAG_POSSESSED: return 24;
case UNIT_FLAG_NOT_SELECTABLE: return 25;
case UNIT_FLAG_SKINNABLE: return 26;
case UNIT_FLAG_MOUNT: return 27;
case UNIT_FLAG_UNK_28: return 28;
case UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT: return 29;
case UNIT_FLAG_SHEATHE: return 30;
case UNIT_FLAG_IMMUNE: return 31;
default: throw std::out_of_range("value");
}
}
/*******************************************************\
|* data for enum 'NPCFlags' in 'Unit.h' auto-generated *|
\*******************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<NPCFlags>::ToString(NPCFlags value)
{
switch (value)
{
case UNIT_NPC_FLAG_GOSSIP: return { "UNIT_NPC_FLAG_GOSSIP", "has gossip menu", "100%" };
case UNIT_NPC_FLAG_QUESTGIVER: return { "UNIT_NPC_FLAG_QUESTGIVER", "is quest giver", "guessed, probably ok" };
case UNIT_NPC_FLAG_UNK1: return { "UNIT_NPC_FLAG_UNK1", "UNIT_NPC_FLAG_UNK1", "" };
case UNIT_NPC_FLAG_UNK2: return { "UNIT_NPC_FLAG_UNK2", "UNIT_NPC_FLAG_UNK2", "" };
case UNIT_NPC_FLAG_TRAINER: return { "UNIT_NPC_FLAG_TRAINER", "is trainer", "100%" };
case UNIT_NPC_FLAG_TRAINER_CLASS: return { "UNIT_NPC_FLAG_TRAINER_CLASS", "is class trainer", "100%" };
case UNIT_NPC_FLAG_TRAINER_PROFESSION: return { "UNIT_NPC_FLAG_TRAINER_PROFESSION", "is profession trainer", "100%" };
case UNIT_NPC_FLAG_VENDOR: return { "UNIT_NPC_FLAG_VENDOR", "is vendor (generic)", "100%" };
case UNIT_NPC_FLAG_VENDOR_AMMO: return { "UNIT_NPC_FLAG_VENDOR_AMMO", "is vendor (ammo)", "100%, general goods vendor" };
case UNIT_NPC_FLAG_VENDOR_FOOD: return { "UNIT_NPC_FLAG_VENDOR_FOOD", "is vendor (food)", "100%" };
case UNIT_NPC_FLAG_VENDOR_POISON: return { "UNIT_NPC_FLAG_VENDOR_POISON", "is vendor (poison)", "guessed" };
case UNIT_NPC_FLAG_VENDOR_REAGENT: return { "UNIT_NPC_FLAG_VENDOR_REAGENT", "is vendor (reagents)", "100%" };
case UNIT_NPC_FLAG_REPAIR: return { "UNIT_NPC_FLAG_REPAIR", "can repair", "100%" };
case UNIT_NPC_FLAG_FLIGHTMASTER: return { "UNIT_NPC_FLAG_FLIGHTMASTER", "is flight master", "100%" };
case UNIT_NPC_FLAG_SPIRITHEALER: return { "UNIT_NPC_FLAG_SPIRITHEALER", "is spirit healer", "guessed" };
case UNIT_NPC_FLAG_SPIRITGUIDE: return { "UNIT_NPC_FLAG_SPIRITGUIDE", "is spirit guide", "guessed" };
case UNIT_NPC_FLAG_INNKEEPER: return { "UNIT_NPC_FLAG_INNKEEPER", "is innkeeper", "" };
case UNIT_NPC_FLAG_BANKER: return { "UNIT_NPC_FLAG_BANKER", "is banker", "100%" };
case UNIT_NPC_FLAG_PETITIONER: return { "UNIT_NPC_FLAG_PETITIONER", "handles guild/arena petitions", "100% 0xC0000 = guild petitions, 0x40000 = arena team petitions" };
case UNIT_NPC_FLAG_TABARDDESIGNER: return { "UNIT_NPC_FLAG_TABARDDESIGNER", "is guild tabard designer", "100%" };
case UNIT_NPC_FLAG_BATTLEMASTER: return { "UNIT_NPC_FLAG_BATTLEMASTER", "is battlemaster", "100%" };
case UNIT_NPC_FLAG_AUCTIONEER: return { "UNIT_NPC_FLAG_AUCTIONEER", "is auctioneer", "100%" };
case UNIT_NPC_FLAG_STABLEMASTER: return { "UNIT_NPC_FLAG_STABLEMASTER", "is stable master", "100%" };
case UNIT_NPC_FLAG_GUILD_BANKER: return { "UNIT_NPC_FLAG_GUILD_BANKER", "is guild banker", "cause client to send 997 opcode" };
case UNIT_NPC_FLAG_SPELLCLICK: return { "UNIT_NPC_FLAG_SPELLCLICK", "has spell click enabled", "cause client to send 1015 opcode (spell click)" };
case UNIT_NPC_FLAG_PLAYER_VEHICLE: return { "UNIT_NPC_FLAG_PLAYER_VEHICLE", "is player vehicle", "players with mounts that have vehicle data should have it set" };
case UNIT_NPC_FLAG_MAILBOX: return { "UNIT_NPC_FLAG_MAILBOX", "is mailbox", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<NPCFlags>::Count() { return 27; }
template <>
AC_API_EXPORT NPCFlags EnumUtils<NPCFlags>::FromIndex(size_t index)
{
switch (index)
{
case 0: return UNIT_NPC_FLAG_GOSSIP;
case 1: return UNIT_NPC_FLAG_QUESTGIVER;
case 2: return UNIT_NPC_FLAG_UNK1;
case 3: return UNIT_NPC_FLAG_UNK2;
case 4: return UNIT_NPC_FLAG_TRAINER;
case 5: return UNIT_NPC_FLAG_TRAINER_CLASS;
case 6: return UNIT_NPC_FLAG_TRAINER_PROFESSION;
case 7: return UNIT_NPC_FLAG_VENDOR;
case 8: return UNIT_NPC_FLAG_VENDOR_AMMO;
case 9: return UNIT_NPC_FLAG_VENDOR_FOOD;
case 10: return UNIT_NPC_FLAG_VENDOR_POISON;
case 11: return UNIT_NPC_FLAG_VENDOR_REAGENT;
case 12: return UNIT_NPC_FLAG_REPAIR;
case 13: return UNIT_NPC_FLAG_FLIGHTMASTER;
case 14: return UNIT_NPC_FLAG_SPIRITHEALER;
case 15: return UNIT_NPC_FLAG_SPIRITGUIDE;
case 16: return UNIT_NPC_FLAG_INNKEEPER;
case 17: return UNIT_NPC_FLAG_BANKER;
case 18: return UNIT_NPC_FLAG_PETITIONER;
case 19: return UNIT_NPC_FLAG_TABARDDESIGNER;
case 20: return UNIT_NPC_FLAG_BATTLEMASTER;
case 21: return UNIT_NPC_FLAG_AUCTIONEER;
case 22: return UNIT_NPC_FLAG_STABLEMASTER;
case 23: return UNIT_NPC_FLAG_GUILD_BANKER;
case 24: return UNIT_NPC_FLAG_SPELLCLICK;
case 25: return UNIT_NPC_FLAG_PLAYER_VEHICLE;
case 26: return UNIT_NPC_FLAG_MAILBOX;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<NPCFlags>::ToIndex(NPCFlags value)
{
switch (value)
{
case UNIT_NPC_FLAG_GOSSIP: return 0;
case UNIT_NPC_FLAG_QUESTGIVER: return 1;
case UNIT_NPC_FLAG_UNK1: return 2;
case UNIT_NPC_FLAG_UNK2: return 3;
case UNIT_NPC_FLAG_TRAINER: return 4;
case UNIT_NPC_FLAG_TRAINER_CLASS: return 5;
case UNIT_NPC_FLAG_TRAINER_PROFESSION: return 6;
case UNIT_NPC_FLAG_VENDOR: return 7;
case UNIT_NPC_FLAG_VENDOR_AMMO: return 8;
case UNIT_NPC_FLAG_VENDOR_FOOD: return 9;
case UNIT_NPC_FLAG_VENDOR_POISON: return 10;
case UNIT_NPC_FLAG_VENDOR_REAGENT: return 11;
case UNIT_NPC_FLAG_REPAIR: return 12;
case UNIT_NPC_FLAG_FLIGHTMASTER: return 13;
case UNIT_NPC_FLAG_SPIRITHEALER: return 14;
case UNIT_NPC_FLAG_SPIRITGUIDE: return 15;
case UNIT_NPC_FLAG_INNKEEPER: return 16;
case UNIT_NPC_FLAG_BANKER: return 17;
case UNIT_NPC_FLAG_PETITIONER: return 18;
case UNIT_NPC_FLAG_TABARDDESIGNER: return 19;
case UNIT_NPC_FLAG_BATTLEMASTER: return 20;
case UNIT_NPC_FLAG_AUCTIONEER: return 21;
case UNIT_NPC_FLAG_STABLEMASTER: return 22;
case UNIT_NPC_FLAG_GUILD_BANKER: return 23;
case UNIT_NPC_FLAG_SPELLCLICK: return 24;
case UNIT_NPC_FLAG_PLAYER_VEHICLE: return 25;
case UNIT_NPC_FLAG_MAILBOX: return 26;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -42,24 +42,26 @@ class ObjectMgr;
#define QUEST_EMOTE_COUNT 4
#define QUEST_PVP_KILL_SLOT 0
enum QuestFailedReasons
// EnumUtils: DESCRIBE THIS
enum QuestFailedReason : uint32
{
INVALIDREASON_DONT_HAVE_REQ = 0,
INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, // You are not high enough level for that quest.
INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, // That quest is not available to your race.
INVALIDREASON_QUEST_ALREADY_DONE = 7, // You have completed that quest.
INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, // You can only be on one timed quest at a time.
INVALIDREASON_QUEST_ALREADY_ON = 13, // You are already on that quest.
INVALIDREASON_QUEST_FAILED_EXPANSION = 16, // This quest requires an expansion enabled account.
INVALIDREASON_QUEST_ALREADY_ON2 = 18, // You are already on that quest.
INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, // You don't have the required items with you. Check storage.
INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, // You don't have enough money for that quest.
INVALIDREASON_DAILY_QUESTS_REMAINING = 26, // You have already completed 25 daily quests today.
INVALIDREASON_QUEST_FAILED_CAIS = 27, // You cannot complete quests once you have reached tired time.
INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY = 29 // You have completed that daily quest today.
INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1, // DESCRIPTION You are not high enough level for that quest.
INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6, // DESCRIPTION That quest is not available to your race.
INVALIDREASON_QUEST_ALREADY_DONE = 7, // DESCRIPTION You have completed that quest.
INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12, // DESCRIPTION You can only be on one timed quest at a time.
INVALIDREASON_QUEST_ALREADY_ON = 13, // DESCRIPTION You are already on that quest.
INVALIDREASON_QUEST_FAILED_EXPANSION = 16, // DESCRIPTION This quest requires an expansion enabled account.
INVALIDREASON_QUEST_ALREADY_ON2 = 18, // DESCRIPTION You are already on that quest.
INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21, // DESCRIPTION You don't have the required items with you. Check storage.
INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23, // DESCRIPTION You don't have enough money for that quest.
INVALIDREASON_DAILY_QUESTS_REMAINING = 26, // DESCRIPTION You have already completed 25 daily quests today.
INVALIDREASON_QUEST_FAILED_CAIS = 27, // DESCRIPTION You cannot complete quests once you have reached tired time.
INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY = 29 // DESCRIPTION You have completed that daily quest today.
};
enum QuestShareMessages
// EnumUtils: DESCRIBE THIS
enum QuestShareMessages : uint8
{
QUEST_PARTY_MSG_SHARING_QUEST = 0,
QUEST_PARTY_MSG_CANT_TAKE_QUEST = 1,

View File

@@ -0,0 +1,163 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "QuestDef.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/********************************************************************\
|* data for enum 'QuestFailedReason' in 'QuestDef.h' auto-generated *|
\********************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<QuestFailedReason>::ToString(QuestFailedReason value)
{
switch (value)
{
case INVALIDREASON_DONT_HAVE_REQ: return { "INVALIDREASON_DONT_HAVE_REQ", "INVALIDREASON_DONT_HAVE_REQ", "" };
case INVALIDREASON_QUEST_FAILED_LOW_LEVEL: return { "INVALIDREASON_QUEST_FAILED_LOW_LEVEL", "INVALIDREASON_QUEST_FAILED_LOW_LEVEL", "You are not high enough level for that quest." };
case INVALIDREASON_QUEST_FAILED_WRONG_RACE: return { "INVALIDREASON_QUEST_FAILED_WRONG_RACE", "INVALIDREASON_QUEST_FAILED_WRONG_RACE", "That quest is not available to your race." };
case INVALIDREASON_QUEST_ALREADY_DONE: return { "INVALIDREASON_QUEST_ALREADY_DONE", "INVALIDREASON_QUEST_ALREADY_DONE", "You have completed that quest." };
case INVALIDREASON_QUEST_ONLY_ONE_TIMED: return { "INVALIDREASON_QUEST_ONLY_ONE_TIMED", "INVALIDREASON_QUEST_ONLY_ONE_TIMED", "You can only be on one timed quest at a time." };
case INVALIDREASON_QUEST_ALREADY_ON: return { "INVALIDREASON_QUEST_ALREADY_ON", "INVALIDREASON_QUEST_ALREADY_ON", "You are already on that quest." };
case INVALIDREASON_QUEST_FAILED_EXPANSION: return { "INVALIDREASON_QUEST_FAILED_EXPANSION", "INVALIDREASON_QUEST_FAILED_EXPANSION", "This quest requires an expansion enabled account." };
case INVALIDREASON_QUEST_ALREADY_ON2: return { "INVALIDREASON_QUEST_ALREADY_ON2", "INVALIDREASON_QUEST_ALREADY_ON2", "You are already on that quest." };
case INVALIDREASON_QUEST_FAILED_MISSING_ITEMS: return { "INVALIDREASON_QUEST_FAILED_MISSING_ITEMS", "INVALIDREASON_QUEST_FAILED_MISSING_ITEMS", "You don't have the required items with you. Check storage." };
case INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY: return { "INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY", "INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY", "You don't have enough money for that quest." };
case INVALIDREASON_DAILY_QUESTS_REMAINING: return { "INVALIDREASON_DAILY_QUESTS_REMAINING", "INVALIDREASON_DAILY_QUESTS_REMAINING", "You have already completed 25 daily quests today." };
case INVALIDREASON_QUEST_FAILED_CAIS: return { "INVALIDREASON_QUEST_FAILED_CAIS", "INVALIDREASON_QUEST_FAILED_CAIS", "You cannot complete quests once you have reached tired time." };
case INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY: return { "INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY", "INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY", "You have completed that daily quest today." };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<QuestFailedReason>::Count() { return 13; }
template <>
AC_API_EXPORT QuestFailedReason EnumUtils<QuestFailedReason>::FromIndex(size_t index)
{
switch (index)
{
case 0: return INVALIDREASON_DONT_HAVE_REQ;
case 1: return INVALIDREASON_QUEST_FAILED_LOW_LEVEL;
case 2: return INVALIDREASON_QUEST_FAILED_WRONG_RACE;
case 3: return INVALIDREASON_QUEST_ALREADY_DONE;
case 4: return INVALIDREASON_QUEST_ONLY_ONE_TIMED;
case 5: return INVALIDREASON_QUEST_ALREADY_ON;
case 6: return INVALIDREASON_QUEST_FAILED_EXPANSION;
case 7: return INVALIDREASON_QUEST_ALREADY_ON2;
case 8: return INVALIDREASON_QUEST_FAILED_MISSING_ITEMS;
case 9: return INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY;
case 10: return INVALIDREASON_DAILY_QUESTS_REMAINING;
case 11: return INVALIDREASON_QUEST_FAILED_CAIS;
case 12: return INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<QuestFailedReason>::ToIndex(QuestFailedReason value)
{
switch (value)
{
case INVALIDREASON_DONT_HAVE_REQ: return 0;
case INVALIDREASON_QUEST_FAILED_LOW_LEVEL: return 1;
case INVALIDREASON_QUEST_FAILED_WRONG_RACE: return 2;
case INVALIDREASON_QUEST_ALREADY_DONE: return 3;
case INVALIDREASON_QUEST_ONLY_ONE_TIMED: return 4;
case INVALIDREASON_QUEST_ALREADY_ON: return 5;
case INVALIDREASON_QUEST_FAILED_EXPANSION: return 6;
case INVALIDREASON_QUEST_ALREADY_ON2: return 7;
case INVALIDREASON_QUEST_FAILED_MISSING_ITEMS: return 8;
case INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY: return 9;
case INVALIDREASON_DAILY_QUESTS_REMAINING: return 10;
case INVALIDREASON_QUEST_FAILED_CAIS: return 11;
case INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY: return 12;
default: throw std::out_of_range("value");
}
}
/*********************************************************************\
|* data for enum 'QuestShareMessages' in 'QuestDef.h' auto-generated *|
\*********************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<QuestShareMessages>::ToString(QuestShareMessages value)
{
switch (value)
{
case QUEST_PARTY_MSG_SHARING_QUEST: return { "QUEST_PARTY_MSG_SHARING_QUEST", "QUEST_PARTY_MSG_SHARING_QUEST", "" };
case QUEST_PARTY_MSG_CANT_TAKE_QUEST: return { "QUEST_PARTY_MSG_CANT_TAKE_QUEST", "QUEST_PARTY_MSG_CANT_TAKE_QUEST", "" };
case QUEST_PARTY_MSG_ACCEPT_QUEST: return { "QUEST_PARTY_MSG_ACCEPT_QUEST", "QUEST_PARTY_MSG_ACCEPT_QUEST", "" };
case QUEST_PARTY_MSG_DECLINE_QUEST: return { "QUEST_PARTY_MSG_DECLINE_QUEST", "QUEST_PARTY_MSG_DECLINE_QUEST", "" };
case QUEST_PARTY_MSG_BUSY: return { "QUEST_PARTY_MSG_BUSY", "QUEST_PARTY_MSG_BUSY", "" };
case QUEST_PARTY_MSG_LOG_FULL: return { "QUEST_PARTY_MSG_LOG_FULL", "QUEST_PARTY_MSG_LOG_FULL", "" };
case QUEST_PARTY_MSG_HAVE_QUEST: return { "QUEST_PARTY_MSG_HAVE_QUEST", "QUEST_PARTY_MSG_HAVE_QUEST", "" };
case QUEST_PARTY_MSG_FINISH_QUEST: return { "QUEST_PARTY_MSG_FINISH_QUEST", "QUEST_PARTY_MSG_FINISH_QUEST", "" };
case QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY: return { "QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY", "QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY", "" };
case QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED: return { "QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED", "QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED", "" };
case QUEST_PARTY_MSG_NOT_IN_PARTY: return { "QUEST_PARTY_MSG_NOT_IN_PARTY", "QUEST_PARTY_MSG_NOT_IN_PARTY", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<QuestShareMessages>::Count() { return 11; }
template <>
AC_API_EXPORT QuestShareMessages EnumUtils<QuestShareMessages>::FromIndex(size_t index)
{
switch (index)
{
case 0: return QUEST_PARTY_MSG_SHARING_QUEST;
case 1: return QUEST_PARTY_MSG_CANT_TAKE_QUEST;
case 2: return QUEST_PARTY_MSG_ACCEPT_QUEST;
case 3: return QUEST_PARTY_MSG_DECLINE_QUEST;
case 4: return QUEST_PARTY_MSG_BUSY;
case 5: return QUEST_PARTY_MSG_LOG_FULL;
case 6: return QUEST_PARTY_MSG_HAVE_QUEST;
case 7: return QUEST_PARTY_MSG_FINISH_QUEST;
case 8: return QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY;
case 9: return QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED;
case 10: return QUEST_PARTY_MSG_NOT_IN_PARTY;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<QuestShareMessages>::ToIndex(QuestShareMessages value)
{
switch (value)
{
case QUEST_PARTY_MSG_SHARING_QUEST: return 0;
case QUEST_PARTY_MSG_CANT_TAKE_QUEST: return 1;
case QUEST_PARTY_MSG_ACCEPT_QUEST: return 2;
case QUEST_PARTY_MSG_DECLINE_QUEST: return 3;
case QUEST_PARTY_MSG_BUSY: return 4;
case QUEST_PARTY_MSG_LOG_FULL: return 5;
case QUEST_PARTY_MSG_HAVE_QUEST: return 6;
case QUEST_PARTY_MSG_FINISH_QUEST: return 7;
case QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY: return 8;
case QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED: return 9;
case QUEST_PARTY_MSG_NOT_IN_PARTY: return 10;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -21,11 +21,12 @@
#include "Cryptography/BigNumber.h"
#include <map>
enum WardenActions
// EnumUtils: DESCRIBE THIS
enum WardenActions : uint8
{
WARDEN_ACTION_LOG = 0,
WARDEN_ACTION_KICK = 1,
WARDEN_ACTION_BAN = 2,
WARDEN_ACTION_LOG, // TITLE Log
WARDEN_ACTION_KICK, // TITLE Kick
WARDEN_ACTION_BAN // TITLE Ban
};
constexpr uint8 MAX_WARDEN_ACTION = 3;

View File

@@ -0,0 +1,67 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "WardenCheckMgr.h"
#include "Define.h"
#include "SmartEnum.h"
#include <stdexcept>
namespace Acore::Impl::EnumUtilsImpl
{
/**********************************************************************\
|* data for enum 'WardenActions' in 'WardenCheckMgr.h' auto-generated *|
\**********************************************************************/
template <>
AC_API_EXPORT EnumText EnumUtils<WardenActions>::ToString(WardenActions value)
{
switch (value)
{
case WARDEN_ACTION_LOG: return { "WARDEN_ACTION_LOG", "Log", "" };
case WARDEN_ACTION_KICK: return { "WARDEN_ACTION_KICK", "Kick", "" };
case WARDEN_ACTION_BAN: return { "WARDEN_ACTION_BAN", "Ban", "" };
default: throw std::out_of_range("value");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<WardenActions>::Count() { return 3; }
template <>
AC_API_EXPORT WardenActions EnumUtils<WardenActions>::FromIndex(size_t index)
{
switch (index)
{
case 0: return WARDEN_ACTION_LOG;
case 1: return WARDEN_ACTION_KICK;
case 2: return WARDEN_ACTION_BAN;
default: throw std::out_of_range("index");
}
}
template <>
AC_API_EXPORT size_t EnumUtils<WardenActions>::ToIndex(WardenActions value)
{
switch (value)
{
case WARDEN_ACTION_LOG: return 0;
case WARDEN_ACTION_KICK: return 1;
case WARDEN_ACTION_BAN: return 2;
default: throw std::out_of_range("value");
}
}
}

View File

@@ -81,8 +81,6 @@ struct MechanicImmune
char const* text;
};
constexpr auto MAX_MECHANIC = 32;
MechanicImmune const mechanicImmunes[MAX_MECHANIC] =
{
{ MECHANIC_NONE, "MECHANIC_NONE" },

View File

@@ -63,30 +63,31 @@ enum Gender
};
// Race value is index in ChrRaces.dbc
// EnumUtils: DESCRIBE THIS
enum Races
{
RACE_NONE = 0,
RACE_HUMAN = 1,
RACE_ORC = 2,
RACE_DWARF = 3,
RACE_NIGHTELF = 4,
RACE_UNDEAD_PLAYER = 5,
RACE_TAUREN = 6,
RACE_GNOME = 7,
RACE_TROLL = 8,
//RACE_GOBLIN = 9,
RACE_BLOODELF = 10,
RACE_DRAENEI = 11
//RACE_FEL_ORC = 12,
//RACE_NAGA = 13,
//RACE_BROKEN = 14,
//RACE_SKELETON = 15,
//RACE_VRYKUL = 16,
//RACE_TUSKARR = 17,
//RACE_FOREST_TROLL = 18,
//RACE_TAUNKA = 19,
//RACE_NORTHREND_SKELETON = 20,
//RACE_ICE_TROLL = 21
RACE_NONE = 0, // SKIP
RACE_HUMAN = 1, // TITLE Human
RACE_ORC = 2, // TITLE Orc
RACE_DWARF = 3, // TITLE Dwarf
RACE_NIGHTELF = 4, // TITLE Night Elf
RACE_UNDEAD_PLAYER = 5, // TITLE Undead
RACE_TAUREN = 6, // TITLE Tauren
RACE_GNOME = 7, // TITLE Gnome
RACE_TROLL = 8, // TITLE Troll
//RACE_GOBLIN = 9,
RACE_BLOODELF = 10, // TITLE Blood Elf
RACE_DRAENEI = 11 //, TITLE Draenei
//RACE_FEL_ORC = 12,
//RACE_NAGA = 13,
//RACE_BROKEN = 14,
//RACE_SKELETON = 15,
//RACE_VRYKUL = 16,
//RACE_TUSKARR = 17,
//RACE_FOREST_TROLL = 18,
//RACE_TAUNKA = 19,
//RACE_NORTHREND_SKELETON = 20,
//RACE_ICE_TROLL = 21
};
// max+1 for player race
@@ -105,20 +106,21 @@ enum Races
#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE
// Class value is index in ChrClasses.dbc
// EnumUtils: DESCRIBE THIS
enum Classes
{
CLASS_NONE = 0,
CLASS_WARRIOR = 1,
CLASS_PALADIN = 2,
CLASS_HUNTER = 3,
CLASS_ROGUE = 4,
CLASS_PRIEST = 5,
CLASS_DEATH_KNIGHT = 6,
CLASS_SHAMAN = 7,
CLASS_MAGE = 8,
CLASS_WARLOCK = 9,
CLASS_NONE = 0, // SKIP
CLASS_WARRIOR = 1, // TITLE Warrior
CLASS_PALADIN = 2, // TITLE Paladin
CLASS_HUNTER = 3, // TITLE Hunter
CLASS_ROGUE = 4, // TITLE Rogue
CLASS_PRIEST = 5, // TITLE Priest
CLASS_DEATH_KNIGHT = 6, // TITLE Death Knight
CLASS_SHAMAN = 7, // TITLE Shaman
CLASS_MAGE = 8, // TITLE Mage
CLASS_WARLOCK = 9, // TITLE Warlock
//CLASS_UNK = 10,
CLASS_DRUID = 11
CLASS_DRUID = 11 // TITLE Druid
};
// max+1 for player class
@@ -346,7 +348,8 @@ uint32 constexpr QuestDifficultyColors[MAX_QUEST_DIFFICULTY] =
// Spell Attributes definitions
// ***********************************
enum SpellAttr0
// EnumUtils: DESCRIBE THIS
enum SpellAttr0 : uint32
{
SPELL_ATTR0_PROC_FAILURE_BURNS_CHARGE = 0x00000001, // TITLE Unknown attribute 0@Attr0
SPELL_ATTR0_USES_RANGED_SLOT = 0x00000002, // TITLE Treat as ranged attack DESCRIPTION Use ammo, ranged attack range modifiers, ranged haste, etc.
@@ -382,7 +385,8 @@ enum SpellAttr0
SPELL_ATTR0_NO_AURA_CANCEL = 0x80000000 // TITLE Aura cannot be cancelled DESCRIPTION Prevents the player from voluntarily canceling a positive aura
};
enum SpellAttr1
// EnumUtils: DESCRIBE THIS
enum SpellAttr1 : uint32
{
SPELL_ATTR1_DISMISS_PET_FIRST = 0x00000001, // TITLE Dismiss Pet on cast DESCRIPTION Without this attribute, summoning spells will fail if caster already has a pet
SPELL_ATTR1_USE_ALL_MANA = 0x00000002, // TITLE Drain all power DESCRIPTION Ignores listed power cost and drains entire pool instead
@@ -418,7 +422,8 @@ enum SpellAttr1
SPELL_ATTR1_CAST_WHEN_LEARNED = 0x80000000 // TITLE Unknown attribute 31@Attr1
};
enum SpellAttr2
// EnumUtils: DESCRIBE THIS
enum SpellAttr2 : uint32
{
SPELL_ATTR2_ALLOW_DEAD_TARGET = 0x00000001, // TITLE Can target dead players or corpses
SPELL_ATTR2_NO_SHAPESHIFT_UI = 0x00000002, // TITLE Unknown attribute 1@Attr2 DESCRIPTION vanish, shadowform, Ghost Wolf and other
@@ -454,7 +459,8 @@ enum SpellAttr2
SPELL_ATTR2_RETAIN_ITEM_CAST = 0x80000000 // TITLE Food buff (client only)
};
enum SpellAttr3
// EnumUtils: DESCRIBE THIS
enum SpellAttr3 : uint32
{
SPELL_ATTR3_PVP_ENABLING = 0x00000001, // TITLE Unknown attribute 0@Attr3
SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT = 0x00000002, // TITLE 1 Ignores subclass mask check when checking proc
@@ -490,7 +496,8 @@ enum SpellAttr3
SPELL_ATTR3_NOT_ON_AOE_IMMUNE = 0x80000000 // TITLE Unknown attribute 31@Attr3
};
enum SpellAttr4
// EnumUtils: DESCRIBE THIS
enum SpellAttr4 : uint32
{
SPELL_ATTR4_NO_CAST_LOG = 0x00000001, // TITLE Cannot be resisted
SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET = 0x00000002, // TITLE Only proc on self-cast
@@ -526,7 +533,8 @@ enum SpellAttr4
SPELL_ATTR4_USE_FACING_FROM_SPELL = 0x80000000 // TITLE Unknown attribute 31@Attr4 DESCRIPTION Polymorph (chicken) 228 and Sonic Boom (38052,38488)
};
enum SpellAttr5
// EnumUtils: DESCRIBE THIS
enum SpellAttr5 : uint32
{
SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL = 0x00000001, // TITLE Can be channeled while moving
SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA = 0x00000002, // TITLE No reagents during arena preparation
@@ -562,7 +570,8 @@ enum SpellAttr5
SPELL_ATTR5_ADD_MELEE_HIT_RATING = 0x80000000 // TITLE Unknown attribute 31@Attr5 DESCRIPTION Forces nearby enemies to attack caster?
};
enum SpellAttr6
// EnumUtils: DESCRIBE THIS
enum SpellAttr6 : uint32
{
SPELL_ATTR6_NO_COOLDOWN_ON_TOOLTIP = 0x00000001, // TITLE Don't display cooldown (client only)
SPELL_ATTR6_DO_NOT_RESET_COOLDOWN_IN_ARENA = 0x00000002, // TITLE Only usable in arena
@@ -598,7 +607,8 @@ enum SpellAttr6
SPELL_ATTR6_NO_CATEGORY_COOLDOWN_MODS = 0x80000000 // TITLE Ignore cooldown modifiers for category cooldown
};
enum SpellAttr7
// EnumUtils: DESCRIBE THIS
enum SpellAttr7 : uint32
{
SPELL_ATTR7_ALLOW_SPELL_REFLECTION = 0x00000001, // TITLE Unknown attribute 0@Attr7 DESCRIPTION Shaman's new spells (Call of the ...), Feign Death.
SPELL_ATTR7_NO_TARGET_DURATION_MOD = 0x00000002, // TITLE Ignore duration modifiers
@@ -1279,7 +1289,8 @@ enum AuraStateType
(1<<(AURA_STATE_CONFLAGRATE-1))|(1<<(AURA_STATE_DEADLY_POISON-1)))
// Spell mechanics
enum Mechanics
// EnumUtils: DESCRIBE THIS
enum Mechanics : uint32
{
MECHANIC_NONE = 0,
MECHANIC_CHARM = 1,
@@ -1312,7 +1323,8 @@ enum Mechanics
MECHANIC_DISCOVERY = 28,
MECHANIC_IMMUNE_SHIELD = 29, // Divine (Blessing) Shield/Protection and Ice Block
MECHANIC_SAPPED = 30,
MECHANIC_ENRAGED = 31
MECHANIC_ENRAGED = 31,
MAX_MECHANIC = 32 // SKIP
};
// Used for spell 42292 Immune Movement Impairment and Loss of Control (0x49967ca6)
@@ -1844,9 +1856,10 @@ enum TextEmotes
};
// Emotes.dbc
// EnumUtils: DESCRIBE THIS
enum Emote
{
EMOTE_ONESHOT_NONE = 0,
EMOTE_ONESHOT_NONE = 0, // SKIP
EMOTE_ONESHOT_TALK = 1,
EMOTE_ONESHOT_BOW = 2,
EMOTE_ONESHOT_WAVE = 3,
@@ -3100,6 +3113,7 @@ enum WeatherType
#define MAX_WEATHER_TYPE 4
// EnumUtils: DESCRIBE THIS
enum ChatMsg
{
CHAT_MSG_ADDON = 0xFFFFFFFF,

File diff suppressed because it is too large Load Diff