Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo *GetSpellProto is now GetSpellInfo *SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].* *sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo() *SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff() *SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class. *GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections *code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff);
|
||||
|
||||
void SpellHit(Unit* /*source*/, const SpellEntry *spell)
|
||||
void SpellHit(Unit* /*source*/, const SpellInfo *spell)
|
||||
{
|
||||
if (spell->Mechanic == MECHANIC_DISARM)
|
||||
DoScriptText(SAY_DISARMED, me);
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
CAST_CRE(pMalchezaar)->AI()->KilledUnit(who);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*who*/, const SpellEntry *spell)
|
||||
void SpellHit(Unit* /*who*/, const SpellInfo *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_INFERNAL_RELAY)
|
||||
{
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
|
||||
void EnfeebleHealthEffect()
|
||||
{
|
||||
const SpellEntry *info = GetSpellStore()->LookupEntry(SPELL_ENFEEBLE_EFFECT);
|
||||
const SpellInfo *info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT);
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
|
||||
@@ -486,12 +486,12 @@ public:
|
||||
DrinkInturrupted = true;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pAttacker*/, const SpellEntry* Spell)
|
||||
void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell)
|
||||
{
|
||||
//We only care about interrupt effects and only if they are durring a spell currently being casted
|
||||
if ((Spell->Effect[0] != SPELL_EFFECT_INTERRUPT_CAST &&
|
||||
Spell->Effect[1] != SPELL_EFFECT_INTERRUPT_CAST &&
|
||||
Spell->Effect[2] != SPELL_EFFECT_INTERRUPT_CAST) || !me->IsNonMeleeSpellCasted(false))
|
||||
if ((Spell->Effects[0].Effect != SPELL_EFFECT_INTERRUPT_CAST &&
|
||||
Spell->Effects[1].Effect != SPELL_EFFECT_INTERRUPT_CAST &&
|
||||
Spell->Effects[2].Effect != SPELL_EFFECT_INTERRUPT_CAST) || !me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
//Interrupt effect
|
||||
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry *Spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo *Spell)
|
||||
{
|
||||
if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10)))
|
||||
{
|
||||
@@ -1080,7 +1080,7 @@ public:
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry *Spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo *Spell)
|
||||
{
|
||||
if (Spell->Id == SPELL_DRINK_POISON)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user