aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-11-12 00:39:53 +0100
committerShauren <shauren.trinity@gmail.com>2018-11-12 00:39:53 +0100
commitf6b0d99e2c0bc22b44d6f3cfdae50cbba7d51de8 (patch)
treefec55d275263a45b86a69e34314f072a1d27c298 /src/server/game/Entities
parent0068813ef92bf93db2642d6a1eaf7c082eaa5d2d (diff)
GCC build fix
Closes #22785
Diffstat (limited to 'src/server/game/Entities')
-rw-r--r--src/server/game/Entities/Creature/enuminfo_CreatureData.cpp80
-rw-r--r--src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp142
2 files changed, 120 insertions, 102 deletions
diff --git a/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp b/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
index 3e9c0fdfa0b..363c79f2228 100644
--- a/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
+++ b/src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
@@ -20,53 +20,60 @@
#include "SmartEnum.h"
#include <stdexcept>
+namespace Trinity
+{
+namespace Impl
+{
+
/*************************************************************************\
|* data for enum 'CreatureFlagsExtra' in 'CreatureData.h' auto-generated *|
\*************************************************************************/
template <>
-TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<CreatureFlagsExtra>::ToString(CreatureFlagsExtra value)
+TC_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_CRUSH: return {"CREATURE_FLAG_EXTRA_NO_CRUSH", "CREATURE_FLAG_EXTRA_NO_CRUSH", "creature can't do crush attacks"};
- case CREATURE_FLAG_EXTRA_NO_XP_AT_KILL: return {"CREATURE_FLAG_EXTRA_NO_XP_AT_KILL", "CREATURE_FLAG_EXTRA_NO_XP_AT_KILL", "creature kill 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 effect attack me"};
- 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 be only visible for dead players"};
- case CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK: return {"CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK", "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_UNUSED_13: return {"CREATURE_FLAG_EXTRA_UNUSED_13", "CREATURE_FLAG_EXTRA_UNUSED_13", ""};
- 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_UNUSED_16: return {"CREATURE_FLAG_EXTRA_UNUSED_16", "CREATURE_FLAG_EXTRA_UNUSED_16", ""};
- 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_SKILLGAIN: return {"CREATURE_FLAG_EXTRA_NO_SKILLGAIN", "CREATURE_FLAG_EXTRA_NO_SKILLGAIN", "creature won't increase weapon skills"};
- case CREATURE_FLAG_EXTRA_TAUNT_DIMINISH: return {"CREATURE_FLAG_EXTRA_TAUNT_DIMINISH", "CREATURE_FLAG_EXTRA_TAUNT_DIMINISH", "Taunt is a subject to diminishing returns on this creautre"};
- 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 player 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_UNUSED_22: return {"CREATURE_FLAG_EXTRA_UNUSED_22", "CREATURE_FLAG_EXTRA_UNUSED_22", ""};
- case CREATURE_FLAG_EXTRA_UNUSED_23: return {"CREATURE_FLAG_EXTRA_UNUSED_23", "CREATURE_FLAG_EXTRA_UNUSED_23", ""};
- case CREATURE_FLAG_EXTRA_UNUSED_24: return {"CREATURE_FLAG_EXTRA_UNUSED_24", "CREATURE_FLAG_EXTRA_UNUSED_24", ""};
- 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_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_UNUSED_31: return {"CREATURE_FLAG_EXTRA_UNUSED_31", "CREATURE_FLAG_EXTRA_UNUSED_31", ""};
+ 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_CRUSH: return { "CREATURE_FLAG_EXTRA_NO_CRUSH", "CREATURE_FLAG_EXTRA_NO_CRUSH", "creature can't do crush attacks" };
+ case CREATURE_FLAG_EXTRA_NO_XP_AT_KILL: return { "CREATURE_FLAG_EXTRA_NO_XP_AT_KILL", "CREATURE_FLAG_EXTRA_NO_XP_AT_KILL", "creature kill 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 effect attack me" };
+ 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 be only visible for dead players" };
+ case CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK: return { "CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK", "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_UNUSED_13: return { "CREATURE_FLAG_EXTRA_UNUSED_13", "CREATURE_FLAG_EXTRA_UNUSED_13", "" };
+ 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_UNUSED_16: return { "CREATURE_FLAG_EXTRA_UNUSED_16", "CREATURE_FLAG_EXTRA_UNUSED_16", "" };
+ 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_SKILLGAIN: return { "CREATURE_FLAG_EXTRA_NO_SKILLGAIN", "CREATURE_FLAG_EXTRA_NO_SKILLGAIN", "creature won't increase weapon skills" };
+ case CREATURE_FLAG_EXTRA_TAUNT_DIMINISH: return { "CREATURE_FLAG_EXTRA_TAUNT_DIMINISH", "CREATURE_FLAG_EXTRA_TAUNT_DIMINISH", "Taunt is a subject to diminishing returns on this creautre" };
+ 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 player 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_UNUSED_22: return { "CREATURE_FLAG_EXTRA_UNUSED_22", "CREATURE_FLAG_EXTRA_UNUSED_22", "" };
+ case CREATURE_FLAG_EXTRA_UNUSED_23: return { "CREATURE_FLAG_EXTRA_UNUSED_23", "CREATURE_FLAG_EXTRA_UNUSED_23", "" };
+ case CREATURE_FLAG_EXTRA_UNUSED_24: return { "CREATURE_FLAG_EXTRA_UNUSED_24", "CREATURE_FLAG_EXTRA_UNUSED_24", "" };
+ 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_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_UNUSED_31: return { "CREATURE_FLAG_EXTRA_UNUSED_31", "CREATURE_FLAG_EXTRA_UNUSED_31", "" };
default: throw std::out_of_range("value");
}
}
+
template <>
-TC_API_EXPORT size_t Trinity::Impl::EnumUtils<CreatureFlagsExtra>::Count() { return 32; }
+TC_API_EXPORT size_t EnumUtils<CreatureFlagsExtra>::Count() { return 32; }
+
template <>
-TC_API_EXPORT CreatureFlagsExtra Trinity::Impl::EnumUtils<CreatureFlagsExtra>::FromIndex(size_t index)
+TC_API_EXPORT CreatureFlagsExtra EnumUtils<CreatureFlagsExtra>::FromIndex(size_t index)
{
switch (index)
{
@@ -105,4 +112,5 @@ TC_API_EXPORT CreatureFlagsExtra Trinity::Impl::EnumUtils<CreatureFlagsExtra>::F
default: throw std::out_of_range("index");
}
}
-
+}
+}
diff --git a/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp b/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp
index b1c1e6fa4b1..098b71b0a2d 100644
--- a/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp
+++ b/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp
@@ -20,53 +20,60 @@
#include "SmartEnum.h"
#include <stdexcept>
+namespace Trinity
+{
+namespace Impl
+{
+
/***************************************************************\
|* data for enum 'UnitFlags' in 'UnitDefines.h' auto-generated *|
\***************************************************************/
template <>
-TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<UnitFlags>::ToString(UnitFlags value)
+TC_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_REMOVE_CLIENT_CONTROL: return {"UNIT_FLAG_REMOVE_CLIENT_CONTROL", "UNIT_FLAG_REMOVE_CLIENT_CONTROL", "This is a legacy flag used to disable movement player's movement while controlling other units, SMSG_CLIENT_CONTROL replaces this functionality clientside now. CONFUSED and FLEEING flags have the same effect on client movement asDISABLE_MOVE_CONTROL in addition to preventing spell casts/autoattack (they all allow climbing steeper hills and emotes while moving)"};
- 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_WHILE_PREP"};
- 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", "on player pets: whether the pet is chasing a target to attack || on other units: whether any of the unit's minions is in combat"};
- 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_UNK_15: return {"UNIT_FLAG_UNK_15", "UNIT_FLAG_UNK_15", ""};
- 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_UNK_29: return {"UNIT_FLAG_UNK_29", "UNIT_FLAG_UNK_29", "used in Feing Death spell"};
- case UNIT_FLAG_SHEATHE: return {"UNIT_FLAG_SHEATHE", "UNIT_FLAG_SHEATHE", ""};
- case UNIT_FLAG_UNK_31: return {"UNIT_FLAG_UNK_31", "UNIT_FLAG_UNK_31", ""};
+ 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_REMOVE_CLIENT_CONTROL: return { "UNIT_FLAG_REMOVE_CLIENT_CONTROL", "UNIT_FLAG_REMOVE_CLIENT_CONTROL", "This is a legacy flag used to disable movement player's movement while controlling other units, SMSG_CLIENT_CONTROL replaces this functionality clientside now. CONFUSED and FLEEING flags have the same effect on client movement asDISABLE_MOVE_CONTROL in addition to preventing spell casts/autoattack (they all allow climbing steeper hills and emotes while moving)" };
+ 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_WHILE_PREP" };
+ 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", "on player pets: whether the pet is chasing a target to attack || on other units: whether any of the unit's minions is in combat" };
+ 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_UNK_15: return { "UNIT_FLAG_UNK_15", "UNIT_FLAG_UNK_15", "" };
+ 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_UNK_29: return { "UNIT_FLAG_UNK_29", "UNIT_FLAG_UNK_29", "used in Feing Death spell" };
+ case UNIT_FLAG_SHEATHE: return { "UNIT_FLAG_SHEATHE", "UNIT_FLAG_SHEATHE", "" };
+ case UNIT_FLAG_UNK_31: return { "UNIT_FLAG_UNK_31", "UNIT_FLAG_UNK_31", "" };
default: throw std::out_of_range("value");
}
}
+
template <>
-TC_API_EXPORT size_t Trinity::Impl::EnumUtils<UnitFlags>::Count() { return 32; }
+TC_API_EXPORT size_t EnumUtils<UnitFlags>::Count() { return 32; }
+
template <>
-TC_API_EXPORT UnitFlags Trinity::Impl::EnumUtils<UnitFlags>::FromIndex(size_t index)
+TC_API_EXPORT UnitFlags EnumUtils<UnitFlags>::FromIndex(size_t index)
{
switch (index)
{
@@ -110,44 +117,46 @@ TC_API_EXPORT UnitFlags Trinity::Impl::EnumUtils<UnitFlags>::FromIndex(size_t in
|* data for enum 'NPCFlags' in 'UnitDefines.h' auto-generated *|
\**************************************************************/
template <>
-TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<NPCFlags>::ToString(NPCFlags value)
+TC_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", ""};
+ 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 <>
-TC_API_EXPORT size_t Trinity::Impl::EnumUtils<NPCFlags>::Count() { return 27; }
+TC_API_EXPORT size_t EnumUtils<NPCFlags>::Count() { return 27; }
+
template <>
-TC_API_EXPORT NPCFlags Trinity::Impl::EnumUtils<NPCFlags>::FromIndex(size_t index)
+TC_API_EXPORT NPCFlags EnumUtils<NPCFlags>::FromIndex(size_t index)
{
switch (index)
{
@@ -181,4 +190,5 @@ TC_API_EXPORT NPCFlags Trinity::Impl::EnumUtils<NPCFlags>::FromIndex(size_t inde
default: throw std::out_of_range("index");
}
}
-
+}
+}