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