aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-05-13 20:48:23 +0200
committerjackpoz <giacomopoz@gmail.com>2014-05-13 20:48:23 +0200
commitd32180df1771582249173701afc7a49937cab291 (patch)
tree5ee7c15be7645d7d289342491beda4d8a83ba66d /src/server/scripts
parentdcc64f4c69e400f16cf0cb81a851482a026b5201 (diff)
parent593fb9b68a85bc7c807ec13472a7fb66cc463547 (diff)
Merge pull request #12058 from Trisjdc/sunwell
Scripts/SWP: Sathrovarr will no longer cause player teleports on grid load
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 5562559786d..28bb24f49a9 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -679,13 +679,16 @@ public:
if (!map->IsDungeon())
return;
- Map::PlayerList const &PlayerList = map->GetPlayers();
- for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ Map::PlayerList const &playerList = map->GetPlayers();
+ Position homePos = me->GetHomePosition();
+ for (Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
{
- if (i->GetSource()->GetPositionZ() <= DRAGON_REALM_Z-5)
+ Player* player = itr->GetSource();
+ if (player->IsInDist(&homePos, 50.0f) && player->GetPositionZ() <= DEMON_REALM_Z + 10.f)
{
- i->GetSource()->RemoveAura(AURA_SPECTRAL_REALM);
- i->GetSource()->TeleportTo(me->GetMap()->GetId(), i->GetSource()->GetPositionX(), i->GetSource()->GetPositionY(), DRAGON_REALM_Z+5, i->GetSource()->GetOrientation());
+ player->RemoveAura(AURA_SPECTRAL_REALM);
+ player->TeleportTo(me->GetMap()->GetId(), player->GetPositionX(),
+ player->GetPositionY(), DRAGON_REALM_Z + 5, player->GetOrientation());
}
}
}