Scripts/Icecrown Citadel: Fixed visual and target selection of Sindragosa's Fury
This commit is contained in:
@@ -1041,7 +1041,26 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
|
|||||||
bool Load()
|
bool Load()
|
||||||
{
|
{
|
||||||
_targetCount = 0;
|
_targetCount = 0;
|
||||||
|
|
||||||
|
// This script should execute only in Icecrown Citadel
|
||||||
|
if (InstanceMap* instance = GetCaster()->GetMap()->ToInstanceMap())
|
||||||
|
if (instance->GetInstanceScript())
|
||||||
|
if (instance->GetScriptId() == sObjectMgr->GetScriptId(ICCScriptName))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SelectDest()
|
||||||
|
{
|
||||||
|
if (Position* dest = const_cast<WorldLocation*>(GetExplTargetDest()))
|
||||||
|
{
|
||||||
|
float destX = float(rand_norm()) * 75.0f + 4350.0f;
|
||||||
|
float destY = float(rand_norm()) * 75.0f + 2450.0f;
|
||||||
|
float destZ = 205.0f; // random number close to ground, get exact in next call
|
||||||
|
GetCaster()->UpdateGroundPositionZ(destX, destY, destZ);
|
||||||
|
dest->Relocate(destX, destY, destZ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CountTargets(std::list<WorldObject*>& targets)
|
void CountTargets(std::list<WorldObject*>& targets)
|
||||||
@@ -1070,8 +1089,9 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
|
|||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_sindragosa_s_fury_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
|
BeforeCast += SpellCastFn(spell_sindragosa_s_fury_SpellScript::SelectDest);
|
||||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_s_fury_SpellScript::CountTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
|
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_s_fury_SpellScript::CountTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_sindragosa_s_fury_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 _targetCount;
|
uint32 _targetCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user