aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index d57f86a0d80..5b5c859097f 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1330,8 +1330,14 @@ void Player::setDeathState(DeathState s)
bool cur = isAlive();
- if(s == JUST_DIED && cur)
+ if(s == JUST_DIED)
{
+ if(!cur)
+ {
+ sLog.outError("setDeathState: attempt to kill a dead player %s(%d)", GetName(), GetGUIDLow());
+ return;
+ }
+
// drunken state is cleared on death
SetDrunkValue(0);
// lost combo points at any target (targeted combo points clear in Unit::setDeathState)
@@ -13910,6 +13916,9 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
m_movementInfo.t_o = 0.0f;
}
+ if(!_LoadHomeBind(holder->GetResult(PLAYER_LOGIN_QUERY_LOADHOMEBIND)))
+ return false;
+
// load the player's map here if it's not already loaded
Map *map = GetMap();
if (!map)
@@ -13919,11 +13928,13 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
{
SetMapId(at->target_mapId);
Relocate(at->target_X, at->target_Y, at->target_Z, GetOrientation());
+ sLog.outError("Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).",guid,GetMapId(),GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
}
else
{
SetMapId(m_homebindMapId);
Relocate(m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
+ sLog.outError("Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).",guid,GetMapId(),GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
}
map = GetMap();
@@ -14168,8 +14179,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
m_social = sSocialMgr.LoadFromDB(holder->GetResult(PLAYER_LOGIN_QUERY_LOADSOCIALLIST), GetGUIDLow());
- if(!_LoadHomeBind(holder->GetResult(PLAYER_LOGIN_QUERY_LOADHOMEBIND)))
- return false;
+ //if(!_LoadHomeBind(holder->GetResult(PLAYER_LOGIN_QUERY_LOADHOMEBIND)))
+ // return false;
// check PLAYER_CHOSEN_TITLE compatibility with PLAYER__FIELD_KNOWN_TITLES
// note: PLAYER__FIELD_KNOWN_TITLES updated at quest status loaded