* Move all movable spell effects from core to DB. Needs DB support.

* Fix some compile errors made in previous commits.

--HG--
branch : trunk
This commit is contained in:
azazel
2010-08-07 01:02:09 +06:00
parent 485886fe71
commit f413d60908
7 changed files with 14 additions and 228 deletions

View File

@@ -46,9 +46,8 @@ enum Misc
class instance_deadmines : public InstanceMapScript
{
public:
instance_deadmines()
: InstanceMapScript("instance_deadmines");
: InstanceMapScript("instance_deadmines")
{
}
@@ -252,7 +251,7 @@ class instance_deadmines : public InstanceMapScript
}
};
InstanceData* OnGetInstanceData(InstanceMap* map)
InstanceData* OnGetInstanceData(InstanceMap* pMap)
{
return new instance_deadmines_InstanceMapScript(pMap);
}

View File

@@ -27,7 +27,6 @@
class spell_gen_remove_flight_auras : public SpellHandlerScript
{
public:
spell_gen_remove_flight_auras() : SpellHandlerScript("spell_gen_remove_flight_auras") {}
class spell_gen_remove_flight_auras_SpellScript : public SpellScript
@@ -51,7 +50,7 @@ class spell_gen_remove_flight_auras : public SpellHandlerScript
{
return new spell_gen_remove_flight_auras_SpellScript;
}
}
};
void AddSC_generic_spell_scripts()
{

View File

@@ -113,22 +113,22 @@ class spell_mage_polymorph_cast_visual : public SpellHandlerScript
}
};
const uint32 spell_mage_polymorph_cast_visual_SpellScript::spell_list[6] =
{
SPELL_MAGE_SQUIRREL_FORM,
SPELL_MAGE_GIRAFFE_FORM,
SPELL_MAGE_SERPENT_FORM,
SPELL_MAGE_DRAGONHAWK_FORM,
SPELL_MAGE_WORGEN_FORM,
SPELL_MAGE_SHEEP_FORM
};
SpellScript* GetSpellScript() const
{
return new spell_mage_polymorph_cast_visual_SpellScript();
}
};
const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual_SpellScript::spell_list[6] =
{
SPELL_MAGE_SQUIRREL_FORM,
SPELL_MAGE_GIRAFFE_FORM,
SPELL_MAGE_SERPENT_FORM,
SPELL_MAGE_DRAGONHAWK_FORM,
SPELL_MAGE_WORGEN_FORM,
SPELL_MAGE_SHEEP_FORM
};
class spell_mage_summon_water_elemental : public SpellHandlerScript
{
public:

View File

@@ -26,7 +26,6 @@
enum WarriorSpells
{
WARRIOR_SPELL_LAST_STAND_TRIGGERED = 12976,
WARRIOR_SPELL_WARRIORS_WRATH_TRIGGERED = 21887,
};
class spell_warr_last_stand : public SpellHandlerScript
@@ -62,41 +61,7 @@ class spell_warr_last_stand : public SpellHandlerScript
}
};
class spell_warr_warriors_wrath : public SpellHandlerScript
{
public:
spell_warr_warriors_wrath() : SpellHandlerScript("spell_warr_warriors_wrath") { }
class spell_warr_warriors_wrath_SpellScript : public SpellScript
{
bool Validate(SpellEntry const *spellEntry)
{
if (!sSpellStore.LookupEntry(WARRIOR_SPELL_WARRIORS_WRATH_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
{
if (Unit *unitTarget = GetHitUnit())
GetCaster()->CastSpell(unitTarget, WARRIOR_SPELL_WARRIORS_WRATH_TRIGGERED, true);
}
void Register()
{
// add dummy effect spell handler to Warrior's Wrath
EffectHandlers += EffectHandlerFn(spell_warr_warriors_wrath_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript *GetSpellScript() const
{
return new spell_warr_warriors_wrath_SpellScript();
}
};
void AddSC_warrior_spell_scripts()
{
new spell_warr_last_stand;
new spell_warr_warriors_wrath;
}