diff options
author | Kudlaty <none@none> | 2009-08-13 17:03:12 +0200 |
---|---|---|
committer | Kudlaty <none@none> | 2009-08-13 17:03:12 +0200 |
commit | 7cc1b6a0d13747c1ae10554557bb759303bef9d8 (patch) | |
tree | f3b77bfe58ea9131170ab28ab60a8bcd9be9a576 /src | |
parent | 5ba4407d42462982c8fb8abc306376abcc0094bc (diff) | |
parent | 284b0063a8b5e49ade31900c92219fe62c13c572 (diff) |
merge
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp | 6 | ||||
-rw-r--r-- | src/game/MovementHandler.cpp | 7 | ||||
-rw-r--r-- | src/game/Player.cpp | 5 |
3 files changed, 13 insertions, 5 deletions
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 45892af7401..f72cf9fc5ce 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -282,9 +282,9 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI void JustDied(Unit* Killer) { - Unit *Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100); + Creature *Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100); if(Shaffar) - CAST_AI(boss_nexusprince_shaffarAI, (CAST_CRE(Shaffar)->AI()))->RemoveBeaconFromList(m_creature); + CAST_AI(boss_nexusprince_shaffarAI, Shaffar->AI())->RemoveBeaconFromList(m_creature); } void UpdateAI(const uint32 diff) @@ -294,7 +294,7 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI if(Check_Timer < diff) { - Unit *Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100); + Creature *Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100); if(!Shaffar || Shaffar->isDead() || !Shaffar->isInCombat()) { KillSelf(); diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 0b96560f150..72fe205625d 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -67,6 +67,13 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->SetSemaphoreTeleportFar(false); Map * oldMap = GetPlayer()->GetMap(); + assert(oldMap); + if(GetPlayer()->IsInWorld()) + { + sLog.outCrash("Player is still in world when teleported out of map %u! to new map %u", oldMap->GetId(), loc.mapid); + oldMap->Remove(GetPlayer(), false); + } + // relocate the player to the teleport destination Map * newMap = MapManager::Instance().CreateMap(loc.mapid, GetPlayer(), 0); // the CanEnter checks are done in TeleporTo but conditions may change diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4f41bb44cda..2006eace1db 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1617,12 +1617,13 @@ void Player::SendTeleportAckMsg() GetSession()->SendPacket(&data); } +// this is not used anywhere void Player::TeleportOutOfMap(Map *oldMap) { while(IsBeingTeleportedFar()) GetSession()->HandleMoveWorldportAckOpcode(); - if(FindMap() != oldMap) + if(GetMap() != oldMap) return; TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation()); @@ -1630,7 +1631,7 @@ void Player::TeleportOutOfMap(Map *oldMap) while(IsBeingTeleportedFar()) GetSession()->HandleMoveWorldportAckOpcode(); - if(FindMap() == oldMap) + if(GetMap() == oldMap) { sLog.outCrash("Cannot teleport player out of map!"); ResetMap(); |