mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define. I64FMTD renamed to UI64FMTD for more clear name. * Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals. Please always use UI64LIT(0x00001) instead less portable 0x00001LL
This commit is contained in:
parent
e8cd008005
commit
2a27a44e2a
36 changed files with 372 additions and 362 deletions
|
|
@ -138,17 +138,17 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
// family flags 18(Molten), 25(Frost/Ice), 28(Mage)
|
||||
if (spellInfo->SpellFamilyFlags & 0x12040000)
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x12040000))
|
||||
return SPELL_MAGE_ARMOR;
|
||||
|
||||
if ((spellInfo->SpellFamilyFlags & 0x1000000) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)
|
||||
if ((spellInfo->SpellFamilyFlags & UI64LIT(0x1000000)) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)
|
||||
return SPELL_MAGE_POLYMORPH;
|
||||
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
if (spellInfo->SpellFamilyFlags & 0x00008000010000LL)
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x00008000010000))
|
||||
return SPELL_POSITIVE_SHOUT;
|
||||
|
||||
break;
|
||||
|
|
@ -160,7 +160,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
return SPELL_CURSE;
|
||||
|
||||
// Warlock (Demon Armor | Demon Skin | Fel Armor)
|
||||
if (spellInfo->SpellFamilyFlags & 0x2000002000000000LL || spellInfo->SpellFamilyFlags2 & 0x00000010)
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x2000002000000000) || spellInfo->SpellFamilyFlags2 & 0x00000010)
|
||||
return SPELL_WARLOCK_ARMOR;
|
||||
|
||||
break;
|
||||
|
|
@ -172,7 +172,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
return SPELL_STING;
|
||||
|
||||
// only hunter aspects have this (but not all aspects in hunter family)
|
||||
if( spellInfo->SpellFamilyFlags & 0x0044000000380000LL || spellInfo->SpellFamilyFlags2 & 0x00003010)
|
||||
if( spellInfo->SpellFamilyFlags & UI64LIT(0x0044000000380000) || spellInfo->SpellFamilyFlags2 & 0x00003010)
|
||||
return SPELL_ASPECT;
|
||||
|
||||
if( spellInfo->SpellFamilyFlags2 & 0x00000002 )
|
||||
|
|
@ -185,10 +185,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
if (IsSealSpell(spellInfo))
|
||||
return SPELL_SEAL;
|
||||
|
||||
if (spellInfo->SpellFamilyFlags & 0x0000000011010002LL)
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x0000000011010002))
|
||||
return SPELL_BLESSING;
|
||||
|
||||
if ((spellInfo->SpellFamilyFlags & 0x00000820180400LL) && (spellInfo->AttributesEx3 & 0x200))
|
||||
if ((spellInfo->SpellFamilyFlags & UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200))
|
||||
return SPELL_JUDGEMENT;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
|
|
@ -1191,7 +1191,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
return false;
|
||||
|
||||
// Improved Hamstring -> Hamstring (multi-family check)
|
||||
if( (spellInfo_2->SpellFamilyFlags & 2) && spellInfo_1->Id == 23694 )
|
||||
if( (spellInfo_2->SpellFamilyFlags & UI64LIT(0x2)) && spellInfo_1->Id == 23694 )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
|
@ -1223,7 +1223,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
return false;
|
||||
|
||||
// Improved Wing Clip -> Wing Clip (multi-family check)
|
||||
if( (spellInfo_2->SpellFamilyFlags & 0x40) && spellInfo_1->Id == 19229 )
|
||||
if( (spellInfo_2->SpellFamilyFlags & UI64LIT(0x40)) && spellInfo_1->Id == 19229 )
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1248,13 +1248,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_MAGE )
|
||||
{
|
||||
// Blizzard & Chilled (and some other stacked with blizzard spells
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x80) && (spellInfo_2->SpellFamilyFlags & 0x100000) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x80) && (spellInfo_1->SpellFamilyFlags & 0x100000) )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x80)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x100000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x80)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x100000)) )
|
||||
return false;
|
||||
|
||||
// Blink & Improved Blink
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x0000000000010000LL) && (spellInfo_2->SpellVisual[0] == 72 && spellInfo_2->SpellIconID == 1499) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x0000000000010000LL) && (spellInfo_1->SpellVisual[0] == 72 && spellInfo_1->SpellIconID == 1499) )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellInfo_2->SpellVisual[0] == 72 && spellInfo_2->SpellIconID == 1499) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellInfo_1->SpellVisual[0] == 72 && spellInfo_1->SpellIconID == 1499) )
|
||||
return false;
|
||||
}
|
||||
// Detect Invisibility and Mana Shield (multi-family check)
|
||||
|
|
@ -1298,8 +1298,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_WARRIOR )
|
||||
{
|
||||
// Rend and Deep Wound
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x20) && (spellInfo_2->SpellFamilyFlags & 0x1000000000LL) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x20) && (spellInfo_1->SpellFamilyFlags & 0x1000000000LL) )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x1000000000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x1000000000)) )
|
||||
return false;
|
||||
|
||||
// Battle Shout and Rampage
|
||||
|
|
@ -1309,7 +1309,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
}
|
||||
|
||||
// Hamstring -> Improved Hamstring (multi-family check)
|
||||
if( (spellInfo_1->SpellFamilyFlags & 2) && spellInfo_2->Id == 23694 )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x2)) && spellInfo_2->Id == 23694 )
|
||||
return false;
|
||||
|
||||
// Defensive Stance and Scroll of Protection (multi-family check)
|
||||
|
|
@ -1325,17 +1325,17 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_PRIEST )
|
||||
{
|
||||
//Devouring Plague and Shadow Vulnerability
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x2000000) && (spellInfo_2->SpellFamilyFlags & 0x800000000LL) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x2000000) && (spellInfo_1->SpellFamilyFlags & 0x800000000LL) )
|
||||
if ((spellInfo_1->SpellFamilyFlags & UI64LIT(0x2000000)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x800000000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x2000000)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x800000000)))
|
||||
return false;
|
||||
|
||||
//StarShards and Shadow Word: Pain
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x200000) && (spellInfo_2->SpellFamilyFlags & 0x8000) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x200000) && (spellInfo_1->SpellFamilyFlags & 0x8000) )
|
||||
if ((spellInfo_1->SpellFamilyFlags & UI64LIT(0x200000)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x8000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x200000)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x8000)))
|
||||
return false;
|
||||
// Dispersion
|
||||
if( (spellInfo_1->Id == 47585 && spellInfo_2->Id == 60069) ||
|
||||
(spellInfo_2->Id == 47585 && spellInfo_1->Id == 60069) )
|
||||
if ((spellInfo_1->Id == 47585 && spellInfo_2->Id == 60069) ||
|
||||
(spellInfo_2->Id == 47585 && spellInfo_1->Id == 60069))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1343,8 +1343,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_DRUID )
|
||||
{
|
||||
//Omen of Clarity and Blood Frenzy
|
||||
if( (spellInfo_1->SpellFamilyFlags == 0x0 && spellInfo_1->SpellIconID == 108) && (spellInfo_2->SpellFamilyFlags & 0x20000000000000LL) ||
|
||||
(spellInfo_2->SpellFamilyFlags == 0x0 && spellInfo_2->SpellIconID == 108) && (spellInfo_1->SpellFamilyFlags & 0x20000000000000LL) )
|
||||
if( (spellInfo_1->SpellFamilyFlags == UI64LIT(0x0) && spellInfo_1->SpellIconID == 108) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x20000000000000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags == UI64LIT(0x0) && spellInfo_2->SpellIconID == 108) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20000000000000)) )
|
||||
return false;
|
||||
|
||||
// Tree of Life (Shapeshift) and 34123 Tree of Life (Passive)
|
||||
|
|
@ -1398,13 +1398,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
if( spellInfo_2->SpellFamilyName == SPELLFAMILY_HUNTER )
|
||||
{
|
||||
// Rapid Fire & Quick Shots
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x20) && (spellInfo_2->SpellFamilyFlags & 0x20000000000LL) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x20) && (spellInfo_1->SpellFamilyFlags & 0x20000000000LL) )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x20000000000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x20)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x20000000000)) )
|
||||
return false;
|
||||
|
||||
// Serpent Sting & (Immolation/Explosive Trap Effect)
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x4) && (spellInfo_2->SpellFamilyFlags & 0x00000004000LL) ||
|
||||
(spellInfo_2->SpellFamilyFlags & 0x4) && (spellInfo_1->SpellFamilyFlags & 0x00000004000LL) )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x4)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x00000004000)) ||
|
||||
(spellInfo_2->SpellFamilyFlags & UI64LIT(0x4)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x00000004000)) )
|
||||
return false;
|
||||
|
||||
// Bestial Wrath
|
||||
|
|
@ -1413,7 +1413,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
}
|
||||
|
||||
// Wing Clip -> Improved Wing Clip (multi-family check)
|
||||
if( (spellInfo_1->SpellFamilyFlags & 0x40) && spellInfo_2->Id == 19229 )
|
||||
if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x40)) && spellInfo_2->Id == 19229 )
|
||||
return false;
|
||||
|
||||
// Concussive Shot and Imp. Concussive Shot (multi-family check)
|
||||
|
|
@ -2712,34 +2712,34 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
|||
case SPELLFAMILY_ROGUE:
|
||||
{
|
||||
// Kidney Shot
|
||||
if (spellproto->SpellFamilyFlags & 0x00000200000LL)
|
||||
if (spellproto->SpellFamilyFlags & UI64LIT(0x00000200000))
|
||||
return DIMINISHING_KIDNEYSHOT;
|
||||
// Blind
|
||||
else if (spellproto->SpellFamilyFlags & 0x00001000000LL)
|
||||
else if (spellproto->SpellFamilyFlags & UI64LIT(0x00001000000))
|
||||
return DIMINISHING_BLIND_CYCLONE;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARLOCK:
|
||||
{
|
||||
// Fear
|
||||
if (spellproto->SpellFamilyFlags & 0x40840000000LL)
|
||||
if (spellproto->SpellFamilyFlags & UI64LIT(0x40840000000))
|
||||
return DIMINISHING_WARLOCK_FEAR;
|
||||
// Curses/etc
|
||||
else if (spellproto->SpellFamilyFlags & 0x00080000000LL)
|
||||
else if (spellproto->SpellFamilyFlags & UI64LIT(0x00080000000))
|
||||
return DIMINISHING_LIMITONLY;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Cyclone
|
||||
if (spellproto->SpellFamilyFlags & 0x02000000000LL)
|
||||
if (spellproto->SpellFamilyFlags & UI64LIT(0x02000000000))
|
||||
return DIMINISHING_BLIND_CYCLONE;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Hamstring - limit duration to 10s in PvP
|
||||
if (spellproto->SpellFamilyFlags & 0x00000000002LL)
|
||||
if (spellproto->SpellFamilyFlags & UI64LIT(0x00000000002))
|
||||
return DIMINISHING_LIMITONLY;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue