mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/BlackTemple): Fix Mother Shahraz teleport (#19820)
fix(Scripts/BlackTemple): Fix Mother Sharaz teleport Co-authored-by: Keader <keader.android@gmail.com>
This commit is contained in:
@@ -212,14 +212,7 @@ class spell_mother_shahraz_fatal_attraction : public SpellScript
|
|||||||
|
|
||||||
void SetDest(SpellDestination& dest)
|
void SetDest(SpellDestination& dest)
|
||||||
{
|
{
|
||||||
std::list<TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
|
dest.Relocate(GetCaster()->GetRandomNearPosition(50.0f));
|
||||||
for (std::list<TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
|
|
||||||
if (Unit* target = ObjectAccessor::GetUnit(*GetCaster(), ihit->targetGUID))
|
|
||||||
{
|
|
||||||
dest.Relocate(*target);
|
|
||||||
if (roll_chance_i(50))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleTeleportUnits(SpellEffIndex /*effIndex*/)
|
void HandleTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||||
|
|||||||
Reference in New Issue
Block a user