Scripts/Spells: Added script for Animal Blood pool spawning (fixes fishing daily quest "Blood is Thicker")
--HG-- branch : trunk
This commit is contained in:
@@ -6335,7 +6335,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
Map *cMap = m_caster->GetMap();
|
||||
if (goinfo->type == GAMEOBJECT_TYPE_FISHINGNODE)
|
||||
if (goinfo->type == GAMEOBJECT_TYPE_FISHINGNODE || goinfo->type == GAMEOBJECT_TYPE_FISHINGHOLE)
|
||||
{
|
||||
LiquidData liqData;
|
||||
if ( !cMap->IsInWater(fx, fy, fz + 1.f/* -0.5f */, &liqData)) // Hack to prevent fishing bobber from failing to land on fishing hole
|
||||
@@ -6391,8 +6391,8 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
pGameObj->AddUniqueUse(m_caster->ToPlayer());
|
||||
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
|
||||
pGameObj->AddUniqueUse(m_caster->ToPlayer());
|
||||
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user