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:
@@ -69,12 +69,6 @@ public:
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
pos = 0;
|
||||
SpellEntry *TempSpell = GET_SPELL(SPELL_SLEEP);
|
||||
if (TempSpell && TempSpell->EffectImplicitTargetA[0] != 1)
|
||||
{
|
||||
TempSpell->EffectImplicitTargetA[0] = 1;
|
||||
TempSpell->EffectImplicitTargetB[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 SwarmTimer;
|
||||
|
||||
@@ -60,9 +60,6 @@ public:
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
pos = 0;
|
||||
SpellEntry *TempSpell = GET_SPELL(SPELL_HOWL_OF_AZGALOR);
|
||||
if (TempSpell)
|
||||
TempSpell->EffectRadiusIndex[0] = 12;//100yards instead of 50000?!
|
||||
}
|
||||
|
||||
uint32 RainTimer;
|
||||
|
||||
@@ -57,12 +57,6 @@ public:
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
pos = 0;
|
||||
SpellEntry *TempSpell = GET_SPELL(SPELL_MARK);
|
||||
if (TempSpell && TempSpell->EffectImplicitTargetA[0] != 1)
|
||||
{
|
||||
TempSpell->EffectImplicitTargetA[0] = 1;
|
||||
TempSpell->EffectImplicitTargetB[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 CleaveTimer;
|
||||
|
||||
+1
-1
@@ -1215,7 +1215,7 @@ class npc_crate_helper : public CreatureScript
|
||||
_marked = false;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellEntry const* spell)
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_ARCANE_DISRUPTION && !_marked)
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry* spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
|
||||
{
|
||||
if (SpellCorrupt_Timer)
|
||||
return;
|
||||
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
DoScriptText(SAY_KILL, me);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell)
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST ||
|
||||
pSpell->Id == SPELL_BREATH_WEST_TO_EAST ||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellEntry* pSpell)
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* pSpell)
|
||||
{
|
||||
//Workaround - Couldn't find a way to group this spells (All Eruption)
|
||||
if (((pSpell->Id >= 17086 && pSpell->Id <= 17095) ||
|
||||
|
||||
@@ -157,7 +157,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry *entry)
|
||||
void SpellHit(Unit* caster, const SpellInfo *entry)
|
||||
{
|
||||
if (caster == me)
|
||||
return;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
|
||||
void SpellHit(Unit* Hitter, const SpellEntry *Spellkind)
|
||||
void SpellHit(Unit* Hitter, const SpellInfo *Spellkind)
|
||||
{
|
||||
if (!spellhit &&
|
||||
Hitter->GetTypeId() == TYPEID_PLAYER &&
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* Caster, const SpellEntry *Spell)
|
||||
void SpellHit(Unit* Caster, const SpellInfo *Spell)
|
||||
{
|
||||
if (Spell->SpellFamilyFlags[2] & 0x080000000)
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell)
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell)
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN)
|
||||
ClearSleeping();
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, SpellEntry const* pSpell)
|
||||
void SpellHit(Unit* /*pCaster*/, SpellInfo const* pSpell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_KODO_KOMBO_GOSSIP)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
work = true;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry * spell)
|
||||
void SpellHit(Unit* caster, const SpellInfo * spell)
|
||||
{
|
||||
if (spell->Id == SPELL_AWAKEN_PEON && caster->GetTypeId() == TYPEID_PLAYER
|
||||
&& CAST_PLR(caster)->GetQuestStatus(QUEST_LAZY_PEONS) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -391,7 +391,7 @@ class npc_troll_volunteer : public CreatureScript
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellEntry const* spell)
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_AOE_TURNIN && caster->GetEntry() == NPC_URUZIN && !_complete)
|
||||
{
|
||||
@@ -424,9 +424,9 @@ class spell_mount_check : public SpellScriptLoader
|
||||
class spell_mount_check_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mount_check_AuraScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_MOUNTING_CHECK))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MOUNTING_CHECK))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -472,11 +472,11 @@ class spell_voljin_war_drums : public SpellScriptLoader
|
||||
class spell_voljin_war_drums_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_voljin_war_drums_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_MOTIVATE_1))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MOTIVATE_1))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(SPELL_MOTIVATE_2))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MOTIVATE_2))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -529,12 +529,12 @@ class spell_voodoo : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_voodoo_SpellScript)
|
||||
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_BREW) || !sSpellStore.LookupEntry(SPELL_GHOSTLY) ||
|
||||
!sSpellStore.LookupEntry(SPELL_HEX1) || !sSpellStore.LookupEntry(SPELL_HEX2) ||
|
||||
!sSpellStore.LookupEntry(SPELL_HEX3) || !sSpellStore.LookupEntry(SPELL_GROW) ||
|
||||
!sSpellStore.LookupEntry(SPELL_LAUNCH))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_BREW) || !sSpellMgr->GetSpellInfo(SPELL_GHOSTLY) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HEX1) || !sSpellMgr->GetSpellInfo(SPELL_HEX2) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HEX3) || !sSpellMgr->GetSpellInfo(SPELL_GROW) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_LAUNCH))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -701,16 +701,16 @@ class spell_ooze_zap : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_ooze_zap_SpellScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_OOZE_ZAP))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_OOZE_ZAP))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
SpellCastResult CheckRequirement()
|
||||
{
|
||||
if (!GetCaster()->HasAura(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_1)))
|
||||
if (!GetCaster()->HasAura(GetSpellInfo()->Effects[EFFECT_1].CalcValue()))
|
||||
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; // This is actually correct
|
||||
|
||||
if (!GetTargetUnit())
|
||||
@@ -748,9 +748,9 @@ class spell_ooze_zap_channel_end : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_ooze_zap_channel_end_SpellScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_OOZE_ZAP_CHANNEL_END))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_OOZE_ZAP_CHANNEL_END))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -784,9 +784,9 @@ class spell_energize_aoe : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_energize_aoe_SpellScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_ENERGIZED))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ENERGIZED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -795,7 +795,7 @@ class spell_energize_aoe : public SpellScriptLoader
|
||||
{
|
||||
for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end();)
|
||||
{
|
||||
if ((*itr)->GetTypeId() == TYPEID_PLAYER && (*itr)->ToPlayer()->GetQuestStatus(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_1)) == QUEST_STATUS_INCOMPLETE)
|
||||
if ((*itr)->GetTypeId() == TYPEID_PLAYER && (*itr)->ToPlayer()->GetQuestStatus(GetSpellInfo()->Effects[EFFECT_1].CalcValue()) == QUEST_STATUS_INCOMPLETE)
|
||||
++itr;
|
||||
else
|
||||
unitList.erase(itr++);
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
me->UpdateEntry(NPC_KYLE_FRENZIED);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
|
||||
void SpellHit(Unit* pCaster, SpellInfo const* pSpell)
|
||||
{
|
||||
if (!me->getVictim() && !bEvent && pSpell->Id == SPELL_LUNCH)
|
||||
{
|
||||
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry *spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY)
|
||||
{
|
||||
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell)
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell)
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO)
|
||||
ClearFaint();
|
||||
|
||||
Reference in New Issue
Block a user