Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo *GetSpellProto is now GetSpellInfo *SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].* *sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo() *SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff() *SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class. *GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections *code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
||||
void 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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-1
@@ -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())
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user