aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorShauren <none@none>2010-11-10 11:37:41 +0100
committerShauren <none@none>2010-11-10 11:37:41 +0100
commitcc220ca7b6550b9f86643b9e6c082475e5d904ae (patch)
treef9b6c7ecb33f4c797a1ced063fa1fc44de5eafe0 /src/server/scripts
parent03e4ecfbfd57367ea015fdef9fc978fbeafff84e (diff)
Scripts/Spells: Added script for Animal Blood pool spawning (fixes fishing daily quest "Blood is Thicker")
--HG-- branch : trunk
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 0c81e29af75..80bca7e28e8 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -478,6 +478,45 @@ public:
}
};
+enum AnimalBloodPoolSpell
+{
+ SPELL_SPAWN_BLOOD_POOL = 63471,
+};
+
+class spell_gen_animal_blood : public SpellScriptLoader
+{
+ public:
+ spell_gen_animal_blood() : SpellScriptLoader("spell_gen_animal_blood") { }
+
+ class spell_gen_animal_blood_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_gen_animal_blood_AuraScript);
+
+ bool Validate(SpellEntry const* /*spell*/)
+ {
+ if (!sSpellStore.LookupEntry(SPELL_SPAWN_BLOOD_POOL))
+ return false;
+ return true;
+ }
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraApplication const* aurApp, AuraEffectHandleModes /*mode*/)
+ {
+ if (GetUnitOwner()->IsInWater())
+ GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SPAWN_BLOOD_POOL, true);
+ }
+
+ void Register()
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_gen_animal_blood_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_gen_animal_blood_AuraScript();
+ }
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_aura_of_anger();
@@ -490,4 +529,5 @@ void AddSC_generic_spell_scripts()
new spell_gen_trick_or_treat();
new spell_creature_permanent_feign_death();
new spell_pvp_trinket_wotf_shared_cd();
+ new spell_gen_animal_blood();
}