mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11332] Avoid use direct mechanic names in loop bounds for version portability.
This commit is contained in:
parent
16c562b7a0
commit
6f34696350
3 changed files with 5 additions and 2 deletions
|
|
@ -1001,6 +1001,9 @@ enum Mechanics
|
|||
MECHANIC_ENRAGED = 31
|
||||
};
|
||||
|
||||
#define FIRST_MECHANIC 1
|
||||
#define MAX_MECHANIC 32
|
||||
|
||||
// Used for spell 42292 Immune Movement Impairment and Loss of Control (0x49967da6)
|
||||
#define IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK ( \
|
||||
(1<<(MECHANIC_CHARM -1))|(1<<(MECHANIC_DISORIENTED-1))|(1<<(MECHANIC_FEAR -1))| \
|
||||
|
|
|
|||
|
|
@ -8718,7 +8718,7 @@ int32 Unit::CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMas
|
|||
int32 mechanicMod = 0;
|
||||
uint32 mechanicMask = GetSpellMechanicMask(spellProto, effectMask);
|
||||
|
||||
for(int32 mechanic = MECHANIC_CHARM; mechanic <= MECHANIC_ENRAGED; ++mechanic)
|
||||
for(int32 mechanic = FIRST_MECHANIC; mechanic < MAX_MECHANIC; ++mechanic)
|
||||
{
|
||||
if (!(mechanicMask & (1 << (mechanic-1))))
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11331"
|
||||
#define REVISION_NR "11332"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue