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:
Andrew
2024-08-31 17:35:17 -03:00
committed by GitHub
parent 3b45e90e41
commit 83d623e559

View File

@@ -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*/)