*Fix the bug that .start always send dk back to start zone.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-17 23:51:08 -05:00
parent 98f58a0f0a
commit a690f5239c
5 changed files with 17 additions and 6 deletions

View File

@@ -1773,7 +1773,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
else
{
if(getClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !isGameMaster()
&& !IsActiveQuest(13165))
&& !HasSpell(SPELL_ID_DEATH_GATE))
return false;
// far teleport to another map
@@ -18828,6 +18828,15 @@ void Player::ReportedAfkBy(Player* reporter)
}
}
WorldLocation Player::GetStartPosition() const
{
PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(), getClass());
uint32 mapId = info->mapId;
if(getClass() == CLASS_DEATH_KNIGHT && HasSpell(SPELL_ID_DEATH_GATE))
mapId = 0;
return WorldLocation(mapId, info->positionX, info->positionY, info->positionZ, 0);
}
bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool is3dDistance) const
{
// Always can see self