For some reason, i sometimes have characters saved on map 489. When they do login the server crashes as there is not BG existing for this map.
So i modified my sourceode a bit:
void Player::SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint32 zone,uint64 guid)
{
std::ostringstream ss;
ss << "UPDATE characters SET position_x='"<<x<<"',position_y='"<<y
<< "',position_z='"<<z<<"',orientation='"<<o<<"',map='"<<mapid
<< "',zone='"<<zone<<"',trans_x='0',trans_y='0',trans_z='0',"
<< "transguid='0',taxi_path='' WHERE guid='"<< GUID_LOPART(guid) <<"'";
sLog.outDebug(ss.str().c_str());
if ( mapid != 489 ) // do not save in WSG map
{
CharacterDatabase.Execute(ss.str().c_str());
}
}
But i still get sooner or later a player saved over there. That means looking at the DB "map" field i find a 489 there. But how is this technically possible? I mean there is no other code in the mangos sourcecode which modifies the player's DB location data. have you got an idea?
I am not running any selfmade scripts or website teleporters.. whatever.
thanks in advance, mrlocus