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 committed 2011-07-26 23:09:28 +02:00
1 parent 29c228a801
commit b0fe236265
195 files changed
+4630 -6929

No files matched your search

+9 -9
View File
@@ -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;
}