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