diff --git a/methods/TrinityCore/CreatureMethods.h b/methods/TrinityCore/CreatureMethods.h index 004601e1fc..bc34ffa404 100644 --- a/methods/TrinityCore/CreatureMethods.h +++ b/methods/TrinityCore/CreatureMethods.h @@ -765,19 +765,17 @@ namespace LuaCreature /** * Adds threat to the [Creature] from the victim. * - *
+ * @table + * @columns [SpellSchoolMask, ID] * enum SpellSchoolMask - * { - * SPELL_SCHOOL_MASK_NONE = 0, - * SPELL_SCHOOL_MASK_NORMAL = 1, - * SPELL_SCHOOL_MASK_HOLY = 2, - * SPELL_SCHOOL_MASK_FIRE = 4, - * SPELL_SCHOOL_MASK_NATURE = 8, - * SPELL_SCHOOL_MASK_FROST = 16, - * SPELL_SCHOOL_MASK_SHADOW = 32, - * SPELL_SCHOOL_MASK_ARCANE = 64, - * } - *+ * @values [SPELL_SCHOOL_MASK_NONE, 0] + * @values [SPELL_SCHOOL_MASK_NORMAL, 1] + * @values [SPELL_SCHOOL_MASK_HOLY, 2] + * @values [SPELL_SCHOOL_MASK_FIRE, 4] + * @values [SPELL_SCHOOL_MASK_NATURE, 8] + * @values [SPELL_SCHOOL_MASK_FROST, 16] + * @values [SPELL_SCHOOL_MASK_SHADOW, 32] + * @values [SPELL_SCHOOL_MASK_ARCANE, 64] * * @param [Unit] victim : [Unit] that caused the threat * @param float threat : threat amount @@ -914,14 +912,14 @@ namespace LuaCreature /** * Returns the loot mode for the [Creature]. * - *
- * LOOT_MODE_DEFAULT = 1, - * LOOT_MODE_HARD_MODE_1 = 2, - * LOOT_MODE_HARD_MODE_2 = 4, - * LOOT_MODE_HARD_MODE_3 = 8, - * LOOT_MODE_HARD_MODE_4 = 16, - * LOOT_MODE_JUNK_FISH = 32768 - *+ * @table + * @columns [Mode, ID] + * @values [LOOT_MODE_DEFAULT, 1] + * @values [LOOT_MODE_HARD_MODE_1, 2] + * @values [LOOT_MODE_HARD_MODE_2, 4] + * @values [LOOT_MODE_HARD_MODE_3, 8] + * @values [LOOT_MODE_HARD_MODE_4, 16] + * @values [LOOT_MODE_JUNK_FISH, 32768] * * @return uint16 lootMode */ @@ -984,14 +982,14 @@ namespace LuaCreature /** * Sets the loot mode for the [Creature]. * - *
- * LOOT_MODE_DEFAULT = 1, - * LOOT_MODE_HARD_MODE_1 = 2, - * LOOT_MODE_HARD_MODE_2 = 4, - * LOOT_MODE_HARD_MODE_3 = 8, - * LOOT_MODE_HARD_MODE_4 = 16, - * LOOT_MODE_JUNK_FISH = 32768 - *+ * @table + * @columns [Mode, ID] + * @values [LOOT_MODE_DEFAULT, 1] + * @values [LOOT_MODE_HARD_MODE_1, 2] + * @values [LOOT_MODE_HARD_MODE_2, 4] + * @values [LOOT_MODE_HARD_MODE_3, 8] + * @values [LOOT_MODE_HARD_MODE_4, 16] + * @values [LOOT_MODE_JUNK_FISH, 32768] * * @param uint16 lootMode */ @@ -1327,54 +1325,51 @@ namespace LuaCreature /** * Returns the [Creature]'s creature family ID (enumerated in CreatureFamily.dbc). * - *
- * enum CreatureFamily - * { - * CREATURE_FAMILY_NONE = 0, // TrinityCore only - * CREATURE_FAMILY_WOLF = 1, - * CREATURE_FAMILY_CAT = 2, - * CREATURE_FAMILY_SPIDER = 3, - * CREATURE_FAMILY_BEAR = 4, - * CREATURE_FAMILY_BOAR = 5, - * CREATURE_FAMILY_CROCOLISK = 6, - * CREATURE_FAMILY_CARRION_BIRD = 7, - * CREATURE_FAMILY_CRAB = 8, - * CREATURE_FAMILY_GORILLA = 9, - * CREATURE_FAMILY_HORSE_CUSTOM = 10, // Does not exist in DBC but used for horse like beasts in DB - * CREATURE_FAMILY_RAPTOR = 11, - * CREATURE_FAMILY_TALLSTRIDER = 12, - * CREATURE_FAMILY_FELHUNTER = 15, - * CREATURE_FAMILY_VOIDWALKER = 16, - * CREATURE_FAMILY_SUCCUBUS = 17, - * CREATURE_FAMILY_DOOMGUARD = 19, - * CREATURE_FAMILY_SCORPID = 20, - * CREATURE_FAMILY_TURTLE = 21, - * CREATURE_FAMILY_IMP = 23, - * CREATURE_FAMILY_BAT = 24, - * CREATURE_FAMILY_HYENA = 25, - * CREATURE_FAMILY_BIRD_OF_PREY = 26, // Named CREATURE_FAMILY_OWL in Mangos - * CREATURE_FAMILY_WIND_SERPENT = 27, - * CREATURE_FAMILY_REMOTE_CONTROL = 28, - * CREATURE_FAMILY_FELGUARD = 29, // This and below is TBC+ - * CREATURE_FAMILY_DRAGONHAWK = 30, - * CREATURE_FAMILY_RAVAGER = 31, - * CREATURE_FAMILY_WARP_STALKER = 32, - * CREATURE_FAMILY_SPOREBAT = 33, - * CREATURE_FAMILY_NETHER_RAY = 34, - * CREATURE_FAMILY_SERPENT = 35, - * CREATURE_FAMILY_SEA_LION = 36, // TBC only - * CREATURE_FAMILY_MOTH = 37, // This and below is WotLK+ - * CREATURE_FAMILY_CHIMAERA = 38, - * CREATURE_FAMILY_DEVILSAUR = 39, - * CREATURE_FAMILY_GHOUL = 40, - * CREATURE_FAMILY_SILITHID = 41, - * CREATURE_FAMILY_WORM = 42, - * CREATURE_FAMILY_RHINO = 43, - * CREATURE_FAMILY_WASP = 44, - * CREATURE_FAMILY_CORE_HOUND = 45, - * CREATURE_FAMILY_SPIRIT_BEAST = 46 - * }; - *+ * @table + * @columns [CreatureFamily, ID, Comment] + * @values [CREATURE_FAMILY_NONE, 0, "TrinityCore only"] + * @values [CREATURE_FAMILY_WOLF, 1, ""] + * @values [CREATURE_FAMILY_CAT, 2, ""] + * @values [CREATURE_FAMILY_SPIDER, 3, ""] + * @values [CREATURE_FAMILY_BEAR, 4, ""] + * @values [CREATURE_FAMILY_BOAR, 5, ""] + * @values [CREATURE_FAMILY_CROCOLISK, 6, ""] + * @values [CREATURE_FAMILY_CARRION_BIRD, 7, ""] + * @values [CREATURE_FAMILY_CRAB, 8, ""] + * @values [CREATURE_FAMILY_GORILLA, 9, ""] + * @values [CREATURE_FAMILY_HORSE_CUSTOM, 10, "Does not exist in DBC but used for horse like beasts in DB"] + * @values [CREATURE_FAMILY_RAPTOR, 11, ""] + * @values [CREATURE_FAMILY_TALLSTRIDER, 12, ""] + * @values [CREATURE_FAMILY_FELHUNTER, 15, ""] + * @values [CREATURE_FAMILY_VOIDWALKER, 16, ""] + * @values [CREATURE_FAMILY_SUCCUBUS, 17, ""] + * @values [CREATURE_FAMILY_DOOMGUARD, 19, ""] + * @values [CREATURE_FAMILY_SCORPID, 20, ""] + * @values [CREATURE_FAMILY_TURTLE, 21, ""] + * @values [CREATURE_FAMILY_IMP, 23, ""] + * @values [CREATURE_FAMILY_BAT, 24, ""] + * @values [CREATURE_FAMILY_HYENA, 25, ""] + * @values [CREATURE_FAMILY_BIRD_OF_PREY, 26, "Named CREATURE_FAMILY_OWL in Mangos"] + * @values [CREATURE_FAMILY_WIND_SERPENT, 27, ""] + * @values [CREATURE_FAMILY_REMOTE_CONTROL, 28, ""] + * @values [CREATURE_FAMILY_FELGUARD, 29, "This and below is TBC+"] + * @values [CREATURE_FAMILY_DRAGONHAWK, 30, ""] + * @values [CREATURE_FAMILY_RAVAGER, 31, ""] + * @values [CREATURE_FAMILY_WARP_STALKER, 32, ""] + * @values [CREATURE_FAMILY_SPOREBAT, 33, ""] + * @values [CREATURE_FAMILY_NETHER_RAY, 34, ""] + * @values [CREATURE_FAMILY_SERPENT, 35, ""] + * @values [CREATURE_FAMILY_SEA_LION, 36, "TBC only"] + * @values [CREATURE_FAMILY_MOTH, 37, "This and below is WotLK+"] + * @values [CREATURE_FAMILY_CHIMAERA, 38, ""] + * @values [CREATURE_FAMILY_DEVILSAUR, 39, ""] + * @values [CREATURE_FAMILY_GHOUL, 40, ""] + * @values [CREATURE_FAMILY_SILITHID, 41, ""] + * @values [CREATURE_FAMILY_WORM, 42, ""] + * @values [CREATURE_FAMILY_RHINO, 43, ""] + * @values [CREATURE_FAMILY_WASP, 44, ""] + * @values [CREATURE_FAMILY_CORE_HOUND, 45, ""] + * @values [CREATURE_FAMILY_SPIRIT_BEAST, 46, ""] * * @return [CreatureFamily] creatureFamily */ diff --git a/methods/TrinityCore/UnitMethods.h b/methods/TrinityCore/UnitMethods.h index aa2bc0d63d..a335843ddc 100644 --- a/methods/TrinityCore/UnitMethods.h +++ b/methods/TrinityCore/UnitMethods.h @@ -15,40 +15,40 @@ namespace LuaUnit /** * Sets a mechanic immunity for the [Unit]. * - *
- * MECHANIC_NONE = 0, - * MECHANIC_CHARM = 1, - * MECHANIC_DISORIENTED = 2, - * MECHANIC_DISARM = 3, - * MECHANIC_DISTRACT = 4, - * MECHANIC_FEAR = 5, - * MECHANIC_GRIP = 6, - * MECHANIC_ROOT = 7, - * MECHANIC_SLOW_ATTACK = 8, - * MECHANIC_SILENCE = 9, - * MECHANIC_SLEEP = 10, - * MECHANIC_SNARE = 11, - * MECHANIC_STUN = 12, - * MECHANIC_FREEZE = 13, - * MECHANIC_KNOCKOUT = 14, - * MECHANIC_BLEED = 15, - * MECHANIC_BANDAGE = 16, - * MECHANIC_POLYMORPH = 17, - * MECHANIC_BANISH = 18, - * MECHANIC_SHIELD = 19, - * MECHANIC_SHACKLE = 20, - * MECHANIC_MOUNT = 21, - * MECHANIC_INFECTED = 22, - * MECHANIC_TURN = 23, - * MECHANIC_HORROR = 24, - * MECHANIC_INVULNERABILITY = 25, - * MECHANIC_INTERRUPT = 26, - * MECHANIC_DAZE = 27, - * MECHANIC_DISCOVERY = 28, - * MECHANIC_IMMUNE_SHIELD = 29, // Divine (Blessing) Shield/Protection and Ice Block - * MECHANIC_SAPPED = 30, - * MECHANIC_ENRAGED = 31 - *+ * @table + * @columns [Mechanic, ID, Comment] + * @values [MECHANIC_NONE, 0, ""] + * @values [MECHANIC_CHARM, 1, ""] + * @values [MECHANIC_DISORIENTED, 2, ""] + * @values [MECHANIC_DISARM, 3, ""] + * @values [MECHANIC_DISTRACT, 4, ""] + * @values [MECHANIC_FEAR, 5, ""] + * @values [MECHANIC_GRIP, 6, ""] + * @values [MECHANIC_ROOT, 7, ""] + * @values [MECHANIC_SLOW_ATTACK, 8, ""] + * @values [MECHANIC_SILENCE, 9, ""] + * @values [MECHANIC_SLEEP, 10, ""] + * @values [MECHANIC_SNARE, 11, ""] + * @values [MECHANIC_STUN, 12, ""] + * @values [MECHANIC_FREEZE, 13, ""] + * @values [MECHANIC_KNOCKOUT, 14, ""] + * @values [MECHANIC_BLEED, 15, ""] + * @values [MECHANIC_BANDAGE, 16, ""] + * @values [MECHANIC_POLYMORPH, 17, ""] + * @values [MECHANIC_BANISH, 18, ""] + * @values [MECHANIC_SHIELD, 19, ""] + * @values [MECHANIC_SHACKLE, 20, ""] + * @values [MECHANIC_MOUNT, 21, ""] + * @values [MECHANIC_INFECTED, 22, ""] + * @values [MECHANIC_TURN, 23, ""] + * @values [MECHANIC_HORROR, 24, ""] + * @values [MECHANIC_INVULNERABILITY, 25, ""] + * @values [MECHANIC_INTERRUPT, 26, ""] + * @values [MECHANIC_DAZE, 27, ""] + * @values [MECHANIC_DISCOVERY, 28, ""] + * @values [MECHANIC_IMMUNE_SHIELD, 29, "Divine (Blessing) Shield/Protection and Ice Block"] + * @values [MECHANIC_SAPPED, 30, ""] + * @values [MECHANIC_ENRAGED, 31, ""] * * @param int32 immunity : new value for the immunity mask * @param bool apply = true : if true, the immunity is applied, otherwise it is removed @@ -687,15 +687,12 @@ namespace LuaUnit /** * Returns the currently casted [Spell] of given type or nil. * - *
- * enum CurrentSpellTypes - * { - * CURRENT_MELEE_SPELL = 0, - * CURRENT_GENERIC_SPELL = 1, - * CURRENT_CHANNELED_SPELL = 2, - * CURRENT_AUTOREPEAT_SPELL = 3 - * }; - *+ * @table + * @columns [CurrentSpellTypes, ID] + * @values [CURRENT_MELEE_SPELL, 0] + * @values [CURRENT_GENERIC_SPELL, 1] + * @values [CURRENT_CHANNELED_SPELL, 2] + * @values [CURRENT_AUTOREPEAT_SPELL, 3] * * @param [CurrentSpellTypes] spellType * @return [Spell] castedSpell @@ -779,19 +776,18 @@ namespace LuaUnit /** * Returns the [Unit]'s power amount for given power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param int type = -1 : a valid power type from [Powers] or -1 for the [Unit]'s current power type * @return uint32 powerAmount @@ -808,19 +804,18 @@ namespace LuaUnit /** * Returns the [Unit]'s max power amount for given power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param int type = -1 : a valid power type from [Powers] or -1 for the [Unit]'s current power type * @return uint32 maxPowerAmount @@ -837,19 +832,18 @@ namespace LuaUnit /** * Returns the [Unit]'s power percent for given power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param int type = -1 : a valid power type from [Powers] or -1 for the [Unit]'s current power type * @return float powerPct @@ -868,19 +862,18 @@ namespace LuaUnit /** * Returns the [Unit]'s current power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @return [Powers] powerType */ @@ -970,24 +963,21 @@ namespace LuaUnit /** * Returns the [Unit]'s creature type ID (enumerated in CreatureType.dbc). * - *
- * enum CreatureType - * { - * CREATURE_TYPE_BEAST = 1, - * CREATURE_TYPE_DRAGONKIN = 2, - * CREATURE_TYPE_DEMON = 3, - * CREATURE_TYPE_ELEMENTAL = 4, - * CREATURE_TYPE_GIANT = 5, - * CREATURE_TYPE_UNDEAD = 6, - * CREATURE_TYPE_HUMANOID = 7, - * CREATURE_TYPE_CRITTER = 8, - * CREATURE_TYPE_MECHANICAL = 9, - * CREATURE_TYPE_NOT_SPECIFIED = 10, - * CREATURE_TYPE_TOTEM = 11, - * CREATURE_TYPE_NON_COMBAT_PET = 12, // This and below is TBC+ - * CREATURE_TYPE_GAS_CLOUD = 13 - * }; - *+ * @table + * @columns [CreatureType, ID] + * @values [CREATURE_TYPE_BEAST, 1] + * @values [CREATURE_TYPE_DRAGONKIN, 2] + * @values [CREATURE_TYPE_DEMON, 3] + * @values [CREATURE_TYPE_ELEMENTAL, 4] + * @values [CREATURE_TYPE_GIANT, 5] + * @values [CREATURE_TYPE_UNDEAD, 6] + * @values [CREATURE_TYPE_HUMANOID, 7] + * @values [CREATURE_TYPE_CRITTER, 8] + * @values [CREATURE_TYPE_MECHANICAL, 9] + * @values [CREATURE_TYPE_NOT_SPECIFIED, 10] + * @values [CREATURE_TYPE_TOTEM, 11] + * @values [CREATURE_TYPE_NON_COMBAT_PET, 12] + * @values [CREATURE_TYPE_GAS_CLOUD, 13] * * @return [CreatureType] creatureType */ @@ -1000,20 +990,17 @@ namespace LuaUnit /** * Returns the [Unit]'s class' name in given or default locale or nil. * - *
- * enum LocaleConstant - * { - * LOCALE_enUS = 0, - * LOCALE_koKR = 1, - * LOCALE_frFR = 2, - * LOCALE_deDE = 3, - * LOCALE_zhCN = 4, - * LOCALE_zhTW = 5, - * LOCALE_esES = 6, - * LOCALE_esMX = 7, - * LOCALE_ruRU = 8 - * }; - *+ * @table + * @columns [Locale, ID] + * @values [LOCALE_enUS, 0] + * @values [LOCALE_koKR, 1] + * @values [LOCALE_frFR, 2] + * @values [LOCALE_deDE, 3] + * @values [LOCALE_zhCN, 4] + * @values [LOCALE_zhTW, 5] + * @values [LOCALE_esES, 6] + * @values [LOCALE_esMX, 7] + * @values [LOCALE_ruRU, 8] * * @param [LocaleConstant] locale = DEFAULT_LOCALE * @return string className : class name or nil @@ -1035,20 +1022,17 @@ namespace LuaUnit /** * Returns the [Unit]'s race's name in given or default locale or nil. * - *
- * enum LocaleConstant - * { - * LOCALE_enUS = 0, - * LOCALE_koKR = 1, - * LOCALE_frFR = 2, - * LOCALE_deDE = 3, - * LOCALE_zhCN = 4, - * LOCALE_zhTW = 5, - * LOCALE_esES = 6, - * LOCALE_esMX = 7, - * LOCALE_ruRU = 8 - * }; - *+ * @table + * @columns [Locale, ID] + * @values [LOCALE_enUS, 0] + * @values [LOCALE_koKR, 1] + * @values [LOCALE_frFR, 2] + * @values [LOCALE_deDE, 3] + * @values [LOCALE_zhCN, 4] + * @values [LOCALE_zhTW, 5] + * @values [LOCALE_esES, 6] + * @values [LOCALE_esMX, 7] + * @values [LOCALE_ruRU, 8] * * @param [LocaleConstant] locale = DEFAULT_LOCALE : locale to return the race name in * @return string raceName : race name or nil @@ -1167,6 +1151,11 @@ namespace LuaUnit return 1; } + /** + * Returns [Unit]'s [Vehicle] object + * + * @return [Vehicle] vehicle + */ int GetVehicle(Eluna* E, Unit* unit) { E->Push(unit->GetVehicle()); @@ -1187,20 +1176,17 @@ namespace LuaUnit /** * Returns the [Unit]'s speed of given [UnitMoveType]. * - *
- * enum UnitMoveType - * { - * MOVE_WALK = 0, - * MOVE_RUN = 1, - * MOVE_RUN_BACK = 2, - * MOVE_SWIM = 3, - * MOVE_SWIM_BACK = 4, - * MOVE_TURN_RATE = 5, - * MOVE_FLIGHT = 6, - * MOVE_FLIGHT_BACK = 7, - * MOVE_PITCH_RATE = 8 - * }; - *+ * @table + * @columns [UnitMoveType, ID] + * @values [MOVE_WALK, 0] + * @values [MOVE_RUN, 1] + * @values [MOVE_RUN_BACK, 2] + * @values [MOVE_SWIM, 3] + * @values [MOVE_SWIM_BACK, 4] + * @values [MOVE_TURN_RATE, 5] + * @values [MOVE_FLIGHT, 6] + * @values [MOVE_FLIGHT_BACK, 7] + * @values [MOVE_PITCH_RATE, 8] * * @param [UnitMoveType] type * @return float speed @@ -1218,32 +1204,28 @@ namespace LuaUnit /** * Returns the current movement type for this [Unit]. * - *
- * enum MovementGeneratorType - * { - * IDLE_MOTION_TYPE = 0, - * RANDOM_MOTION_TYPE = 1, - * WAYPOINT_MOTION_TYPE = 2, - * MAX_DB_MOTION_TYPE = 3, - * ANIMAL_RANDOM_MOTION_TYPE = 3, // TC - * - * CONFUSED_MOTION_TYPE = 4, - * CHASE_MOTION_TYPE = 5, - * HOME_MOTION_TYPE = 6, - * FLIGHT_MOTION_TYPE = 7, - * POINT_MOTION_TYPE = 8, - * FLEEING_MOTION_TYPE = 9, - * DISTRACT_MOTION_TYPE = 10, - * ASSISTANCE_MOTION_TYPE = 11, - * ASSISTANCE_DISTRACT_MOTION_TYPE = 12, - * TIMED_FLEEING_MOTION_TYPE = 13, - * FOLLOW_MOTION_TYPE = 14, - * EFFECT_MOTION_TYPE = 15, // mangos - * ROTATE_MOTION_TYPE = 15, // TC - * EFFECT_MOTION_TYPE = 16, // TC - * NULL_MOTION_TYPE = 17, // TC - * }; - *+ * @table + * @columns [MovementGeneratorType, ID, Comment] + * @values [IDLE_MOTION_TYPE, 0, ""] + * @values [RANDOM_MOTION_TYPE, 1, ""] + * @values [WAYPOINT_MOTION_TYPE, 2, ""] + * @values [MAX_DB_MOTION_TYPE, 3, ""] + * @values [ANIMAL_RANDOM_MOTION_TYPE, 3, "TC"] + * @values [CONFUSED_MOTION_TYPE, 4, ""] + * @values [CHASE_MOTION_TYPE, 5, ""] + * @values [HOME_MOTION_TYPE, 6, ""] + * @values [FLIGHT_MOTION_TYPE, 7, ""] + * @values [POINT_MOTION_TYPE, 8, ""] + * @values [FLEEING_MOTION_TYPE, 9, ""] + * @values [DISTRACT_MOTION_TYPE, 10, ""] + * @values [ASSISTANCE_MOTION_TYPE, 11, ""] + * @values [ASSISTANCE_DISTRACT_MOTION_TYPE, 12, ""] + * @values [TIMED_FLEEING_MOTION_TYPE, 13, ""] + * @values [FOLLOW_MOTION_TYPE, 14, ""] + * @values [EFFECT_MOTION_TYPE, 15, "mangos"] + * @values [ROTATE_MOTION_TYPE, 15, "TC"] + * @values [EFFECT_MOTION_TYPE, 16, "TC"] + * @values [NULL_MOTION_TYPE, 17, "TC"] * * @return [MovementGeneratorType] movementType */ @@ -1282,12 +1264,11 @@ namespace LuaUnit /** * Sets the [Unit]'s sheath state. * - * enum SheathState - * { - * SHEATH_STATE_UNARMED = 0, // non prepared weapon - * SHEATH_STATE_MELEE = 1, // prepared melee weapon - * SHEATH_STATE_RANGED = 2 // prepared ranged weapon - * }; + * @table + * @columns [SheathState, ID, Comment] + * @values [SHEATH_STATE_UNARMED, 0, "non prepared weapon"] + * @values [SHEATH_STATE_MELEE, 1, "prepared melee weapon"] + * @values [SHEATH_STATE_RANGED, 2, "prepared ranged weapon"] * * @param [SheathState] sheathState : valid SheathState */ @@ -1318,20 +1299,17 @@ namespace LuaUnit * Sets the [Unit]'s speed of given [UnitMoveType] to given rate. * If forced, packets sent to clients forcing the visual change. * - *
- * enum UnitMoveType - * { - * MOVE_WALK = 0, - * MOVE_RUN = 1, - * MOVE_RUN_BACK = 2, - * MOVE_SWIM = 3, - * MOVE_SWIM_BACK = 4, - * MOVE_TURN_RATE = 5, - * MOVE_FLIGHT = 6, - * MOVE_FLIGHT_BACK = 7, - * MOVE_PITCH_RATE = 8 - * }; - *+ * @table + * @columns [UnitMoveType, ID] + * @values [MOVE_WALK, 0] + * @values [MOVE_RUN, 1] + * @values [MOVE_RUN_BACK, 2] + * @values [MOVE_SWIM, 3] + * @values [MOVE_SWIM_BACK, 4] + * @values [MOVE_TURN_RATE, 5] + * @values [MOVE_FLIGHT, 6] + * @values [MOVE_FLIGHT_BACK, 7] + * @values [MOVE_PITCH_RATE, 8] * * @param [UnitMoveType] type * @param float rate @@ -1414,19 +1392,18 @@ namespace LuaUnit /** * Sets the [Unit]'s power amount for the given power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param uint32 amount : new power amount * @param int type = -1 : a valid power type from [Powers] or -1 for the [Unit]'s current power type @@ -1444,19 +1421,18 @@ namespace LuaUnit /** * modifies the [Unit]'s power amount for the given power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param int32 amount : amount to modify * @param int type = -1 : a valid power type from [Powers] or -1 for the [Unit]'s current power type @@ -1474,19 +1450,18 @@ namespace LuaUnit /** * Sets the [Unit]'s max power amount for the given power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param int type = -1 : a valid power type from [Powers] or -1 for the [Unit]'s current power type * @param uint32 maxPower : new max power amount @@ -1504,19 +1479,18 @@ namespace LuaUnit /** * Sets the [Unit]'s power type. * - * enum Powers - * { - * POWER_MANA = 0, - * POWER_RAGE = 1, - * POWER_FOCUS = 2, - * POWER_ENERGY = 3, - * POWER_HAPPINESS = 4, - * POWER_RUNE = 5, - * POWER_RUNIC_POWER = 6, - * MAX_POWERS = 7, - * POWER_ALL = 127, // default for class? - * POWER_HEALTH = 0xFFFFFFFE // (-2 as signed value) - * }; + * @table + * @columns [Powers, ID, Comment] + * @values [POWER_MANA, 0, ""] + * @values [POWER_RAGE, 1, ""] + * @values [POWER_FOCUS, 2, ""] + * @values [POWER_ENERGY, 3, ""] + * @values [POWER_HAPPINESS, 4, ""] + * @values [POWER_RUNE, 5, ""] + * @values [POWER_RUNIC_POWER, 6, ""] + * @values [MAX_POWERS, 7, ""] + * @values [POWER_ALL, 127, "default for class?"] + * @values [POWER_HEALTH, 0xFFFFFFFE, "-2 as signed value"] * * @param [Powers] type : a valid power type */ @@ -1688,6 +1662,11 @@ namespace LuaUnit return 0; } + /** + * Sets the [Unit]s critter GUID field. + * + * @param [ObjectGuid] guid + */ int SetCritterGUID(Eluna* E, Unit* unit) { ObjectGuid guid = E->CHECKVAL
- * enum SpellSchools - * { - * SPELL_SCHOOL_NORMAL = 0, - * SPELL_SCHOOL_HOLY = 1, - * SPELL_SCHOOL_FIRE = 2, - * SPELL_SCHOOL_NATURE = 3, - * SPELL_SCHOOL_FROST = 4, - * SPELL_SCHOOL_SHADOW = 5, - * SPELL_SCHOOL_ARCANE = 6, - * MAX_SPELL_SCHOOL = 7 - * }; - *+ * @table + * @columns [SpellSchools, ID] + * @values [SPELL_SCHOOL_NORMAL, 0] + * @values [SPELL_SCHOOL_HOLY, 1] + * @values [SPELL_SCHOOL_FIRE, 2] + * @values [SPELL_SCHOOL_NATURE, 3] + * @values [SPELL_SCHOOL_FROST, 4] + * @values [SPELL_SCHOOL_SHADOW, 5] + * @values [SPELL_SCHOOL_ARCANE, 6] + * @values [MAX_SPELL_SCHOOL, 7] * * @param [Unit] target : [Unit] to damage * @param uint32 damage : amount to damage @@ -2470,30 +2460,47 @@ namespace LuaUnit return 0; } + /** + * Restores the [Unit]s display ID to default + */ int RestoreDisplayId(Eluna* /*E*/, Unit* unit) { unit->RestoreDisplayId(); return 0; } + /** + * Restores the [Unit]s faction to default + */ int RestoreFaction(Eluna* /*E*/, Unit* unit) { unit->RestoreFaction(); return 0; } + /** + * Removes all bind sight auras from the [Unit]. + */ int RemoveBindSightAuras(Eluna* /*E*/, Unit* unit) { unit->RemoveBindSightAuras(); return 0; } + /** + * Removes all charm auras from the [Unit]. + */ int RemoveCharmAuras(Eluna* /*E*/, Unit* unit) { unit->RemoveCharmAuras(); return 0; } + /** + * Enables or disables whether or not the [Unit] can melee auto attack. + * + * @param bool disable = true : True to disable melee attack, false to enable + */ int DisableMelee(Eluna* E, Unit* unit) { bool apply = E->CHECKVAL
- * enum UnitModifierFlatType - * { - * BASE_VALUE = 0, - * TOTAL_VALUE = 1 - * }; - *+ * @table + * @columns [UnitModifierFlatType, ID] + * @values [BASE_VALUE, 0] + * @values [TOTAL_VALUE, 1] * * @param uint32 statType : The stat to modify * @param [UnitModifierFlatType] modType : The type of modifier to apply @@ -2547,13 +2551,10 @@ namespace LuaUnit /** * Modifies a percentage amount of a specific stat of the [Unit] * - *
- * enum UnitModifierPctType - * { - * BASE_PCT = 0, - * TOTAL_PCT = 1 - * }; - *+ * @table + * @columns [UnitModifierPctType, ID] + * @values [BASE_PCT, 0] + * @values [TOTAL_PCT, 1] * * @param uint32 statType : The stat to modify * @param [UnitModifierPctType] modType : The type of modifier to apply @@ -2569,46 +2570,6 @@ namespace LuaUnit return 0; } - /*int SummonGuardian(Eluna* E, Unit* unit) - { - uint32 entry = E->CHECKVAL