diff options
Diffstat (limited to 'src/server/scripts')
124 files changed, 552 insertions, 625 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 185cf05864d..10f7f2ad4e4 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -976,11 +976,11 @@ public: { // reset all states for (int i = 1; i <= 32; ++i) - unit->ModifyAuraState(AuraState(i), false); + unit->ModifyAuraState(AuraStateType(i), false); return true; } - unit->ModifyAuraState(AuraState(abs(state)), state > 0); + unit->ModifyAuraState(AuraStateType(abs(state)), state > 0); return true; } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index b93c995351b..eee9ebfc809 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -80,13 +80,13 @@ public: // number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form uint32 spell = handler->extractSpellIdFromLink((char*)args); - if (!spell || !sSpellStore.LookupEntry(spell)) + if (!spell || !sSpellMgr->GetSpellInfo(spell)) return false; char const* allStr = strtok(NULL, " "); bool allRanks = allStr ? (strncmp(allStr, "all", strlen(allStr)) == 0) : false; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer())) { handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spell); @@ -118,13 +118,13 @@ public: static bool HandleLearnAllGMCommand(ChatHandler* handler, const char* /*args*/) { - for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i) + for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i) { - SpellEntry const* spellInfo = sSpellStore.LookupEntry(i); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; - if (!sSpellMgr->IsSkillTypeSpell(i, SKILL_INTERNAL)) + if (!spellInfo->IsAbilityOfSkillType(SKILL_INTERNAL)) continue; handler->GetSession()->GetPlayer()->learnSpell(i, false); @@ -154,12 +154,12 @@ public: if (!entry) continue; - SpellEntry const *spellInfo = sSpellStore.LookupEntry(entry->spellId); + SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(entry->spellId); if (!spellInfo) continue; // skip server-side/triggered spells - if (spellInfo->spellLevel == 0) + if (spellInfo->SpellLevel == 0) continue; // skip wrong class/race skills @@ -218,7 +218,7 @@ public: if (!spellId) // ??? none spells in talent continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; @@ -297,7 +297,7 @@ public: if (!spellid) // ??? none spells in talent continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellid); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; @@ -456,7 +456,7 @@ public: if (skillLine->classmask && (skillLine->classmask & classmask) == 0) continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false)) continue; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 5483b5f6a3f..2cc56f9f502 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -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); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 0d4e2edb813..a9dd97fef28 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index a0daa2b5cf7..dfa28111935 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -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 diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 831c1ca1f8e..3d497e3811a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -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) { diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index dfb864fc30f..d39f8e455ff 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -138,14 +138,14 @@ public: if (lList.isEmpty()) return; - SpellEntry const* pSpell = GetSpellStore()->LookupEntry(SPELL_ORB_KILL_CREDIT); + SpellInfo const* pSpell = sSpellMgr->GetSpellInfo(SPELL_ORB_KILL_CREDIT); for (Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i) { if (Player* player = i->getSource()) { - if (pSpell && pSpell->EffectMiscValue[0]) - player->KilledMonsterCredit(pSpell->EffectMiscValue[0], 0); + if (pSpell && pSpell->Effects[0].MiscValue) + player->KilledMonsterCredit(pSpell->Effects[0].MiscValue, 0); } } } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 14d8d23de4e..5402657a350 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -436,7 +436,7 @@ public: m_bIsDuelInProgress = false; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellInfo* pSpell) { if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL) { @@ -625,7 +625,7 @@ public: { npc_salanar_the_horsemanAI(Creature* c) : ScriptedAI(c) {} - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (spell->Id == DELIVER_STOLEN_HORSE) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 774b301ef58..af534444468 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -71,7 +71,7 @@ public: me->RestoreFaction(); } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !uiSpeech_counter) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 95179a92d29..5262ed6620c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -143,13 +143,6 @@ public: mob_wisp_invisAI(Creature* c) : ScriptedAI(c) { Creaturetype = delay = spell = spell2 = 0; - //that's hack but there are no info about range of this spells in dbc - SpellEntry *wisp = GET_SPELL(SPELL_WISP_BLUE); - if (wisp) - wisp->rangeIndex = 6; //100 yards - SpellEntry *port = GET_SPELL(SPELL_WISP_FLIGHT_PORT); - if (port) - port->rangeIndex = 6; } uint32 Creaturetype; @@ -183,7 +176,7 @@ public: DoCast(me, spell); } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_WISP_FLIGHT_PORT && Creaturetype == 4) me->SetDisplayId(2027); @@ -290,7 +283,7 @@ public: } } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (!withbody) return; @@ -534,7 +527,7 @@ public: return NULL; } - void SpellHitTarget(Unit* unit, const SpellEntry* spell) + void SpellHitTarget(Unit* unit, const SpellInfo* spell) { if (spell->Id == SPELL_CONFLAGRATION && unit->HasAura(SPELL_CONFLAGRATION)) SaySound(SAY_CONFLAGRATION, unit); @@ -553,7 +546,7 @@ public: pInstance->SetData(DATA_HORSEMAN_EVENT, DONE); } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (withhead) return; @@ -781,7 +774,7 @@ public: void EnterCombat(Unit* /*who*/){} - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_SPROUTING) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index a21b5f00a22..a10f3ee4a5c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -157,7 +157,7 @@ public: } } - void SpellHit(Unit* /*who*/, const SpellEntry* pSpell) + void SpellHit(Unit* /*who*/, const SpellInfo* pSpell) { //When hit with ressurection say text if (pSpell->Id == SPELL_SCARLETRESURRECTION) diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 09e913a2cf7..249463cd090 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -148,7 +148,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (caster->GetTypeId() == TYPEID_PLAYER) { @@ -224,7 +224,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (!Tagged && spell->Id == SPELL_EGAN_BLASTER) Tagged = true; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 4e1b170b3a3..e25211f454a 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -181,7 +181,7 @@ public: me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void SpellHitTarget(Unit* target, const SpellEntry* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { switch(spell->Id) { @@ -476,7 +476,7 @@ public: me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void SpellHitTarget(Unit* target, const SpellEntry* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { switch(spell->Id) { @@ -701,7 +701,7 @@ public: void EnterCombat(Unit* /*who*/){} - void SpellHitTarget(Unit* target, const SpellEntry* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { switch(spell->Id) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index b1d627c565f..b156caa911f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -118,17 +118,6 @@ public: boss_felmystAI(Creature* c) : ScriptedAI(c) { pInstance = c->GetInstanceScript(); - - // wait for core patch be accepted - /*SpellEntry *TempSpell = GET_SPELL(SPELL_ENCAPSULATE_EFFECT); - if (TempSpell->SpellIconID == 2294) - TempSpell->SpellIconID = 2295; - TempSpell = GET_SPELL(SPELL_VAPOR_TRIGGER); - if ((TempSpell->Attributes & SPELL_ATTR0_PASSIVE) == 0) - TempSpell->Attributes |= SPELL_ATTR0_PASSIVE; - TempSpell = GET_SPELL(SPELL_FOG_CHARM2); - if ((TempSpell->Attributes & SPELL_ATTR0_PASSIVE) == 0) - TempSpell->Attributes |= SPELL_ATTR0_PASSIVE;*/ } InstanceScript *pInstance; @@ -203,7 +192,7 @@ public: pInstance->SetData(DATA_FELMYST_EVENT, DONE); } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { // workaround for linked aura /*if (spell->Id == SPELL_VAPOR_FORCE) diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 8b18129f5a0..febf43f1614 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -122,9 +122,6 @@ public: DoorGUID = 0; bJustReset = false; me->setActive(true); - SpellEntry *TempSpell = GET_SPELL(SPELL_SPECTRAL_BLAST); - if (TempSpell) - TempSpell->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY; } InstanceScript *pInstance; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index cc9cb6bfa35..c713c053222 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -413,7 +413,7 @@ public: Summons.Summon(summoned); } - void SpellHit(Unit* /*caster*/, const SpellEntry* Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) { float x, y, z, o; me->GetHomePosition(x, y, z, o); @@ -475,10 +475,10 @@ public: me->AddUnitState(UNIT_STAT_STUNNED); } - void SpellHit(Unit* /*caster*/, const SpellEntry* Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) { for (uint8 i = 0; i < 3; ++i) - if (Spell->Effect[i] == 38) + if (Spell->Effects[i].Effect == 38) me->DisappearAndDie(); } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 69a54643f63..089c9e9973d 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -112,10 +112,10 @@ class boss_archaedas : public CreatureScript me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { // Being woken up from the altar, start the awaken sequence - if (spell == GetSpellStore()->LookupEntry(SPELL_ARCHAEDAS_AWAKEN)) + if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN)) { me->MonsterYell(SAY_AGGRO, LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, SOUND_AGGRO); @@ -267,9 +267,9 @@ class mob_archaedas_minions : public CreatureScript bAmIAwake = true; } - void SpellHit (Unit* /*caster*/, const SpellEntry *spell) { + void SpellHit (Unit* /*caster*/, const SpellInfo *spell) { // time to wake up, start animation - if (spell == GetSpellStore()->LookupEntry(SPELL_ARCHAEDAS_AWAKEN)) + if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN)) { iAwakenTimer = 5000; bWakingUp = true; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 7d6b5c0de1c..3701383b0ae 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -37,7 +37,6 @@ enum Spells SPELL_GUST_OF_WIND = 43621, SPELL_ELECTRICAL_STORM = 43648, SPELL_BERSERK = 45078, - SPELL_ELECTRICAL_DAMAGE = 43657, SPELL_ELECTRICAL_OVERLOAD = 43658, SPELL_EAGLE_SWOOP = 44732 }; @@ -75,9 +74,6 @@ class boss_akilzon : public CreatureScript { boss_akilzonAI(Creature* c) : ScriptedAI(c) { - SpellEntry *TempSpell = GET_SPELL(SPELL_ELECTRICAL_DAMAGE); - if (TempSpell) - TempSpell->EffectBasePoints[1] = 49;//disable bugged lightning until fixed in core pInstance = c->GetInstanceScript(); } InstanceScript *pInstance; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index b14c6935d62..0a3cdbebdfa 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -61,7 +61,6 @@ EndScriptData */ #define SPELL_SHRED_ARMOR 43243 #define MOB_TOTEM 24224 -#define SPELL_LIGHTNING 43301 enum PhaseHalazzi { @@ -87,10 +86,6 @@ class boss_halazzi : public CreatureScript boss_halazziAI(Creature* c) : ScriptedAI(c) { pInstance = c->GetInstanceScript(); - // need to find out what controls totem's spell cooldown - SpellEntry *TempSpell = GET_SPELL(SPELL_LIGHTNING); - if (TempSpell && TempSpell->CastingTimeIndex != 5) - TempSpell->CastingTimeIndex = 5; // 2000 ms casting time } InstanceScript *pInstance; @@ -147,7 +142,7 @@ class boss_halazzi : public CreatureScript damage = 0; } - void SpellHit(Unit*, const SpellEntry *spell) + void SpellHit(Unit*, const SpellInfo *spell) { if (spell->Id == SPELL_TRANSFORM_SPLIT2) EnterPhase(PHASE_HUMAN); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 1ba92565be2..4962ac285ca 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -454,7 +454,7 @@ class mob_janalai_firebomb : public CreatureScript void Reset() {} - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_FIRE_BOMB_THROW) DoCast(me, SPELL_FIRE_BOMB_DUMMY, true); @@ -685,7 +685,7 @@ public: void UpdateAI(uint32 const /*diff*/) {} - void SpellHit(Unit* /*caster*/, const SpellEntry* spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_HATCH_EGG) { diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 9a54716ca02..83feaad071e 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -610,7 +610,7 @@ class mob_zuljin_vortex : public CreatureScript void EnterCombat(Unit* /*pTarget*/) {} - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_ZAP_INFORM) DoCast(caster, SPELL_ZAP_DAMAGE, true); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 0f97f34ebbf..fe6780f6768 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -91,7 +91,7 @@ class npc_forest_frog : public CreatureScript } } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && me->GetEntry() == ENTRY_FOREST_FROG) { diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp index 7dc32e22e56..6b16eb2937b 100644 --- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp @@ -120,7 +120,7 @@ public: PlayerGUID = 0; } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (!caster) return; diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp index 7fb230dcc07..a46b0ca7b38 100644 --- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp @@ -85,7 +85,7 @@ public: } } - void SpellHit(Unit* Hitter, const SpellEntry *Spellkind) + void SpellHit(Unit* Hitter, const SpellInfo *Spellkind) { if ((Spellkind->Id == SPELL_SHIMMERING_VESSEL) && !spellHit && (Hitter->GetTypeId() == TYPEID_PLAYER) && (CAST_PLR(Hitter)->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))) diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp index 39c4b650f9a..00f8274bf31 100644 --- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp @@ -59,7 +59,7 @@ public: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (caster->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index 4e50126cf92..aafddbd0884 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -48,10 +48,10 @@ class spell_ex_5581 : public SpellScriptLoader // function called on server startup // checks if script has data required for it to work - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { // check if spellid 70522 exists in dbc, we will trigger it later - if (!sSpellStore.LookupEntry(SPELL_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED)) return false; return true; } @@ -147,10 +147,10 @@ class spell_ex_66244 : public SpellScriptLoader PrepareAuraScript(spell_ex_66244AuraScript); // function called on server startup // checks if script has data required for it to work - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { // check if spellid exists in dbc, we will trigger it later - if (!sSpellStore.LookupEntry(SPELL_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED)) return false; return true; } @@ -379,7 +379,7 @@ class spell_ex : public SpellScriptLoader { PrepareSpellScript(spell_ex_SpellScript); - //bool Validate(SpellEntry const* spellEntry){return true;} + //bool Validate(SpellInfo const* spellEntry){return true;} //bool Load(){return true;} //void Unload(){} @@ -406,7 +406,7 @@ class spell_ex : public SpellScriptLoader class spell_ex_AuraScript : public AuraScript { PrepareAuraScript(spell_ex) - //bool Validate(SpellEntry const* spellEntry){return true;} + //bool Validate(SpellInfo const* spellEntry){return true;} //bool Load(){return true;} //void Unload(){} diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index 6d6843c9720..d590bc5cfe2 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -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; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 25474b47c0f..477e0601d9e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -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; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index f258444eb62..337c4cbb1f9 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -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; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 2159d4bafd5..678a38ffeca 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -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) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index adffa01afbb..2b2151daf02 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -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; diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index 3fedbeb583c..d9eaf0d255c 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -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) || diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index bd66602a24b..e5b6d79f912 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -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; diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp index 57001552302..d49a776fa4d 100644 --- a/src/server/scripts/Kalimdor/azshara.cpp +++ b/src/server/scripts/Kalimdor/azshara.cpp @@ -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 && diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 35ba092e5cf..3e8bcbef02e 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -111,7 +111,7 @@ public: } } - void SpellHit(Unit* Caster, const SpellEntry *Spell) + void SpellHit(Unit* Caster, const SpellInfo *Spell) { if (Spell->SpellFamilyFlags[2] & 0x080000000) { diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp index 052137f9d2e..3242797d3e7 100644 --- a/src/server/scripts/Kalimdor/darkshore.cpp +++ b/src/server/scripts/Kalimdor/darkshore.cpp @@ -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(); diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index 997de5d9bff..71372f1d9e4 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -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) { diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp index 113afdc2e77..29c36c64628 100644 --- a/src/server/scripts/Kalimdor/durotar.cpp +++ b/src/server/scripts/Kalimdor/durotar.cpp @@ -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; } diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index 13d18a44483..6e11930a441 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -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++); diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp index 2ee707e01ea..d0131068c3f 100644 --- a/src/server/scripts/Kalimdor/mulgore.cpp +++ b/src/server/scripts/Kalimdor/mulgore.cpp @@ -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) { diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp index a94c98823be..f341e47c5e8 100644 --- a/src/server/scripts/Kalimdor/the_barrens.cpp +++ b/src/server/scripts/Kalimdor/the_barrens.cpp @@ -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) { diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp index 4dfd64f4b1e..05ba6b2234e 100644 --- a/src/server/scripts/Kalimdor/ungoro_crater.cpp +++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp @@ -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(); diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp index 6319e30423f..51e2f833d3a 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp @@ -101,7 +101,7 @@ public: } } - void SpellHitTarget(Unit* target, const SpellEntry *spell) + void SpellHitTarget(Unit* target, const SpellInfo *spell) { if (spell->Id == SPELL_INSANITY) { diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index 4bf2a4499c5..784684ad42d 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -312,7 +312,7 @@ class spell_baltharus_enervating_brand : public SpellScriptLoader { PreventDefaultAction(); Unit* target = GetTarget(); - uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()]; + uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; target->CastSpell(target, triggerSpellId, true); if (Unit* caster = GetCaster()) diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index 2dff07f39f2..c960cd1671c 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -367,7 +367,7 @@ public: me->SetInCombatWithZone(); } - /*void SpellHitTarget(Unit* target, const SpellEntry *pSpell) + /*void SpellHitTarget(Unit* target, const SpellInfo *pSpell) { if (pSpell->Id == SPELL_FEL_STREAK) DoCastAOE(SPELL_FEL_INFERNO); //66517 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index f8b831972cb..e6ab05a75e9 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -772,7 +772,7 @@ public: me->SetInCombatWithZone(); } - void SpellHitTarget(Unit* target, const SpellEntry* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { if (spell->Id == SPELL_TRAMPLE && target->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index b93c2c23c65..44385ea83e2 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -254,12 +254,12 @@ struct boss_twin_baseAI : public ScriptedAI m_pInstance->SetData(DATA_HEALTH_TWIN_SHARED, me->GetHealth() >= uiDamage ? me->GetHealth() - uiDamage : 0); } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (caster->ToCreature() == me) - if (spell->Effect[0] == 136) //Effect Heal + if (spell->Effects[0].Effect == 136) //Effect Heal if (m_pInstance) - m_pInstance->SetData(DATA_HEALTH_TWIN_SHARED, me->GetHealth() + me->CountPctFromMaxHealth(spell->EffectBasePoints[0])); + m_pInstance->SetData(DATA_HEALTH_TWIN_SHARED, me->GetHealth() + me->CountPctFromMaxHealth(spell->Effects[EFFECT_0].CalcValue())); } void SummonColorballs(uint8 quantity) diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index 1400c022ce6..76839177230 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -234,7 +234,7 @@ class boss_devourer_of_souls : public CreatureScript } } - void SpellHitTarget(Unit* /*target*/, const SpellEntry *spell) + void SpellHitTarget(Unit* /*target*/, const SpellInfo *spell) { if (spell->Id == H_SPELL_PHANTOM_BLAST) threeFaced = false; diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index 1a3a2802327..809fa8e39ff 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -165,7 +165,7 @@ class boss_garfrost : public CreatureScript events.ScheduleEvent(EVENT_RESUME_ATTACK, 5000); } - void SpellHitTarget(Unit* target, const SpellEntry* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { if (spell->Id == SPELL_PERMAFROST_HELPER) { diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index 79c5e9a8144..57c14993e2d 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -359,7 +359,7 @@ class boss_drakkari_elemental : public CreatureScript me->DespawnOrUnsummon(); } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (spell->Id == SPELL_MERGE) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp index ec891f81664..bf70e8500a7 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp @@ -447,7 +447,7 @@ class boss_prince_keleseth_icc : public CreatureScript me->SetHealth(_spawnHealth); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_INVOCATION_OF_BLOOD_KELESETH) DoAction(ACTION_CAST_INVOCATION); @@ -668,7 +668,7 @@ class boss_prince_taldaram_icc : public CreatureScript me->SetHealth(_spawnHealth); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_INVOCATION_OF_BLOOD_TALDARAM) DoAction(ACTION_CAST_INVOCATION); @@ -916,7 +916,7 @@ class boss_prince_valanar_icc : public CreatureScript DoZoneInCombat(summon); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_INVOCATION_OF_BLOOD_VALANAR) DoAction(ACTION_CAST_INVOCATION); @@ -1470,7 +1470,7 @@ class spell_taldaram_flame_ball_visual : public SpellScriptLoader return; // SPELL_FLAME_SPHERE_SPAWN_EFFECT - if (GetSpellProto()->Id == SPELL_FLAME_SPHERE_SPAWN_EFFECT) + if (GetSpellInfo()->Id == SPELL_FLAME_SPHERE_SPAWN_EFFECT) { target->CastSpell(target, SPELL_BALL_OF_FLAMES, true); target->AI()->DoAction(ACTION_FLAME_BALL_CHASE); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index 651e8759efb..3fe8b7f6aa8 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -488,13 +488,13 @@ class spell_blood_queen_vampiric_bite : public SpellScriptLoader { PrepareSpellScript(spell_blood_queen_vampiric_bite_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR)) + if (!sSpellMgr->GetSpellInfo(SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR)) return false; - if (!sSpellStore.LookupEntry(SPELL_FRENZIED_BLOODTHIRST)) + if (!sSpellMgr->GetSpellInfo(SPELL_FRENZIED_BLOODTHIRST)) return false; - if (!sSpellStore.LookupEntry(SPELL_PRESENCE_OF_THE_DARKFALLEN)) + if (!sSpellMgr->GetSpellInfo(SPELL_PRESENCE_OF_THE_DARKFALLEN)) return false; return true; } @@ -607,9 +607,9 @@ class spell_blood_queen_bloodbolt : public SpellScriptLoader { PrepareSpellScript(spell_blood_queen_bloodbolt_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_TWILIGHT_BLOODBOLT)) + if (!sSpellMgr->GetSpellInfo(SPELL_TWILIGHT_BLOODBOLT)) return false; return true; } @@ -703,9 +703,9 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader { PrepareAuraScript(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE)) + if (!sSpellMgr->GetSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE)) return false; return true; } @@ -713,8 +713,8 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader // this is an additional effect to be executed void PeriodicTick(AuraEffect const* aurEff) { - SpellEntry const* damageSpell = sSpellStore.LookupEntry(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE); - int32 damage = SpellMgr::CalculateSpellEffectAmount(damageSpell, EFFECT_0); + SpellInfo const* damageSpell = sSpellMgr->GetSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE); + int32 damage = damageSpell->Effects[EFFECT_0].CalcValue(); float multiplier = 0.3375f + 0.1f * uint32(aurEff->GetTickNumber()/10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks) damage = int32(damage * multiplier); GetTarget()->CastCustomSpell(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 901ea774339..66f839fe143 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -377,7 +377,7 @@ class boss_deathbringer_saurfang : public CreatureScript instance->HandleGameObject(instance->GetData64(GO_SAURFANG_S_DOOR), false); } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { switch (spell->Id) { @@ -625,7 +625,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript } } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_GRIP_OF_AGONY) { @@ -828,7 +828,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript } } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_GRIP_OF_AGONY) { @@ -930,7 +930,7 @@ class npc_saurfang_event : public CreatureScript _index = data; } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_GRIP_OF_AGONY) { @@ -966,11 +966,11 @@ class spell_deathbringer_blood_link : public SpellScriptLoader { PrepareSpellScript(spell_deathbringer_blood_link_SpellScript); - bool Validate(SpellEntry const* /*spellInfo*/) + bool Validate(SpellInfo const* /*spellInfo*/) { - if (!sSpellStore.LookupEntry(SPELL_BLOOD_LINK_POWER)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLOOD_LINK_POWER)) return false; - if (!sSpellStore.LookupEntry(SPELL_BLOOD_POWER)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLOOD_POWER)) return false; return true; } @@ -1004,9 +1004,9 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader { PrepareAuraScript(spell_deathbringer_blood_link_AuraScript); - bool Validate(SpellEntry const* /*spellInfo*/) + bool Validate(SpellInfo const* /*spellInfo*/) { - if (!sSpellStore.LookupEntry(SPELL_MARK_OF_THE_FALLEN_CHAMPION)) + if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_THE_FALLEN_CHAMPION)) return false; return true; } @@ -1096,9 +1096,9 @@ class spell_deathbringer_rune_of_blood : public SpellScriptLoader { PrepareSpellScript(spell_deathbringer_rune_of_blood_SpellScript); - bool Validate(SpellEntry const* /*spellInfo*/) + bool Validate(SpellInfo const* /*spellInfo*/) { - if (!sSpellStore.LookupEntry(SPELL_BLOOD_LINK_DUMMY)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLOOD_LINK_DUMMY)) return false; return true; } @@ -1131,9 +1131,9 @@ class spell_deathbringer_blood_nova : public SpellScriptLoader { PrepareSpellScript(spell_deathbringer_blood_nova_SpellScript); - bool Validate(SpellEntry const* /*spellInfo*/) + bool Validate(SpellInfo const* /*spellInfo*/) { - if (!sSpellStore.LookupEntry(SPELL_BLOOD_LINK_DUMMY)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLOOD_LINK_DUMMY)) return false; return true; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index dc36c6c72ab..6a58924f938 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -156,7 +156,7 @@ class boss_festergut : public CreatureScript Talk(SAY_KILL); } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (spell->Id == PUNGENT_BLIGHT_HELPER) target->RemoveAurasDueToSpell(INOCULATED_HELPER); @@ -387,9 +387,9 @@ class spell_festergut_gastric_bloat : public SpellScriptLoader { PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_GASTRIC_EXPLOSION)) + if (!sSpellMgr->GetSpellInfo(SPELL_GASTRIC_EXPLOSION)) return false; return true; } @@ -425,9 +425,9 @@ class spell_festergut_blighted_spores : public SpellScriptLoader { PrepareAuraScript(spell_festergut_blighted_spores_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_INOCULATED)) + if (!sSpellMgr->GetSpellInfo(SPELL_INOCULATED)) return false; return true; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index b050f42fc6c..4f8ed4c536f 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -572,7 +572,7 @@ class boss_lady_deathwhisper : public CreatureScript DoCast(cultist, SPELL_DARK_MARTYRDOM_T); } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (spell->Id == SPELL_DARK_MARTYRDOM_T) { @@ -648,7 +648,7 @@ class npc_cult_fanatic : public CreatureScript Events.ScheduleEvent(EVENT_CULTIST_DARK_MARTYRDOM, urand(18000, 32000)); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_DARK_TRANSFORMATION) me->UpdateEntry(NPC_DEFORMED_FANATIC); @@ -726,7 +726,7 @@ class npc_cult_adherent : public CreatureScript Events.ScheduleEvent(EVENT_CULTIST_DARK_MARTYRDOM, urand(18000, 32000)); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_DARK_EMPOWERMENT) me->UpdateEntry(NPC_EMPOWERED_ADHERENT); @@ -810,7 +810,7 @@ class npc_vengeful_shade : public CreatureScript me->AddAura(SPELL_VENGEFUL_BLAST_PASSIVE, me); } - void SpellHitTarget(Unit* /*target*/, SpellEntry const* spell) + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) { switch (spell->Id) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 450875662e4..094e03b9d68 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -333,16 +333,16 @@ class boss_professor_putricide : public CreatureScript { case PHASE_COMBAT_2: { - SpellEntry const* spell = sSpellStore.LookupEntry(SPELL_CREATE_CONCOCTION); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_CREATE_CONCOCTION); DoCast(me, SPELL_CREATE_CONCOCTION); - events.ScheduleEvent(EVENT_PHASE_TRANSITION, GetSpellCastTime(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)) + 100); + events.ScheduleEvent(EVENT_PHASE_TRANSITION, sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 100); break; } case PHASE_COMBAT_3: { - SpellEntry const* spell = sSpellStore.LookupEntry(SPELL_GUZZLE_POTIONS); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_GUZZLE_POTIONS); DoCast(me, SPELL_GUZZLE_POTIONS); - events.ScheduleEvent(EVENT_PHASE_TRANSITION, GetSpellCastTime(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)) + 100); + events.ScheduleEvent(EVENT_PHASE_TRANSITION, sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 100); break; } default: @@ -671,7 +671,7 @@ class npc_volatile_ooze : public CreatureScript _newTargetSelectTimer = 0; } - void SpellHitTarget(Unit* /*target*/, SpellEntry const* spell) + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) { if (!_newTargetSelectTimer && sSpellMgr->GetSpellDifficultyId(spell->Id) == sSpellMgr->GetSpellDifficultyId(SPELL_OOZE_ERUPTION)) _newTargetSelectTimer = 1000; @@ -719,7 +719,7 @@ class spell_putricide_gaseous_bloat : public SpellScriptLoader Unit* target = GetTarget(); if (Unit* caster = GetCaster()) { - target->RemoveAuraFromStack(GetSpellProto()->Id, GetCasterGUID()); + target->RemoveAuraFromStack(GetSpellInfo()->Id, GetCasterGUID()); if (!target->HasAura(GetId())&& caster->GetTypeId() == TYPEID_UNIT) caster->ToCreature()->DespawnOrUnsummon(); } @@ -760,11 +760,11 @@ class spell_putricide_ooze_channel : public SpellScriptLoader { PrepareSpellScript(spell_putricide_ooze_channel_SpellScript); - bool Validate(SpellEntry const* spell) + bool Validate(SpellInfo const* spell) { - if (!spell->excludeTargetAuraSpell) + if (!spell->ExcludeTargetAuraSpell) return false; - if (!sSpellStore.LookupEntry(spell->excludeTargetAuraSpell)) + if (!sSpellMgr->GetSpellInfo(spell->ExcludeTargetAuraSpell)) return false; return true; } @@ -779,7 +779,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader void SelectTarget(std::list<Unit*>& targetList) { - targetList.remove_if(BeamProtectionCheck(GetSpellInfo()->excludeTargetAuraSpell)); + targetList.remove_if(BeamProtectionCheck(GetSpellInfo()->ExcludeTargetAuraSpell)); if (targetList.empty()) { FinishCast(SPELL_FAILED_NO_VALID_TARGETS); @@ -896,7 +896,7 @@ class spell_putricide_slime_puddle : public SpellScriptLoader if (Aura* size = caster->GetAura(70347)) radiusMod += size->GetStackAmount(); - uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()]; + uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; caster->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, radiusMod * 100, caster, true); } } @@ -970,7 +970,7 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader break; } - GetCaster()->CastSpell(target, uint32(GetSpellInfo()->EffectBasePoints[stage]+1), true, NULL, NULL, GetCaster()->GetGUID()); + GetCaster()->CastSpell(target, uint32(GetSpellInfo()->Effects[stage].CalcValue()), true, NULL, NULL, GetCaster()->GetGUID()); } void Register() @@ -999,7 +999,7 @@ class spell_putricide_ooze_summon : public SpellScriptLoader PreventDefaultAction(); if (Unit* caster = GetCaster()) { - uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()]; + uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; float x, y, z; GetTarget()->GetPosition(x, y, z); z = GetTarget()->GetMap()->GetHeight(x, y, z, true, 25.0f); @@ -1069,7 +1069,7 @@ class spell_putricide_choking_gas_bomb : public SpellScriptLoader if (i == skipIndex) continue; - uint32 spellId = uint32(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), uint8(i))); + uint32 spellId = uint32(GetSpellInfo()->Effects[i].CalcValue()); GetCaster()->CastSpell(GetCaster(), spellId, true, NULL, NULL, GetCaster()->GetGUID()); } } @@ -1095,11 +1095,11 @@ class spell_putricide_unbound_plague : public SpellScriptLoader { PrepareSpellScript(spell_putricide_unbound_plague_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_UNBOUND_PLAGUE)) + if (!sSpellMgr->GetSpellInfo(SPELL_UNBOUND_PLAGUE)) return false; - if (!sSpellStore.LookupEntry(SPELL_UNBOUND_PLAGUE_SEARCHER)) + if (!sSpellMgr->GetSpellInfo(SPELL_UNBOUND_PLAGUE_SEARCHER)) return false; return true; } @@ -1217,11 +1217,11 @@ class spell_putricide_mutated_plague : public SpellScriptLoader if (!caster) return; - uint32 triggerSpell = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()]; - SpellEntry const* spell = sSpellStore.LookupEntry(triggerSpell); + uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; + SpellInfo const* spell = sSpellMgr->GetSpellInfo(triggerSpell); spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, caster); - int32 damage = SpellMgr::CalculateSpellEffectAmount(spell, 0, caster); + int32 damage = spell->Effects[EFFECT_0].CalcValue(caster); float multiplier = 2.0f; if (GetTarget()->GetMap()->GetSpawnMode() & 1) multiplier = 3.0f; @@ -1234,7 +1234,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - uint32 healSpell = uint32(SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), 0)); + uint32 healSpell = uint32(GetSpellInfo()->Effects[EFFECT_0].CalcValue()); GetTarget()->CastSpell(GetTarget(), healSpell, true, NULL, NULL, GetCasterGUID()); } @@ -1398,9 +1398,9 @@ class spell_putricide_mutated_transformation : public SpellScriptLoader return; } - uint32 entry = uint32(GetSpellInfo()->EffectMiscValue[effIndex]); - SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(uint32(GetSpellInfo()->EffectMiscValueB[effIndex])); - uint32 duration = uint32(GetSpellDuration(GetSpellInfo())); + uint32 entry = uint32(GetSpellInfo()->Effects[effIndex].MiscValue); + SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(uint32(GetSpellInfo()->Effects[effIndex].MiscValueB)); + uint32 duration = uint32(GetSpellInfo()->GetDuration()); Position pos; caster->GetPosition(&pos); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index 29c034c5ed5..2af2bdd53c4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -148,7 +148,7 @@ class boss_rotface : public CreatureScript professor->AI()->EnterEvadeMode(); } - void SpellHitTarget(Unit* /*target*/, SpellEntry const* spell) + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) { if (spell->Id == SPELL_SLIME_SPRAY) Talk(SAY_SLIME_SPRAY); @@ -612,9 +612,9 @@ class spell_rotface_unstable_ooze_explosion_init : public SpellScriptLoader { PrepareSpellScript(spell_rotface_unstable_ooze_explosion_init_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_UNSTABLE_OOZE_EXPLOSION_TRIGGER)) + if (!sSpellMgr->GetSpellInfo(SPELL_UNSTABLE_OOZE_EXPLOSION_TRIGGER)) return false; return true; } @@ -658,7 +658,7 @@ class spell_rotface_unstable_ooze_explosion : public SpellScriptLoader if (!GetTargetUnit()) return; - uint32 triggered_spell_id = GetSpellInfo()->EffectTriggerSpell[effIndex]; + uint32 triggered_spell_id = GetSpellInfo()->Effects[effIndex].TriggerSpell; float x, y, z; GetTargetUnit()->GetPosition(x, y, z); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index afcdc59a921..24cfae54627 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -321,7 +321,7 @@ class boss_sindragosa : public CreatureScript summon->AI()->JustDied(summon); } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(70127, me)) if (spellId == spell->Id) @@ -1019,9 +1019,9 @@ class spell_sindragosa_instability : public SpellScriptLoader { PrepareAuraScript(spell_sindragosa_instability_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_BACKLASH)) + if (!sSpellMgr->GetSpellInfo(SPELL_BACKLASH)) return false; return true; } @@ -1053,9 +1053,9 @@ class spell_sindragosa_frost_beacon : public SpellScriptLoader { PrepareAuraScript(spell_sindragosa_frost_beacon_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_ICE_TOMB_DAMAGE)) + if (!sSpellMgr->GetSpellInfo(SPELL_ICE_TOMB_DAMAGE)) return false; return true; } @@ -1088,7 +1088,7 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader { PrepareSpellScript(spell_sindragosa_ice_tomb_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { if (!sObjectMgr->GetCreatureTemplate(NPC_ICE_TOMB)) return false; @@ -1175,9 +1175,9 @@ class spell_sindragosa_collision_filter : public SpellScriptLoader { PrepareSpellScript(spell_sindragosa_collision_filter_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_ICE_TOMB_DAMAGE)) + if (!sSpellMgr->GetSpellInfo(SPELL_ICE_TOMB_DAMAGE)) return false; return true; } @@ -1210,9 +1210,9 @@ class spell_sindragosa_icy_grip : public SpellScriptLoader { PrepareSpellScript(spell_sindragosa_icy_grip_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_ICY_GRIP_JUMP)) + if (!sSpellMgr->GetSpellInfo(SPELL_ICY_GRIP_JUMP)) return false; return true; } @@ -1244,9 +1244,9 @@ class spell_rimefang_icy_blast : public SpellScriptLoader { PrepareSpellScript(spell_rimefang_icy_blast_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_ICY_BLAST_AREA)) + if (!sSpellMgr->GetSpellInfo(SPELL_ICY_BLAST_AREA)) return false; return true; } @@ -1296,9 +1296,9 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader { PrepareSpellScript(spell_frostwarden_handler_order_whelp_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_FOCUS_FIRE)) + if (!sSpellMgr->GetSpellInfo(SPELL_FOCUS_FIRE)) return false; return true; } @@ -1378,7 +1378,7 @@ class spell_frostwarden_handler_focus_fire : public SpellScriptLoader PreventDefaultAction(); if (Unit* caster = GetCaster()) { - caster->AddThreat(GetTarget(), -float(SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1))); + caster->AddThreat(GetTarget(), -float(GetSpellInfo()->Effects[EFFECT_1].CalcValue())); caster->GetAI()->SetData(DATA_WHELP_MARKER, 0); } } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index eecba1ab785..e09ab90f5c7 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -387,7 +387,7 @@ class boss_valithria_dreamwalker : public CreatureScript } } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_DREAM_SLIP) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 6ffe61454df..09c19dd8a71 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -826,7 +826,7 @@ class boss_sister_svalna : public CreatureScript } } - void SpellHit(Unit* caster, SpellEntry const* spell) + void SpellHit(Unit* caster, SpellInfo const* spell) { if (spell->Id == SPELL_HURL_SPEAR && me->HasAura(SPELL_AETHER_SHIELD)) { @@ -835,7 +835,7 @@ class boss_sister_svalna : public CreatureScript } } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { switch (spell->Id) { @@ -1276,7 +1276,7 @@ struct npc_argent_captainAI : public ScriptedAI Reset(); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_REVIVE_CHAMPION && !IsUndead) { @@ -1505,7 +1505,7 @@ class npc_captain_grondel : public CreatureScript switch (eventId) { case EVENT_GRONDEL_CHARGE_CHECK: - if (CanCast(me->getVictim(), sSpellStore.LookupEntry(SPELL_CHARGE))) + if (CanCast(me->getVictim(), sSpellMgr->GetSpellInfo(SPELL_CHARGE))) DoCastVictim(SPELL_CHARGE); Events.ScheduleEvent(EVENT_GRONDEL_CHARGE_CHECK, 500); break; @@ -1717,7 +1717,7 @@ class spell_icc_sprit_alarm : public SpellScriptLoader { PreventHitDefaultEffect(effIndex); uint32 trapId = 0; - switch (GetSpellInfo()->EffectMiscValue[effIndex]) + switch (GetSpellInfo()->Effects[effIndex].MiscValue) { case EVENT_AWAKEN_WARD_1: trapId = GO_SPIRIT_ALARM_1; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 4dc9a247960..19ae50ab364 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -409,9 +409,9 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader public: spell_trigger_spell_from_caster_SpellScript(uint32 triggerId) : SpellScript(), _triggerId(triggerId) { } - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(_triggerId)) + if (!sSpellMgr->GetSpellInfo(_triggerId)) return false; return true; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index 3dd1e7f13b7..01391f029ce 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -53,7 +53,7 @@ class icecrown_citadel_teleport : public GameObjectScript { player->PlayerTalkClass->ClearMenus(); player->CLOSE_GOSSIP_MENU(); - SpellEntry const* spell = sSpellStore.LookupEntry(action); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(action); if (!spell) return false; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 85068c968d9..97594c168ef 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -105,7 +105,7 @@ class boss_faerlina : public CreatureScript DoScriptText(SAY_DEATH, me); } - void SpellHit(Unit* caster, SpellEntry const* spell) + void SpellHit(Unit* caster, SpellInfo const* spell) { if (spell->Id == SPELL_WIDOWS_EMBRACE || spell->Id == H_SPELL_WIDOWS_EMBRACE) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 347bb688a07..2a93d170318 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -343,7 +343,7 @@ class boss_gothik : public CreatureScript return false; } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { uint32 spellId = 0; switch(spell->Id) @@ -366,7 +366,7 @@ class boss_gothik : public CreatureScript damage = 0; } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (!me->isInCombat()) return; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index a2902ce3ab3..b2184615bb3 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -59,7 +59,7 @@ public: events.ScheduleEvent(EVENT_BERSERK, 12*60000); } - void SpellHitTarget(Unit* target, const SpellEntry *spell) + void SpellHitTarget(Unit* target, const SpellInfo *spell) { if (spell->Id == uint32(SPELL_SLIME_SPRAY)) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index d22070eafb1..a6d36e7eaa2 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -132,7 +132,7 @@ public: CheckPlayersFrostResist(); } - void SpellHitTarget(Unit* target, const SpellEntry *spell) + void SpellHitTarget(Unit* target, const SpellInfo *spell) { if (spell->Id == SPELL_ICEBOLT) { diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 88ccae482e3..1e255c3dcbd 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -379,7 +379,7 @@ public: } } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_POWER_SPARK_MALYGOS) { diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 83bfe2b083f..88eda112e52 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -298,7 +298,7 @@ public: me->DeleteThreatList(); } - void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) + void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) { switch(pSpell->Id) { diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 5d35b94217e..8800c709f67 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -173,7 +173,7 @@ class npc_azure_ring_captain : public CreatureScript me->SetReactState(REACT_AGGRESSIVE); } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (spell->Id == SPELL_ICE_BEAM) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index f7b8cc166bf..21a84ba0083 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -143,7 +143,7 @@ public: DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } - void SpellHit(Unit* /*caster*/, const SpellEntry* spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_DISPERSE) { diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 8bb4624f3c6..07cd031e66b 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -427,7 +427,7 @@ public: } } - void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) + void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) { // This is the dummy effect of the spells if (pSpell->Id == SPELL_SHATTER_N || pSpell->Id == SPELL_SHATTER_H) diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp index 387eaecf70a..fdb938fb1ef 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp @@ -157,7 +157,7 @@ public: DoScriptText(SAY_KILL, me); } - void SpellHitTarget(Unit* target, const SpellEntry* pSpell) + void SpellHitTarget(Unit* target, const SpellInfo* pSpell) { //this part should be in the core if (pSpell->Id == SPELL_SHATTER || pSpell->Id == H_SPELL_SHATTER) diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index bc9a6fdc6d3..62719c24640 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -316,7 +316,7 @@ class boss_flame_leviathan : public CreatureScript //TODO: effect 0 and effect 1 may be on different target //TODO: Move to spellscript - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (spell->Id == SPELL_PURSUED) AttackStart(target); @@ -328,7 +328,7 @@ class boss_flame_leviathan : public CreatureScript DoScriptText(SAY_DEATH, me); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_START_THE_ENGINE) vehicle->InstallAllAccessories(false); @@ -845,7 +845,7 @@ class npc_pool_of_tar : public CreatureScript damage = 0; } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE)) me->CastSpell(me, SPELL_BLAZE, true); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp index 788e6eb846d..1ae51c01a9a 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp @@ -1506,7 +1506,7 @@ class npc_unstable_sun_beam : public CreatureScript despawnTimer -= diff; } - void SpellHitTarget(Unit* target, SpellEntry const* spell) + void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (target && spell->Id == SPELL_UNSTABLE_ENERGY) { @@ -1540,7 +1540,7 @@ class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { Unit* target = GetHitUnit(); - SpellEntry const* spellInfo = GetSpellInfo(); + SpellInfo const* spellInfo = GetSpellInfo(); switch (spellInfo->Id) { case SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION: @@ -1589,7 +1589,7 @@ class spell_freya_iron_roots : public SpellScriptLoader void HandleSummon(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); - uint32 entry = uint32(GetSpellInfo()->EffectMiscValue[effIndex]); + uint32 entry = uint32(GetSpellInfo()->Effects[effIndex].MiscValue); Position pos; GetCaster()->GetPosition(&pos); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp index efaeae3fad3..de7a3ef2685 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp @@ -200,7 +200,7 @@ class boss_general_vezax : public CreatureScript DoMeleeAttackIfReady(); } - void SpellHitTarget(Unit* who, SpellEntry const* spell) + void SpellHitTarget(Unit* who, SpellInfo const* spell) { if (who && who->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_SHADOW_CRASH_HIT) shadowDodger = false; diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp index 5e6cc295230..b580da091c8 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp @@ -881,7 +881,7 @@ class npc_toasty_fire : public CreatureScript DoCast(me, SPELL_SINGED, true); } - void SpellHit(Unit* /*who*/, const SpellEntry* spell) + void SpellHit(Unit* /*who*/, const SpellInfo* spell) { if (spell->Id == SPELL_BLOCK_OF_ICE || spell->Id == SPELL_ICE_SHARD || spell->Id == SPELL_ICE_SHARD_HIT) { diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp index 9633a7c69a8..574776166f3 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp @@ -430,11 +430,11 @@ class spell_ignis_slag_pot : public SpellScriptLoader { PrepareAuraScript(spell_ignis_slag_pot_AuraScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_SLAG_POT_DAMAGE)) + if (!sSpellMgr->GetSpellInfo(SPELL_SLAG_POT_DAMAGE)) return false; - if (!sSpellStore.LookupEntry(SPELL_SLAG_IMBUED)) + if (!sSpellMgr->GetSpellInfo(SPELL_SLAG_IMBUED)) return false; return true; } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp index ffb878bd19f..cad50775878 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp @@ -461,10 +461,10 @@ class spell_ulduar_cancel_stone_grip : public SpellScriptLoader switch (target->GetMap()->GetDifficulty()) { case RAID_DIFFICULTY_10MAN_NORMAL: - target->RemoveAura(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_0)); + target->RemoveAura(GetSpellInfo()->Effects[EFFECT_0].CalcValue()); break; case RAID_DIFFICULTY_25MAN_NORMAL: - target->RemoveAura(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_1)); + target->RemoveAura(GetSpellInfo()->Effects[EFFECT_1].CalcValue()); break; default: break; diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp index 46bf7f99ae5..7547937868d 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp @@ -185,7 +185,7 @@ class boss_razorscale_controller : public CreatureScript me->SetReactState(REACT_PASSIVE); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { switch (spell->Id) { @@ -360,7 +360,7 @@ class boss_razorscale : public CreatureScript controller->AI()->Reset(); } - void SpellHit(Unit* /*caster*/, SpellEntry const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) { if (spell->Id == SPELL_HARPOON_TRIGGER) ++HarpoonCounter; @@ -1004,7 +1004,7 @@ class spell_razorscale_devouring_flame : public SpellScriptLoader { PreventHitDefaultEffect(effIndex); Unit* caster = GetCaster(); - uint32 entry = uint32(GetSpellInfo()->EffectMiscValue[effIndex]); + uint32 entry = uint32(GetSpellInfo()->Effects[effIndex].MiscValue); WorldLocation const* summonLocation = GetTargetDest(); if (!caster || !summonLocation) return; diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp index 8147456a884..8840fa6669e 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp @@ -758,9 +758,9 @@ class spell_xt002_searing_light_spawn_life_spark : public SpellScriptLoader { PrepareAuraScript(spell_xt002_searing_light_spawn_life_spark_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_SUMMON_LIFE_SPARK)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_LIFE_SPARK)) return false; return true; } @@ -794,9 +794,9 @@ class spell_xt002_gravity_bomb_aura : public SpellScriptLoader { PrepareAuraScript(spell_xt002_gravity_bomb_aura_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_SUMMON_VOID_ZONE)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_VOID_ZONE)) return false; return true; } @@ -878,18 +878,18 @@ class spell_xt002_heart_overload_periodic : public SpellScriptLoader { PrepareSpellScript(spell_xt002_heart_overload_periodic_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_ENERGY_ORB)) + if (!sSpellMgr->GetSpellInfo(SPELL_ENERGY_ORB)) return false; - if (!sSpellStore.LookupEntry(SPELL_RECHARGE_BOOMBOT)) + if (!sSpellMgr->GetSpellInfo(SPELL_RECHARGE_BOOMBOT)) return false; - if (!sSpellStore.LookupEntry(SPELL_RECHARGE_PUMMELER)) + if (!sSpellMgr->GetSpellInfo(SPELL_RECHARGE_PUMMELER)) return false; - if (!sSpellStore.LookupEntry(SPELL_RECHARGE_SCRAPBOT)) + if (!sSpellMgr->GetSpellInfo(SPELL_RECHARGE_SCRAPBOT)) return false; return true; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index eea405e57a4..c970d27cb23 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -276,7 +276,7 @@ public: Summons.Despawn(summoned); } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_HARPOON_DAMAGE) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index f7f9dcae844..dbc6d3f5613 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -191,7 +191,7 @@ public: pInstance->SetData(DATA_KING_YMIRON_EVENT, IN_PROGRESS); } - void SpellHitTarget(Unit* who, SpellEntry const* spell) + void SpellHitTarget(Unit* who, SpellInfo const* spell) { if (who && who->GetTypeId() == TYPEID_PLAYER && spell->Id == 59302) kingsBane = false; diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 8a1a8e3a7b9..887a991d762 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -73,7 +73,7 @@ public: casterGuid = 0; } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (Phase) return; @@ -866,7 +866,7 @@ public: AttackStart(who); } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (spell->Id == SPELL_DRAKE_HARPOON && caster->GetTypeId() == TYPEID_PLAYER) { @@ -1622,7 +1622,7 @@ public: AttackStart(who); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_ARCANE_CHAINS && pCaster->GetTypeId() == TYPEID_PLAYER && !HealthAbovePct(50) && !bEnslaved) { @@ -1706,7 +1706,7 @@ public: { } - void SpellHit(Unit* pUnit, const SpellEntry* pSpell) + void SpellHit(Unit* pUnit, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_NEURAL_NEEDLE && pUnit->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 3885658beb1..877b649e630 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -421,7 +421,7 @@ public: m_gender = uiData; } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_OUTHOUSE_GROANS) { @@ -594,7 +594,7 @@ public: me->DespawnOrUnsummon(DespawnTimer); } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (spell->Id == SPELL_RENEW_SKIRMISHER && caster->GetTypeId() == TYPEID_PLAYER && caster->ToPlayer()->GetQuestStatus(12288) == QUEST_STATUS_INCOMPLETE) @@ -784,7 +784,7 @@ public: DoMeleeAttackIfReady(); } - void SpellHit(Unit* pCaster, const SpellEntry *pSpell) + void SpellHit(Unit* pCaster, const SpellInfo *pSpell) { if (pCaster && pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SMOKE_BOMB) { diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index dbbd7f9a765..ebdaded0ba0 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -543,7 +543,7 @@ public: sayTimer -= uiDiff; } - void SpellHit(Unit* caster, const SpellEntry* proto) + void SpellHit(Unit* caster, const SpellInfo* proto) { if (!proto || proto->Id != SPELL_OFFER) return; diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index b5b9d6bcc36..4d471996ba0 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -638,7 +638,7 @@ public: } } - void SpellHit(Unit* hitter, const SpellEntry* spell) + void SpellHit(Unit* hitter, const SpellInfo* spell) { if (!hitter || !spell) return; diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index ee36328e3e8..be51678a7db 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -83,7 +83,7 @@ public: me->setDeathState(DEAD); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + void SpellHit(Unit* pCaster, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_UNLOCK_SHACKLE) { @@ -146,7 +146,7 @@ public: void MoveInLineOfSight(Unit* /*who*/){} - void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) + void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_FREE_RAGECLAW) { @@ -1043,14 +1043,14 @@ public: uint32 uiElementalSpellTimer; uint8 uiBossRandom; - uint32 uiSpellEntry; + uint32 uiSpellInfo; bool bAddAttack; void Reset() { uiBossRandom = 0; - uiSpellEntry = 0; + uiSpellInfo = 0; uiElementalSpellTimer = urand(5000, 8000); bAddAttack = false; diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 250d4927894..cec706eda08 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -98,7 +98,7 @@ public: void EnterCombat(Unit* /*who*/) { } // Sonic Boom instant damage (needs core fix instead of this) - void SpellHitTarget(Unit* target, const SpellEntry *spell) + void SpellHitTarget(Unit* target, const SpellInfo *spell) { if (target && target->isAlive() && spell && spell->Id == uint32(SPELL_SONIC_BOOM_EFFECT)) me->DealDamage(target, (target->GetHealth()*90)/100, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NATURE, spell); diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index b1384a84d39..b1f17c38737 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -163,7 +163,7 @@ public: targets.resize(5); //Aura each player in the targets list with Bloodboil. Aura code copied+pasted from Aura command in Level3.cpp - /*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_BLOODBOIL); + /*SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(SPELL_BLOODBOIL); if (spellInfo) { for (std::list<Unit* >::const_iterator itr = targets.begin(); itr != targets.end(); ++itr) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index fe2c068909d..32ad878c2ac 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -471,10 +471,6 @@ public: { pInstance = c->GetInstanceScript(); DoCast(me, SPELL_DUAL_WIELD, true); - - SpellEntry *TempSpell = GET_SPELL(SPELL_SHADOWFIEND_PASSIVE); - if (TempSpell) - TempSpell->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends } InstanceScript* pInstance; @@ -589,7 +585,7 @@ public: done_by->AddThreat(me, -(3*(float)damage)/4); // do not let maiev tank him } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades! { @@ -2167,7 +2163,7 @@ public: { blade_of_azzinothAI(Creature* c) : NullCreatureAI(c) {} - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE) me->SetDisplayId(21431);//appear when hit by Illidan's glaive diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index d0e4258e986..8b057949b2e 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -536,11 +536,11 @@ public: } } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL)) for (uint8 i = 0; i < 3; ++i) - if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST) + if (spell->Effects[i].Effect == SPELL_EFFECT_INTERRUPT_CAST) if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_SOUL_SHOCK || me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_DEADEN) me->InterruptSpell(CURRENT_GENERIC_SPELL, false); diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 4d2d866ecf5..6f5dfba9a9c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -106,7 +106,7 @@ public: DoScriptText(SAY_DEATH, me); } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == SPELL_HURL_SPINE && me->HasAura(SPELL_TIDAL_SHIELD)) { diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index d4edaa8f36f..f4785d847a2 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -891,9 +891,9 @@ public: { PrepareAuraScript(spell_boss_lady_malande_shield_AuraScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(SPELL_REFLECTIVE_SHIELD_T); + return sSpellMgr->GetSpellInfo(SPELL_REFLECTIVE_SHIELD_T); } void Trigger(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index f9d16f5fc6c..d058f73cb04 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -515,7 +515,7 @@ public: if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != me->getVictim()->GetGUID() && TargetList.size()<5) TargetList.push_back(tempTarget); } - //SpellEntry *spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER); + //SpellInfo *spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER); for (std::vector<Unit* >::const_iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr) { if ((*itr) && (*itr)->isAlive()) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 7cd0c5a09c0..d5d3d8a81ba 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -81,13 +81,6 @@ public: boss_the_lurker_belowAI(Creature* c) : Scripted_NoMovementAI(c), Summons(me) { pInstance = c->GetInstanceScript(); - SpellEntry *TempSpell = GET_SPELL(SPELL_SPOUT_ANIM); - if (TempSpell) - { - TempSpell->Effect[0] = 0;//remove all spell effect, only anim is needed - TempSpell->Effect[1] = 0; - TempSpell->Effect[2] = 0; - } } InstanceScript* pInstance; @@ -410,9 +403,6 @@ public: { mob_coilfang_ambusherAI(Creature* c) : Scripted_NoMovementAI(c) { - SpellEntry *TempSpell = GET_SPELL(SPELL_SHOOT); - if (TempSpell) - TempSpell->Effect[0] = 2;//change spell effect from weapon % dmg to simple phisical dmg } uint32 MultiShotTimer; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index bb6acdae778..83ae22222de 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -148,7 +148,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { //hack :( if (spell->Id == SPELL_WARLORDS_RAGE_PROC) diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index af62a78fe8d..6479cdd3d6d 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -120,7 +120,7 @@ public: } } - void SpellHitTarget(Unit* target, const SpellEntry* pSpell) + void SpellHitTarget(Unit* target, const SpellInfo* pSpell) { //This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction //It's initially wrong, since this will cause fall damage, which is by comments, not intended. diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 37a2dccec2f..7558a10d7bf 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -247,7 +247,7 @@ class boss_kelidan_the_breaker : public CreatureScript DoScriptText(SAY_NOVA, me); - if (SpellEntry *nova = GET_SPELL(SPELL_BURNING_NOVA)) + if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA)) { if (Aura * aura = Aura::TryRefreshStackOrCreate(nova, MAX_EFFECT_MASK, me, me)) aura->ApplyForTargets(); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 6034e35936c..aad3eb1a544 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -95,7 +95,7 @@ class boss_nazan : public CreatureScript uint32 Turn_Timer; bool flight; uint64 VazrudenGUID; - SpellEntry *liquid_fire; + SpellInfo *liquid_fire; void Reset() { @@ -117,7 +117,7 @@ class boss_nazan : public CreatureScript } } - void SpellHitTarget(Unit* target, const SpellEntry* entry) + void SpellHitTarget(Unit* target, const SpellInfo* entry) { if (target && entry->Id == uint32(SPELL_FIREBALL)) me->SummonCreature(ENTRY_LIQUID_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 30000); diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index ccc2f0712f8..5166a276ac3 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -72,7 +72,7 @@ enum eSpells SPELL_CLEAVE = 30619, SPELL_QUAKE_TRIGGER = 30657, //must be cast with 30561 as the proc spell SPELL_QUAKE_KNOCKBACK = 30571, - SPELL_BLAZE_TARGET = 30541, //core bug, does not support target 7 + SPELL_BLAZE_TARGET = 30541, SPELL_BLAZE_TRAP = 30542, SPELL_DEBRIS_KNOCKDOWN = 36449, SPELL_DEBRIS_VISUAL = 30632, @@ -124,7 +124,7 @@ class mob_abyssal : public CreatureScript FireBlast_Timer = 6000; } - void SpellHit(Unit*, const SpellEntry *spell) + void SpellHit(Unit*, const SpellInfo *spell) { if (trigger == 2 && spell->Id == SPELL_BLAZE_TARGET) { @@ -220,20 +220,6 @@ class boss_magtheridon : public CreatureScript pInstance = creature->GetInstanceScript(); me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10); me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10); - - // target 7, random target with certain entry spell, need core fix - SpellEntry *TempSpell; - TempSpell = GET_SPELL(SPELL_BLAZE_TARGET); - if (TempSpell && TempSpell->EffectImplicitTargetA[0] != 6) - { - TempSpell->EffectImplicitTargetA[0] = 6; - TempSpell->EffectImplicitTargetB[0] = 0; - } - TempSpell = GET_SPELL(SPELL_QUAKE_TRIGGER); - if (TempSpell && TempSpell->EffectTriggerSpell[0] != SPELL_QUAKE_KNOCKBACK) - { - TempSpell->EffectTriggerSpell[0] = SPELL_QUAKE_KNOCKBACK; - } } CubeMap Cube; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index d25d10cc6a7..87df08d9bf5 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -190,7 +190,7 @@ class boss_alar : public CreatureScript } } - void SpellHit(Unit*, const SpellEntry *spell) + void SpellHit(Unit*, const SpellInfo *spell) { if (spell->Id == SPELL_DIVE_BOMB_VISUAL) { diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp index 1ae5ff2115f..79d111bfaf8 100644 --- a/src/server/scripts/Outland/blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp @@ -157,7 +157,7 @@ public: } } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 40d40b15a58..a18f16fbf2c 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -65,7 +65,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* Hitter, const SpellEntry *Spellkind) + void SpellHit(Unit* Hitter, const SpellInfo *Spellkind) { if (Spellkind->Id == 32001 && !Spawn) { @@ -269,7 +269,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* /*caster*/, const SpellEntry *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo *spell) { if (spell->Id == 32146) { @@ -690,7 +690,7 @@ public: } - void SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* pSpell) + void SpellHitTarget(Unit* /*pTarget*/, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_CHAIN_LIGHTNING) { @@ -877,7 +877,7 @@ public: ScriptedAI::UpdateAI(diff); } - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (caster->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 4437a71a9af..3620f09e7c8 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -100,7 +100,7 @@ public: void EnterCombat(Unit* /*who*/) {} - /*void SpellHit(Unit* caster, const SpellEntry *spell) + /*void SpellHit(Unit* caster, const SpellInfo *spell) { //we have no way of telling the Creature was hit by spell -> got aura applied after 10-12 seconds //then no way for the mobs to actually stop the shutdown as intended. @@ -782,7 +782,7 @@ public: PlayerGUID = who->GetGUID(); } - void SpellHit(Unit* /*caster*/, const SpellEntry * /*spell*/) + void SpellHit(Unit* /*caster*/, const SpellInfo * /*spell*/) { DoCast(me, SPELL_DE_MATERIALIZE); } diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index 87a279a8113..6236a7658e6 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -96,7 +96,7 @@ public: CastTimer = 5000; } - void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + void SpellHit(Unit* pCaster, SpellInfo const* pSpell) { if (bCanEat || bIsEating) return; @@ -228,7 +228,7 @@ public: me->SetVisible(true); } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (!caster) return; @@ -353,7 +353,7 @@ public: PoisonTimer = 0; } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (!caster) return; diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 8ae4a6dbf9c..b6384d5f185 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -55,7 +55,7 @@ class spell_dk_anti_magic_shell_raid : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } @@ -96,14 +96,14 @@ class spell_dk_anti_magic_shell_self : public SpellScriptLoader uint32 absorbPct, hpPct; bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); - hpPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); + hpPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster()); return true; } - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(DK_SPELL_RUNIC_POWER_ENERGIZE); + return sSpellMgr->GetSpellInfo(DK_SPELL_RUNIC_POWER_ENERGIZE); } void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) @@ -154,19 +154,19 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(DK_SPELL_ANTI_MAGIC_SHELL_TALENT); + return sSpellMgr->GetSpellInfo(DK_SPELL_ANTI_MAGIC_SHELL_TALENT); } void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) { - SpellEntry const* talentSpell = sSpellStore.LookupEntry(DK_SPELL_ANTI_MAGIC_SHELL_TALENT); - amount = SpellMgr::CalculateSpellEffectAmount(talentSpell, EFFECT_0, GetCaster()); + SpellInfo const* talentSpell = sSpellMgr->GetSpellInfo(DK_SPELL_ANTI_MAGIC_SHELL_TALENT); + amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster()); // assume caster is a player here if (Unit* caster = GetCaster()) amount += int32(2 * caster->ToPlayer()->GetTotalAttackPowerValue(BASE_ATTACK)); @@ -200,11 +200,11 @@ class spell_dk_corpse_explosion : public SpellScriptLoader { PrepareSpellScript(spell_dk_corpse_explosion_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED)) return false; - if (!sSpellStore.LookupEntry(DK_SPELL_GHOUL_EXPLODE)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE)) return false; return true; } @@ -222,7 +222,7 @@ class spell_dk_corpse_explosion : public SpellScriptLoader else // Some corpse { bp = GetEffectValue(); - GetCaster()->CastCustomSpell(unitTarget, SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), 1), &bp, NULL, NULL, true); + GetCaster()->CastCustomSpell(unitTarget, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), &bp, NULL, NULL, true); // Corpse Explosion (Suicide) unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true); // Set corpse look @@ -374,9 +374,9 @@ class spell_dk_scourge_strike : public SpellScriptLoader { PrepareSpellScript(spell_dk_scourge_strike_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(DK_SPELL_SCOURGE_STRIKE_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_SCOURGE_STRIKE_TRIGGERED)) return false; return true; } @@ -417,7 +417,7 @@ class spell_dk_spell_deflection : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } @@ -457,9 +457,9 @@ class spell_dk_blood_boil : public SpellScriptLoader { PrepareSpellScript(spell_dk_blood_boil_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(DK_SPELL_BLOOD_BOIL_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_BLOOD_BOIL_TRIGGERED)) return false; return true; } @@ -503,7 +503,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader { PrepareAuraScript(spell_dk_will_of_the_necropolis_AuraScript); - bool Validate(SpellEntry const *spellEntry) + bool Validate(SpellInfo const *spellEntry) { // can't use other spell than will of the necropolis due to spell_ranks dependency if (sSpellMgr->GetFirstSpellInChain(DK_SPELL_WILL_OF_THE_NECROPOLIS_AURA_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id)) @@ -520,7 +520,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } @@ -533,11 +533,11 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // min pct of hp is stored in effect 0 of talent spell - uint32 rank = sSpellMgr->GetSpellRank(GetSpellProto()->Id); - SpellEntry const* talentProto = sSpellStore.LookupEntry(sSpellMgr->GetSpellWithRank(DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank)); + uint32 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id); + SpellInfo const* talentProto = sSpellMgr->GetSpellInfo(sSpellMgr->GetSpellWithRank(DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank)); int32 remainingHp = int32(GetTarget()->GetHealth() - dmgInfo.GetDamage()); - int32 minHp = int32(GetTarget()->CountPctFromMaxHealth(SpellMgr::CalculateSpellEffectAmount(talentProto, EFFECT_0, GetCaster()))); + int32 minHp = int32(GetTarget()->CountPctFromMaxHealth(talentProto->Effects[EFFECT_0].CalcValue(GetCaster()))); // Damage that would take you below [effect0] health or taken while you are at [effect0] if (remainingHp < minHp) @@ -566,11 +566,11 @@ public: class spell_dk_improved_blood_presence_AuraScript : public AuraScript { PrepareAuraScript(spell_dk_improved_blood_presence_AuraScript) - bool Validate(SpellEntry const* /*entry*/) + bool Validate(SpellInfo const* /*entry*/) { - if (!sSpellStore.LookupEntry(DK_SPELL_BLOOD_PRESENCE)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_BLOOD_PRESENCE)) return false; - if (!sSpellStore.LookupEntry(DK_SPELL_IMPROVED_BLOOD_PRESENCE_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_IMPROVED_BLOOD_PRESENCE_TRIGGERED)) return false; return true; } @@ -614,11 +614,11 @@ public: class spell_dk_improved_unholy_presence_AuraScript : public AuraScript { PrepareAuraScript(spell_dk_improved_unholy_presence_AuraScript) - bool Validate(SpellEntry const* /*entry*/) + bool Validate(SpellInfo const* /*entry*/) { - if (!sSpellStore.LookupEntry(DK_SPELL_UNHOLY_PRESENCE)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_UNHOLY_PRESENCE)) return false; - if (!sSpellStore.LookupEntry(DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED)) return false; return true; } @@ -629,7 +629,7 @@ public: if (target->HasAura(DK_SPELL_UNHOLY_PRESENCE) && !target->HasAura(DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED)) { // Not listed as any effect, only base points set in dbc - int32 basePoints0 = SpellMgr::CalculateSpellEffectAmount(aurEff->GetSpellProto(), 1); + int32 basePoints0 = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); target->CastCustomSpell(target, DK_SPELL_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints0 , &basePoints0, &basePoints0, true, 0, aurEff); } } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index c9d8b31e0b9..fec95a2294d 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -40,11 +40,11 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader { PrepareSpellScript(spell_dru_glyph_of_starfire_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(DRUID_INCREASED_MOONFIRE_DURATION)) + if (!sSpellMgr->GetSpellInfo(DRUID_INCREASED_MOONFIRE_DURATION)) return false; - if (!sSpellStore.LookupEntry(DRUID_NATURES_SPLENDOR)) + if (!sSpellMgr->GetSpellInfo(DRUID_NATURES_SPLENDOR)) return false; return true; } @@ -58,7 +58,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader Aura* aura = aurEff->GetBase(); uint32 countMin = aura->GetMaxDuration(); - uint32 countMax = GetSpellMaxDuration(aura->GetSpellProto()) + 9000; + uint32 countMax = aura->GetSpellInfo()->GetMaxDuration() + 9000; if (caster->HasAura(DRUID_INCREASED_MOONFIRE_DURATION)) countMax += 3000; if (caster->HasAura(DRUID_NATURES_SPLENDOR)) @@ -98,7 +98,7 @@ class spell_dru_moonkin_form_passive : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } @@ -142,7 +142,7 @@ class spell_dru_primal_tenacity : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster()); return true; } @@ -186,7 +186,7 @@ class spell_dru_savage_defense : public SpellScriptLoader bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 5d8584e3cd1..5c41744b664 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -40,7 +40,7 @@ class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader bool Load() { // Max absorb stored in 1 dummy effect - limit = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1); + limit = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); return true; } @@ -177,11 +177,11 @@ class spell_gen_parachute : public SpellScriptLoader { PrepareAuraScript(spell_gen_parachute_AuraScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_PARACHUTE)) + if (!sSpellMgr->GetSpellInfo(SPELL_PARACHUTE)) return false; - if (!sSpellStore.LookupEntry(SPELL_PARACHUTE_BUFF)) + if (!sSpellMgr->GetSpellInfo(SPELL_PARACHUTE_BUFF)) return false; return true; } @@ -320,11 +320,11 @@ class spell_gen_leeching_swarm : public SpellScriptLoader { PrepareAuraScript(spell_gen_leeching_swarm_AuraScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_LEECHING_SWARM_DMG)) + if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_DMG)) return false; - if (!sSpellStore.LookupEntry(SPELL_LEECHING_SWARM_HEAL)) + if (!sSpellMgr->GetSpellInfo(SPELL_LEECHING_SWARM_HEAL)) return false; return true; } @@ -378,27 +378,27 @@ class spell_gen_trick : public SpellScriptLoader class spell_gen_trick_SpellScript : public SpellScript { PrepareSpellScript(spell_gen_trick_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_PIRATE_COSTUME_MALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_MALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_PIRATE_COSTUME_FEMALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_PIRATE_COSTUME_FEMALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_NINJA_COSTUME_MALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_MALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_NINJA_COSTUME_FEMALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_NINJA_COSTUME_FEMALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_LEPER_GNOME_COSTUME_MALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_MALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_LEPER_GNOME_COSTUME_FEMALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_LEPER_GNOME_COSTUME_FEMALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_SKELETON_COSTUME)) + if (!sSpellMgr->GetSpellInfo(SPELL_SKELETON_COSTUME)) return false; - if (!sSpellStore.LookupEntry(SPELL_GHOST_COSTUME_MALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_MALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_GHOST_COSTUME_FEMALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_GHOST_COSTUME_FEMALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_TRICK_BUFF)) + if (!sSpellMgr->GetSpellInfo(SPELL_TRICK_BUFF)) return false; return true; } @@ -463,13 +463,13 @@ class spell_gen_trick_or_treat : public SpellScriptLoader { PrepareSpellScript(spell_gen_trick_or_treat_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_TRICK)) + if (!sSpellMgr->GetSpellInfo(SPELL_TRICK)) return false; - if (!sSpellStore.LookupEntry(SPELL_TREAT)) + if (!sSpellMgr->GetSpellInfo(SPELL_TREAT)) return false; - if (!sSpellStore.LookupEntry(SPELL_TRICKED_OR_TREATED)) + if (!sSpellMgr->GetSpellInfo(SPELL_TRICKED_OR_TREATED)) return false; return true; } @@ -538,11 +538,11 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader { PrepareSpellScript(spell_pvp_trinket_wotf_shared_cd_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER)) + if (!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER)) return false; - if (!sSpellStore.LookupEntry(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER_WOTF)) + if (!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER_WOTF)) return false; return true; } @@ -552,9 +552,9 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader Player* caster = GetCaster()->ToPlayer(); if (!caster) return; - SpellEntry const* spellInfo = GetSpellInfo(); + SpellInfo const* spellInfo = GetSpellInfo(); - caster->AddSpellCooldown(spellInfo->Id, 0, time(NULL) + GetSpellRecoveryTime(sSpellStore.LookupEntry(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER)) / IN_MILLISECONDS); + caster->AddSpellCooldown(spellInfo->Id, 0, time(NULL) + sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER)->GetRecoveryTime() / IN_MILLISECONDS); WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4); data << uint64(caster->GetGUID()); data << uint8(0); @@ -590,9 +590,9 @@ class spell_gen_animal_blood : public SpellScriptLoader { PrepareAuraScript(spell_gen_animal_blood_AuraScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_SPAWN_BLOOD_POOL)) + if (!sSpellMgr->GetSpellInfo(SPELL_SPAWN_BLOOD_POOL)) return false; return true; } @@ -638,9 +638,9 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader { PrepareSpellScript(spell_gen_divine_storm_cd_reset_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_DIVINE_STORM)) + if (!sSpellMgr->GetSpellInfo(SPELL_DIVINE_STORM)) return false; return true; } @@ -819,7 +819,7 @@ class spell_generic_clone : public SpellScriptLoader { PreventHitDefaultEffect(effIndex); Unit* caster = GetCaster(); - uint32 spellId = uint32(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), effIndex)); + uint32 spellId = uint32(GetSpellInfo()->Effects[effIndex].CalcValue()); if (Unit* target = GetHitUnit()) target->CastSpell(caster, spellId, true); @@ -858,19 +858,19 @@ class spell_generic_clone_weapon : public SpellScriptLoader class spell_generic_clone_weapon_SpellScript : public SpellScript { PrepareSpellScript(spell_generic_clone_weapon_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_COPY_WEAPON)) + if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON)) return false; - if (!sSpellStore.LookupEntry(SPELL_COPY_WEAPON_2)) + if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_2)) return false; - if (!sSpellStore.LookupEntry(SPELL_COPY_WEAPON_3)) + if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_3)) return false; - if (!sSpellStore.LookupEntry(SPELL_COPY_OFFHAND)) + if (!sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND)) return false; - if (!sSpellStore.LookupEntry(SPELL_COPY_OFFHAND_2)) + if (!sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND_2)) return false; - if (!sSpellStore.LookupEntry(SPELL_COPY_RANGED)) + if (!sSpellMgr->GetSpellInfo(SPELL_COPY_RANGED)) return false; return true; } @@ -884,7 +884,7 @@ class spell_generic_clone_weapon : public SpellScriptLoader if (!target) return; - uint32 spellId = uint32(SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_0)); + uint32 spellId = uint32(GetSpellInfo()->Effects[EFFECT_0].CalcValue()); target->CastSpell(caster, spellId, true); if (target->GetTypeId() == TYPEID_PLAYER) @@ -959,9 +959,9 @@ class spell_gen_seaforium_blast : public SpellScriptLoader { PrepareSpellScript(spell_gen_seaforium_blast_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT)) + if (!sSpellMgr->GetSpellInfo(SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT)) return false; return true; } diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 931d63d954b..afc1ee056d6 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -49,13 +49,13 @@ public: class spell_hun_chimera_shot_SpellScript : public SpellScript { PrepareSpellScript(spell_hun_chimera_shot_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_SERPENT)) + if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SERPENT)) return false; - if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_VIPER)) + if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_VIPER)) return false; - if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_SCORPID)) + if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SCORPID)) return false; return true; } @@ -77,7 +77,7 @@ public: continue; // Search only Serpent Sting, Viper Sting, Scorpid Sting auras - flag96 familyFlag = aura->GetSpellProto()->SpellFamilyFlags; + flag96 familyFlag = aura->GetSpellInfo()->SpellFamilyFlags; if (!(familyFlag[1] & 0x00000080 || familyFlag[0] & 0x0000C000)) continue; if (AuraEffect const* aurEff = aura->GetEffect(0)) @@ -87,7 +87,7 @@ public: { int32 TickCount = aurEff->GetTotalTicks(); spellId = HUNTER_SPELL_CHIMERA_SHOT_SERPENT; - basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellProto(), aurEff->GetAmount(), DOT, aura->GetStackAmount()); + basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellInfo(), aurEff->GetAmount(), DOT, aura->GetStackAmount()); ApplyPctN(basePoint, TickCount * 40); } // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. @@ -145,9 +145,9 @@ public: class spell_hun_invigoration_SpellScript : public SpellScript { PrepareSpellScript(spell_hun_invigoration_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(HUNTER_SPELL_INVIGORATION_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_INVIGORATION_TRIGGERED)) return false; return true; } @@ -180,9 +180,9 @@ public: class spell_hun_last_stand_pet_SpellScript : public SpellScript { PrepareSpellScript(spell_hun_last_stand_pet_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED)) return false; return true; } @@ -215,13 +215,13 @@ public: class spell_hun_masters_call_SpellScript : public SpellScript { PrepareSpellScript(spell_hun_masters_call_SpellScript) - bool Validate(SpellEntry const* spellEntry) + bool Validate(SpellInfo const* spellEntry) { - if (!sSpellStore.LookupEntry(HUNTER_SPELL_MASTERS_CALL_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_MASTERS_CALL_TRIGGERED)) return false; - if (!sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(spellEntry, EFFECT_0))) + if (!sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_0].CalcValue())) return false; - if (!sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(spellEntry, EFFECT_1))) + if (!sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_1].CalcValue())) return false; return true; } @@ -238,7 +238,7 @@ public: if (Unit* ally = GetTargetUnit()) { target->CastSpell(ally, GetEffectValue(), true); - target->CastSpell(ally, SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_0), true); + target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), true); } } } @@ -273,14 +273,14 @@ public: const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); + SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first); ///! If spellId in cooldown map isn't valid, the above will return a null pointer. if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->Id != HUNTER_SPELL_READINESS && spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH && - GetSpellRecoveryTime(spellInfo) > 0) + spellInfo->GetRecoveryTime() > 0) caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true); else ++itr; @@ -348,11 +348,11 @@ public: class spell_hun_sniper_training_AuraScript : public AuraScript { PrepareAuraScript(spell_hun_sniper_training_AuraScript) - bool Validate(SpellEntry const* /*entry*/) + bool Validate(SpellInfo const* /*entry*/) { - if (!sSpellStore.LookupEntry(SPELL_SNIPER_TRAINING_R1)) + if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_R1)) return false; - if (!sSpellStore.LookupEntry(SPELL_SNIPER_TRAINING_BUFF_R1)) + if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_BUFF_R1)) return false; return true; } @@ -372,8 +372,8 @@ public: Unit* target = GetTarget(); if (!target->HasAura(spellId)) { - SpellEntry const* triggeredSpellInfo = sSpellStore.LookupEntry(spellId); - Unit* triggerCaster = GetTriggeredSpellCaster(triggeredSpellInfo, caster, target); + SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(spellId); + Unit* triggerCaster = triggeredSpellInfo->IsRequiringSelectedTarget() ? caster : target; triggerCaster->CastSpell(target, triggeredSpellInfo, true, 0, aurEff); } } @@ -385,7 +385,7 @@ public: { int32 baseAmount = aurEff->GetBaseAmount(); int32 amount = playerTarget->isMoving() ? - target->CalculateSpellDamage(target, GetSpellProto(), aurEff->GetEffIndex(), &baseAmount) : + target->CalculateSpellDamage(target, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount) : aurEff->GetAmount() - 1; aurEff->SetAmount(amount); } @@ -412,11 +412,11 @@ public: class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript { PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED)) return false; - if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF)) + if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF)) return false; return true; } @@ -459,9 +459,9 @@ public: class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript { PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED)) return false; return true; } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index acf92d3a984..4d2cd15199b 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -42,9 +42,9 @@ public: public: spell_item_trigger_spell_SpellScript(uint32 triggeredSpellId) : SpellScript(), _triggeredSpellId(triggeredSpellId) { } - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(_triggeredSpellId)) + if (!sSpellMgr->GetSpellInfo(_triggeredSpellId)) return false; return true; } @@ -87,10 +87,10 @@ public: { PrepareSpellScript(spell_item_deviate_fish_SpellScript) public: - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { for (uint32 spellId = SPELL_SLEEPY; spellId <= SPELL_HEALTHY_SPIRIT; ++spellId) - if (!sSpellStore.LookupEntry(spellId)) + if (!sSpellMgr->GetSpellInfo(spellId)) return false; return true; } @@ -135,13 +135,13 @@ public: { public: PrepareSpellScript(spell_item_flask_of_the_north_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_FLASK_OF_THE_NORTH_SP)) + if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_SP)) return false; - if (!sSpellStore.LookupEntry(SPELL_FLASK_OF_THE_NORTH_AP)) + if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_AP)) return false; - if (!sSpellStore.LookupEntry(SPELL_FLASK_OF_THE_NORTH_STR)) + if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_STR)) return false; return true; } @@ -211,11 +211,11 @@ public: { public: PrepareSpellScript(spell_item_gnomish_death_ray_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_GNOMISH_DEATH_RAY_SELF)) + if (!sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_SELF)) return false; - if (!sSpellStore.LookupEntry(SPELL_GNOMISH_DEATH_RAY_TARGET)) + if (!sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_TARGET)) return false; return true; } @@ -264,17 +264,17 @@ public: { public: PrepareSpellScript(spell_item_make_a_wish_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_MR_PINCHYS_BLESSING)) + if (!sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_BLESSING)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_MIGHTY_MR_PINCHY)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_MIGHTY_MR_PINCHY)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_FURIOUS_MR_PINCHY)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FURIOUS_MR_PINCHY)) return false; - if (!sSpellStore.LookupEntry(SPELL_TINY_MAGICAL_CRAWDAD)) + if (!sSpellMgr->GetSpellInfo(SPELL_TINY_MAGICAL_CRAWDAD)) return false; - if (!sSpellStore.LookupEntry(SPELL_MR_PINCHYS_GIFT)) + if (!sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_GIFT)) return false; return true; } @@ -381,13 +381,13 @@ public: { public: PrepareSpellScript(spell_item_net_o_matic_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_NET_O_MATIC_TRIGGERED1)) + if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED1)) return false; - if (!sSpellStore.LookupEntry(SPELL_NET_O_MATIC_TRIGGERED2)) + if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED2)) return false; - if (!sSpellStore.LookupEntry(SPELL_NET_O_MATIC_TRIGGERED3)) + if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED3)) return false; return true; } @@ -437,13 +437,13 @@ public: { public: PrepareSpellScript(spell_item_noggenfogger_elixir_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1)) + if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1)) return false; - if (!sSpellStore.LookupEntry(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2)) + if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2)) return false; - if (!sSpellStore.LookupEntry(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3)) + if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3)) return false; return true; } @@ -495,10 +495,10 @@ public: { public: PrepareSpellScript(spell_item_savory_deviate_delight_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { for (uint32 spellId = SPELL_FLIP_OUT_MALE; spellId <= SPELL_YAAARRRR_FEMALE; ++spellId) - if (!sSpellStore.LookupEntry(spellId)) + if (!sSpellMgr->GetSpellInfo(spellId)) return false; return true; } @@ -553,19 +553,19 @@ public: { public: PrepareSpellScript(spell_item_six_demon_bag_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_FROSTBOLT)) + if (!sSpellMgr->GetSpellInfo(SPELL_FROSTBOLT)) return false; - if (!sSpellStore.LookupEntry(SPELL_POLYMORPH)) + if (!sSpellMgr->GetSpellInfo(SPELL_POLYMORPH)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_FELHOUND_MINION)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_FELHOUND_MINION)) return false; - if (!sSpellStore.LookupEntry(SPELL_FIREBALL)) + if (!sSpellMgr->GetSpellInfo(SPELL_FIREBALL)) return false; - if (!sSpellStore.LookupEntry(SPELL_CHAIN_LIGHTNING)) + if (!sSpellMgr->GetSpellInfo(SPELL_CHAIN_LIGHTNING)) return false; - if (!sSpellStore.LookupEntry(SPELL_ENVELOPING_WINDS)) + if (!sSpellMgr->GetSpellInfo(SPELL_ENVELOPING_WINDS)) return false; return true; } @@ -632,13 +632,13 @@ public: { public: PrepareSpellScript(spell_item_underbelly_elixir_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_UNDERBELLY_ELIXIR_TRIGGERED1)) + if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED1)) return false; - if (!sSpellStore.LookupEntry(SPELL_UNDERBELLY_ELIXIR_TRIGGERED2)) + if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED2)) return false; - if (!sSpellStore.LookupEntry(SPELL_UNDERBELLY_ELIXIR_TRIGGERED3)) + if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED3)) return false; return true; } @@ -688,13 +688,13 @@ public: PrepareAuraScript(spell_item_shadowmourne_AuraScript) spell_item_shadowmourne_AuraScript() : AuraScript() { } - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_SHADOWMOURNE_VISUAL_LOW)) + if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_VISUAL_LOW)) return false; - if (!sSpellStore.LookupEntry(SPELL_SHADOWMOURNE_VISUAL_HIGH)) + if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_VISUAL_HIGH)) return false; - if (!sSpellStore.LookupEntry(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF)) + if (!sSpellMgr->GetSpellInfo(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF)) return false; return true; } @@ -755,13 +755,13 @@ class spell_item_red_rider_air_rifle : public SpellScriptLoader { PrepareSpellScript(spell_item_red_rider_air_rifle_SpellScript); - bool Validate(SpellEntry const* /*spell*/) + bool Validate(SpellInfo const* /*spell*/) { - if (!sSpellStore.LookupEntry(SPELL_AIR_RIFLE_HOLD_VISUAL)) + if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_HOLD_VISUAL)) return false; - if (!sSpellStore.LookupEntry(SPELL_AIR_RIFLE_SHOOT)) + if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_SHOOT)) return false; - if (!sSpellStore.LookupEntry(SPELL_AIR_RIFLE_SHOOT_SELF)) + if (!sSpellMgr->GetSpellInfo(SPELL_AIR_RIFLE_SHOOT_SELF)) return false; return true; } @@ -976,13 +976,13 @@ class spell_item_vanquished_clutches : public SpellScriptLoader { PrepareSpellScript(spell_item_vanquished_clutches_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_CRUSHER)) + if (!sSpellMgr->GetSpellInfo(SPELL_CRUSHER)) return false; - if (!sSpellStore.LookupEntry(SPELL_CONSTRICTOR)) + if (!sSpellMgr->GetSpellInfo(SPELL_CONSTRICTOR)) return false; - if (!sSpellStore.LookupEntry(SPELL_CORRUPTOR)) + if (!sSpellMgr->GetSpellInfo(SPELL_CORRUPTOR)) return false; return true; } @@ -1032,9 +1032,9 @@ class spell_item_ashbringer : public SpellScriptLoader class spell_item_ashbringer_SpellScript : public SpellScript { PrepareSpellScript(spell_item_ashbringer_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_ASHBRINGER)) + if (!sSpellMgr->GetSpellInfo(SPELL_ASHBRINGER)) return false; return true; } diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 32dca054d43..d271bf36887 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -46,9 +46,9 @@ class spell_mage_blast_wave : public SpellScriptLoader class spell_mage_blast_wave_SpellScript : public SpellScript { PrepareSpellScript(spell_mage_blast_wave_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_MAGE_GLYPH_OF_BLAST_WAVE)) + if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_BLAST_WAVE)) return false; return true; } @@ -90,11 +90,11 @@ class spell_mage_cold_snap : public SpellScriptLoader const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); + SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first); if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && - (GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_FROST) && - spellInfo->Id != SPELL_MAGE_COLD_SNAP && GetSpellRecoveryTime(spellInfo) > 0) + (spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && + spellInfo->Id != SPELL_MAGE_COLD_SNAP && spellInfo->GetRecoveryTime() > 0) { caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true); } @@ -126,11 +126,11 @@ class spell_mage_polymorph_cast_visual : public SpellScriptLoader PrepareSpellScript(spell_mage_polymorph_cast_visual_SpellScript) static const uint32 spell_list[6]; - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { // check if spell ids exist in dbc for (int i = 0; i < 6; i++) - if (!sSpellStore.LookupEntry(spell_list[i])) + if (!sSpellMgr->GetSpellInfo(spell_list[i])) return false; return true; } @@ -173,13 +173,13 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader class spell_mage_summon_water_elemental_SpellScript : public SpellScript { PrepareSpellScript(spell_mage_summon_water_elemental_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER)) + if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER)) return false; - if (!sSpellStore.LookupEntry(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY)) + if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY)) return false; - if (!sSpellStore.LookupEntry(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT)) + if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT)) return false; return true; } @@ -225,10 +225,10 @@ public: SPELL_MAGE_FROST_WARDING_R1 = 28332, }; - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(SPELL_MAGE_FROST_WARDING_TRIGGERED) - && sSpellStore.LookupEntry(SPELL_MAGE_FROST_WARDING_R1); + return sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_TRIGGERED) + && sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_R1); } void Absorb(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) @@ -236,7 +236,7 @@ public: Unit* target = GetTarget(); if (AuraEffect * talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_FROST_WARDING_R1, EFFECT_0)) { - int32 chance = SpellMgr::CalculateSpellEffectAmount(talentAurEff->GetSpellProto(), EFFECT_1); + int32 chance = talentAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); if (roll_chance_i(chance)) { @@ -268,10 +268,10 @@ public: SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394, }; - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED) - && sSpellStore.LookupEntry(SPELL_MAGE_INCANTERS_ABSORBTION_R1); + return sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED) + && sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_R1); } void Trigger(AuraEffect * aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 5beb421c88b..9269dade108 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -58,8 +58,8 @@ public: bool Load() { - healPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1); - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0); + healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); return GetUnitOwner()->ToPlayer(); } @@ -123,15 +123,15 @@ public: class spell_pal_blessing_of_faith_SpellScript : public SpellScript { PrepareSpellScript(spell_pal_blessing_of_faith_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_BLESSING_OF_LOWER_CITY_DRUID)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_DRUID)) return false; - if (!sSpellStore.LookupEntry(SPELL_BLESSING_OF_LOWER_CITY_PALADIN)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_PALADIN)) return false; - if (!sSpellStore.LookupEntry(SPELL_BLESSING_OF_LOWER_CITY_PRIEST)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_PRIEST)) return false; - if (!sSpellStore.LookupEntry(SPELL_BLESSING_OF_LOWER_CITY_SHAMAN)) + if (!sSpellMgr->GetSpellInfo(SPELL_BLESSING_OF_LOWER_CITY_SHAMAN)) return false; return true; } @@ -177,9 +177,9 @@ public: class spell_pal_blessing_of_sanctuary_AuraScript : public AuraScript { PrepareAuraScript(spell_pal_blessing_of_sanctuary_AuraScript) - bool Validate(SpellEntry const* /*entry*/) + bool Validate(SpellInfo const* /*entry*/) { - if (!sSpellStore.LookupEntry(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF)) + if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF)) return false; return true; } @@ -219,9 +219,9 @@ public: class spell_pal_guarded_by_the_light_SpellScript : public SpellScript { PrepareSpellScript(spell_pal_guarded_by_the_light_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(PALADIN_SPELL_DIVINE_PLEA)) + if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_DIVINE_PLEA)) return false; return true; } @@ -253,9 +253,9 @@ public: class spell_pal_holy_shock_SpellScript : public SpellScript { PrepareSpellScript(spell_pal_holy_shock_SpellScript) - bool Validate(SpellEntry const *spellEntry) + bool Validate(SpellInfo const *spellEntry) { - if (!sSpellStore.LookupEntry(PALADIN_SPELL_HOLY_SHOCK_R1)) + if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_HOLY_SHOCK_R1)) return false; // can't use other spell than holy shock due to spell_ranks dependency @@ -310,7 +310,7 @@ public: void HandleDummy(SpellEffIndex /*effIndex*/) { if (Unit* unitTarget = GetHitUnit()) - if (SpellEntry const* spell_proto = sSpellStore.LookupEntry(GetEffectValue())) + if (SpellInfo const* spell_proto = sSpellMgr->GetSpellInfo(GetEffectValue())) GetCaster()->CastSpell(unitTarget, spell_proto, true, NULL); } diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 2d35ed41bf0..c07e6dfbf7f 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -46,14 +46,14 @@ class spell_pri_guardian_spirit : public SpellScriptLoader uint32 healPct; - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL) != NULL; + return sSpellMgr->GetSpellInfo(PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL) != NULL; } bool Load() { - healPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_1); + healPct = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); return true; } @@ -184,9 +184,9 @@ class spell_pri_penance : public SpellScriptLoader { PrepareSpellScript(spell_pri_penance_SpellScript); - bool Validate(SpellEntry const* spellEntry) + bool Validate(SpellInfo const* spellEntry) { - if (!sSpellStore.LookupEntry(PRIEST_SPELL_PENANCE_R1)) + if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_PENANCE_R1)) return false; // can't use other spell than this penance due to spell_ranks dependency if (sSpellMgr->GetFirstSpellInChain(PRIEST_SPELL_PENANCE_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id)) @@ -240,9 +240,9 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader { PrepareAuraScript(spell_pri_reflective_shield_trigger_AuraScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED) && sSpellStore.LookupEntry(PRIEST_SPELL_REFLECTIVE_SHIELD_R1); + return sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED) && sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_R1); } void Trigger(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index c760220b5e5..c7a174ff3d5 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -94,11 +94,11 @@ public: class spell_q5206_test_fetid_skull_SpellScript : public SpellScript { PrepareSpellScript(spell_q5206_test_fetid_skull_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_CREATE_RESONATING_SKULL)) + if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_RESONATING_SKULL)) return false; - if (!sSpellStore.LookupEntry(SPELL_CREATE_BONE_DUST)) + if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_BONE_DUST)) return false; return true; } @@ -254,11 +254,11 @@ public: class spell_q11396_11399_scourging_crystal_controller_SpellScript : public SpellScript { PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3)) + if (!sSpellMgr->GetSpellInfo(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3)) return false; - if (!sSpellStore.LookupEntry(SPELL_SCOURGING_CRYSTAL_CONTROLLER)) + if (!sSpellMgr->GetSpellInfo(SPELL_SCOURGING_CRYSTAL_CONTROLLER)) return false; return true; } @@ -293,9 +293,9 @@ public: class spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript : public SpellScript { PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3)) + if (!sSpellMgr->GetSpellInfo(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3)) return false; return true; } @@ -355,13 +355,13 @@ public: class spell_q11587_arcane_prisoner_rescue_SpellScript : public SpellScript { PrepareSpellScript(spell_q11587_arcane_prisoner_rescue_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_SUMMON_ARCANE_PRISONER_MALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ARCANE_PRISONER_MALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_ARCANE_PRISONER_FEMALE)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ARCANE_PRISONER_FEMALE)) return false; - if (!sSpellStore.LookupEntry(SPELL_ARCANE_PRISONER_KILL_CREDIT)) + if (!sSpellMgr->GetSpellInfo(SPELL_ARCANE_PRISONER_KILL_CREDIT)) return false; return true; } @@ -416,19 +416,19 @@ public: class spell_q11730_ultrasonic_screwdriver_SpellScript : public SpellScript { PrepareSpellScript(spell_q11730_ultrasonic_screwdriver_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_SUMMON_SCAVENGEBOT_004A8)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SCAVENGEBOT_004A8)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_SENTRYBOT_57K)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SENTRYBOT_57K)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_DEFENDOTANK_66D)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_DEFENDOTANK_66D)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_SCAVENGEBOT_005B6)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SCAVENGEBOT_005B6)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_55D_COLLECTATRON)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_55D_COLLECTATRON)) return false; - if (!sSpellStore.LookupEntry(SPELL_ROBOT_KILL_CREDIT)) + if (!sSpellMgr->GetSpellInfo(SPELL_ROBOT_KILL_CREDIT)) return false; return true; } @@ -545,15 +545,15 @@ public: { public: PrepareSpellScript(spell_q12634_despawn_fruit_tosser_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_BANANAS_FALL_TO_GROUND)) + if (!sSpellMgr->GetSpellInfo(SPELL_BANANAS_FALL_TO_GROUND)) return false; - if (!sSpellStore.LookupEntry(SPELL_ORANGE_FALLS_TO_GROUND)) + if (!sSpellMgr->GetSpellInfo(SPELL_ORANGE_FALLS_TO_GROUND)) return false; - if (!sSpellStore.LookupEntry(SPELL_PAPAYA_FALLS_TO_GROUND)) + if (!sSpellMgr->GetSpellInfo(SPELL_PAPAYA_FALLS_TO_GROUND)) return false; - if (!sSpellStore.LookupEntry(SPELL_SUMMON_ADVENTUROUS_DWARF)) + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_ADVENTUROUS_DWARF)) return false; return true; } @@ -597,12 +597,12 @@ public: PrepareSpellScript(spell_q12683_take_sputum_sample_SpellScript) void HandleDummy(SpellEffIndex /*effIndex*/) { - uint32 reqAuraId = SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), 1); + uint32 reqAuraId = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); Unit* pCaster = GetCaster(); if (pCaster->HasAuraEffect(reqAuraId, 0)) { - uint32 spellId = SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), 0); + uint32 spellId = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); pCaster->CastSpell(pCaster, spellId, true, NULL); } } @@ -694,9 +694,9 @@ public: { public: PrepareSpellScript(spell_q12937_relief_for_the_fallen_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_TRIGGER_AID_OF_THE_EARTHEN)) + if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGER_AID_OF_THE_EARTHEN)) return false; return true; } @@ -745,9 +745,9 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader { PrepareSpellScript(spell_q10041_q10040_who_are_they_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SPELL_QUESTGIVER)) + if (!sSpellMgr->GetSpellInfo(SPELL_QUESTGIVER)) return false; return true; } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index e82e7fc79fd..1915697e018 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -48,14 +48,14 @@ public: ROG_SPELL_CHEAT_DEATH_COOLDOWN = 31231, }; - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - return sSpellStore.LookupEntry(ROG_SPELL_CHEAT_DEATH_COOLDOWN); + return sSpellMgr->GetSpellInfo(ROG_SPELL_CHEAT_DEATH_COOLDOWN); } bool Load() { - absorbChance = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0); + absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); return GetUnitOwner()->ToPlayer(); } @@ -115,7 +115,7 @@ public: bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } @@ -153,9 +153,9 @@ class spell_rog_preparation : public SpellScriptLoader class spell_rog_preparation_SpellScript : public SpellScript { PrepareSpellScript(spell_rog_preparation_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(ROGUE_SPELL_GLYPH_OF_PREPARATION)) + if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_GLYPH_OF_PREPARATION)) return false; return true; } @@ -170,7 +170,7 @@ class spell_rog_preparation : public SpellScriptLoader const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); + SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first); if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE) { @@ -217,9 +217,9 @@ public: class spell_rog_prey_on_the_weak_AuraScript : public AuraScript { PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(ROGUE_SPELL_PREY_ON_THE_WEAK)) + if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_PREY_ON_THE_WEAK)) return false; return true; } @@ -232,7 +232,7 @@ public: { if (!target->HasAura(ROGUE_SPELL_PREY_ON_THE_WEAK)) { - int32 bp = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), 0); + int32 bp = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); target->CastCustomSpell(target, ROGUE_SPELL_PREY_ON_THE_WEAK, &bp, 0, 0, true); } } @@ -260,9 +260,9 @@ class spell_rog_shiv : public SpellScriptLoader class spell_rog_shiv_SpellScript : public SpellScript { PrepareSpellScript(spell_rog_shiv_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(ROGUE_SPELL_SHIV_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(ROGUE_SPELL_SHIV_TRIGGERED)) return false; return true; } @@ -348,7 +348,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(enchant->spellid[s]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]); if (!spellInfo) { sLog->outError("Player::CastItemCombatSpell Enchant %i, cast unknown spell %i", enchant->ID, enchant->spellid[s]); @@ -363,7 +363,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader if (spellInfo->SpellFamilyFlags.IsEqual(0x10000, 0x80000, 0)) continue; - if (IsPositiveSpell(enchant->spellid[s])) + if (spellInfo->IsPositive()) player->CastSpell(player, enchant->spellid[s], true, item); else player->CastSpell(target, enchant->spellid[s], true, item); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 8f81bb88fb2..7ffec9f7051 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -50,7 +50,7 @@ public: bool Load() { - absorbPct = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), EFFECT_0, GetCaster()); + absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster()); return true; } @@ -89,9 +89,9 @@ public: class spell_sha_fire_nova_SpellScript : public SpellScript { PrepareSpellScript(spell_sha_fire_nova_SpellScript) - bool Validate(SpellEntry const* spellEntry) + bool Validate(SpellInfo const* spellEntry) { - if (!sSpellStore.LookupEntry(SHAMAN_SPELL_FIRE_NOVA_R1)) + if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_FIRE_NOVA_R1)) return false; if (sSpellMgr->GetFirstSpellInChain(SHAMAN_SPELL_FIRE_NOVA_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id)) return false; @@ -148,11 +148,11 @@ public: class spell_sha_mana_tide_totem_SpellScript : public SpellScript { PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript) - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE)) + if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE)) return false; - if (!sSpellStore.LookupEntry(SHAMAN_SPELL_MANA_TIDE_TOTEM)) + if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_MANA_TIDE_TOTEM)) return false; return true; } @@ -198,11 +198,11 @@ public: { PrepareAuraScript(spell_sha_earthbind_totem_AuraScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM)) + if (!sSpellMgr->GetSpellInfo(SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM)) return false; - if (!sSpellStore.LookupEntry(SHAMAN_TOTEM_SPELL_EARTHEN_POWER)) + if (!sSpellMgr->GetSpellInfo(SHAMAN_TOTEM_SPELL_EARTHEN_POWER)) return false; return true; } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index a7b99aed6b5..2ce34be1a70 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -46,17 +46,17 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader { PrepareSpellScript(spell_warl_demonic_empowerment_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS)) return false; - if (!sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER)) return false; - if (!sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_FELGUARD)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_FELGUARD)) return false; - if (!sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_FELHUNTER)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_FELHUNTER)) return false; - if (!sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_IMP)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_IMP)) return false; return true; } @@ -75,7 +75,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader break; case CREATURE_FAMILY_VOIDWALKER: { - SpellEntry const* spellInfo = sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER); int32 hp = int32(targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(targetCreature, spellInfo, 0))); targetCreature->CastCustomSpell(targetCreature, WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER, &hp, NULL, NULL, true); //unitTarget->CastSpell(unitTarget, 54441, true); @@ -119,11 +119,11 @@ class spell_warl_create_healthstone : public SpellScriptLoader static uint32 const iTypes[8][3]; - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(WARLOCK_IMPROVED_HEALTHSTONE_R1)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_IMPROVED_HEALTHSTONE_R1)) return false; - if (!sSpellStore.LookupEntry(WARLOCK_IMPROVED_HEALTHSTONE_R2)) + if (!sSpellMgr->GetSpellInfo(WARLOCK_IMPROVED_HEALTHSTONE_R2)) return false; return true; } diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 3574c5c03fc..1019456aab3 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -37,9 +37,9 @@ class spell_warr_last_stand : public SpellScriptLoader { PrepareSpellScript(spell_warr_last_stand_SpellScript); - bool Validate(SpellEntry const* /*spellEntry*/) + bool Validate(SpellInfo const* /*spellEntry*/) { - if (!sSpellStore.LookupEntry(WARRIOR_SPELL_LAST_STAND_TRIGGERED)) + if (!sSpellMgr->GetSpellInfo(WARRIOR_SPELL_LAST_STAND_TRIGGERED)) return false; return true; } diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index ac101d239b5..26f3e238193 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -281,11 +281,11 @@ class spell_mark_of_nature : public SpellScriptLoader { PrepareSpellScript(spell_mark_of_nature_SpellScript); - bool Validate(SpellEntry const* /*spellInfo*/) + bool Validate(SpellInfo const* /*spellInfo*/) { - if (!sSpellStore.LookupEntry(SPELL_MARK_OF_NATURE)) + if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE)) return false; - if (!sSpellStore.LookupEntry(SPELL_AURA_OF_NATURE)) + if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_NATURE)) return false; return true; } diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index 52b7b233f88..6c71f3c2167 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -65,7 +65,7 @@ public: { if (me->GetEntry() == NPC_CENARION_HOLD_INFANTRY) DoScriptText(RAND(SAY_GUARD_SIL_AGGRO1, SAY_GUARD_SIL_AGGRO2, SAY_GUARD_SIL_AGGRO3), me, who); - if (SpellEntry const* spell = me->reachWithSpellAttack(who)) + if (SpellInfo const* spell = me->reachWithSpellAttack(who)) DoCast(who, spell->Id); } @@ -83,7 +83,7 @@ public: if (buffTimer <= diff) { //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellEntry const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + SpellInfo const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); if (info && !globalCooldown) { @@ -111,7 +111,7 @@ public: if (me->IsWithinMeleeRange(me->getVictim())) { bool healing = false; - SpellEntry const *info = NULL; + SpellInfo const *info = NULL; //Select a healing spell if less than 30% hp if (me->HealthBelowPct(30)) @@ -147,7 +147,7 @@ public: if (!me->IsNonMeleeSpellCasted(false)) { bool healing = false; - SpellEntry const *info = NULL; + SpellInfo const *info = NULL; //Select a healing spell if less than 30% hp ONLY 33% of the time if (me->HealthBelowPct(30) && 33 > urand(0, 99)) diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 10b0f14e632..f8095ba9c1e 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -65,7 +65,7 @@ public: disabled = true; break; case 34475: - if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES)) + if (const SpellInfo* pSpellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES)) Spell::SendCastResult(player, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); break; } @@ -313,7 +313,7 @@ public: { player->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); - if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_PETROV_BOMB)) + if (const SpellInfo* pSpellInfo = sSpellMgr->GetSpellInfo(SPELL_PETROV_BOMB)) Spell::SendCastResult(player, pSpellInfo, 1, SPELL_FAILED_NOT_HERE); return true; diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index f8616c3fa5e..5cb707bb2a4 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -66,7 +66,7 @@ public: if (BuffTimer <= diff) { //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellEntry const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + SpellInfo const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); if (info && !GlobalCooldown) { @@ -94,7 +94,7 @@ public: if (me->isAttackReady() && !me->IsNonMeleeSpellCasted(false)) { bool Healing = false; - SpellEntry const *info = NULL; + SpellInfo const *info = NULL; //Select a healing spell if less than 30% hp if (HealthBelowPct(30)) @@ -125,7 +125,7 @@ public: if (!me->IsNonMeleeSpellCasted(false)) { bool Healing = false; - SpellEntry const *info = NULL; + SpellInfo const *info = NULL; //Select a healing spell if less than 30% hp ONLY 33% of the time if (HealthBelowPct(30) && rand() % 3 == 0) @@ -176,13 +176,13 @@ public: { trigger_periodicAI(Creature* c) : NullCreatureAI(c) { - spell = me->m_spells[0] ? GetSpellStore()->LookupEntry(me->m_spells[0]) : NULL; + spell = me->m_spells[0] ? sSpellMgr->GetSpellInfo(me->m_spells[0]) : NULL; interval = me->GetAttackTime(BASE_ATTACK); timer = interval; } uint32 timer, interval; - const SpellEntry * spell; + const SpellInfo * spell; void UpdateAI(const uint32 diff) { diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 60a67250efb..66fdf0a3fbe 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -217,14 +217,14 @@ int32 DoLowUnlearnCost(Player* player) //blacksmith bool EquippedOk(Player* player, uint32 spellId) { - SpellEntry const* spell = GetSpellStore()->LookupEntry(spellId); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(spellId); if (!spell) return false; for (uint8 i = 0; i < 3; ++i) { - uint32 reqSpell = spell->EffectTriggerSpell[i]; + uint32 reqSpell = spell->Effects[i].TriggerSpell; if (!reqSpell) continue; diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 6cbdf4f90a3..22ce27d98cd 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -737,7 +737,7 @@ public: void EnterCombat(Unit* /*who*/){} - void SpellHit(Unit* caster, const SpellEntry *spell) + void SpellHit(Unit* caster, const SpellInfo *spell) { if (caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && spell->Id == 20804) { @@ -924,7 +924,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* pCaster, const SpellEntry *Spell) + void SpellHit(Unit* pCaster, const SpellInfo *Spell) { if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1) { @@ -1925,7 +1925,7 @@ public: } // Fly away when dismissed - void SpellHit(Unit* source, const SpellEntry *spell) + void SpellHit(Unit* source, const SpellInfo *spell) { if (spell->Id != 50515 || !me->isAlive()) return; |
