Changeset 213 for trunk/src/game/Unit.h

Show
Ignore:
Timestamp:
11/19/08 13:47:00 (17 years ago)
Author:
yumileroy
Message:

[svn] Fix some aura_interrupt_flag to correctly remove auras.
Add interrupt_flag_unattackable. Source: mangos forum. Adapted by F636y623.
Add function CombatStart?().

Original author: megamage
Date: 2008-11-11 17:49:51-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Unit.h

    r203 r213  
    5858enum SpellAuraInterruptFlags 
    5959{ 
    60     AURA_INTERRUPT_FLAG_UNK0                = 0x00000001,   // 0    removed when getting hit by a negative spell? 
     60    AURA_INTERRUPT_FLAG_HITBYSPELL          = 0x00000001,   // 0    removed when getting hit by a negative spell? 
    6161    AURA_INTERRUPT_FLAG_DAMAGE              = 0x00000002,   // 1    removed by any damage 
    62     AURA_INTERRUPT_FLAG_UNK2                = 0x00000004,   // 2 
     62    AURA_INTERRUPT_FLAG_CC                  = 0x00000004,   // 2    crowd control 
    6363    AURA_INTERRUPT_FLAG_MOVE                = 0x00000008,   // 3    removed by any movement 
    6464    AURA_INTERRUPT_FLAG_TURNING             = 0x00000010,   // 4    removed by any turning 
    65     AURA_INTERRUPT_FLAG_ENTER_COMBAT        = 0x00000020,   // 5    removed by entering combat 
     65    AURA_INTERRUPT_FLAG_JUMP                = 0x00000020,   // 5    removed by entering combat 
    6666    AURA_INTERRUPT_FLAG_NOT_MOUNTED         = 0x00000040,   // 6    removed by unmounting 
    6767    AURA_INTERRUPT_FLAG_NOT_ABOVEWATER      = 0x00000080,   // 7    removed by entering water 
    6868    AURA_INTERRUPT_FLAG_NOT_UNDERWATER      = 0x00000100,   // 8    removed by leaving water 
    6969    AURA_INTERRUPT_FLAG_NOT_SHEATHED        = 0x00000200,   // 9    removed by unsheathing 
    70     AURA_INTERRUPT_FLAG_UNK10               = 0x00000400,   // 10 
    71     AURA_INTERRUPT_FLAG_UNK11               = 0x00000800,   // 11 
    72     AURA_INTERRUPT_FLAG_UNK12               = 0x00001000,   // 12   removed by attack? 
    73     AURA_INTERRUPT_FLAG_UNK13               = 0x00002000,   // 13 
    74     AURA_INTERRUPT_FLAG_STEALTH             = 0x00003C00, 
     70    AURA_INTERRUPT_FLAG_LOOT                = 0x00000400,   // 10 
     71    AURA_INTERRUPT_FLAG_MOUNT               = 0x00000800,   // 11   removed by mounting 
     72    AURA_INTERRUPT_FLAG_ATTACK              = 0x00001000,   // 12   removed by attacking 
     73    AURA_INTERRUPT_FLAG_CAST                = 0x00002000,   // 13   ??? 
    7574    AURA_INTERRUPT_FLAG_UNK14               = 0x00004000,   // 14 
    76     AURA_INTERRUPT_FLAG_UNK15               = 0x00008000,   // 15   removed by casting a spell? 
     75    AURA_INTERRUPT_FLAG_TRANSFORM           = 0x00008000,   // 15   removed by transform? 
    7776    AURA_INTERRUPT_FLAG_UNK16               = 0x00010000,   // 16 
    78     AURA_INTERRUPT_FLAG_MOUNTING            = 0x00020000,   // 17   removed by mounting 
     77    AURA_INTERRUPT_FLAG_UNK17               = 0x00020000,   // 17   misdirect, aspect, swim speed 
    7978    AURA_INTERRUPT_FLAG_NOT_SEATED          = 0x00040000,   // 18   removed by standing up 
    8079    AURA_INTERRUPT_FLAG_CHANGE_MAP          = 0x00080000,   // 19   leaving map/getting teleported 
    81     AURA_INTERRUPT_FLAG_UNK20               = 0x00100000,   // 20 
     80    AURA_INTERRUPT_FLAG_UNATTACKABLE        = 0x00100000,   // 20   invulnerable or stealth 
    8281    AURA_INTERRUPT_FLAG_UNK21               = 0x00200000,   // 21 
    83     AURA_INTERRUPT_FLAG_UNK22               = 0x00400000,   // 22 
     82    AURA_INTERRUPT_FLAG_TELEPORTED          = 0x00400000,   // 22 
    8483    AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT    = 0x00800000,   // 23   removed by entering pvp combat 
    8584    AURA_INTERRUPT_FLAG_DIRECT_DAMAGE       = 0x01000000    // 24   removed by any direct damage 
     
    845844 
    846845        uint16 GetMaxSkillValueForLevel(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } 
     846        void RemoveSpellbyDamageTaken(uint32 damage, uint32 spell); 
    847847        uint32 DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss); 
    848848        void DealFlatDamage(Unit *pVictim, SpellEntry const *spellInfo, uint32 *damage, CleanDamage *cleanDamage, bool *crit = false, bool isTriggeredSpell = false); 
     
    903903 
    904904        bool isInCombat()  const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); } 
     905        void CombatStart(Unit* target); 
    905906        void SetInCombatState(bool PvP); 
    906907        void SetInCombatWith(Unit* enemy); 
     
    13351336        AuraList m_modAuras[TOTAL_AURAS]; 
    13361337        AuraList m_interruptableAuras; 
     1338        AuraList m_ccAuras; 
    13371339        float m_auraModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_END]; 
    13381340        float m_weaponDamage[MAX_ATTACK][2];