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:
QAston
2011-07-26 23:09:28 +02:00
parent 29c228a801
commit b0fe236265
195 changed files with 4630 additions and 6929 deletions
@@ -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();
@@ -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;