I noticed that players entering a tavern/Inn then step out still had the ‘resting’ flag marked on them and will not go away unless they move a far distance from the zone (tavern/Inn).
I Found in [SIZE=10px]Player::UpdateZone(uint32 newZone, uint32 newArea) this:[/SIZE]
if (GetMapId() != GetInnPosMapId() || sqrt((GetPositionX()-GetInnPosX())*(GetPositionX()-GetInnPosX())+(GetPositionY()-GetInnPosY())*(GetPositionY()-GetInnPosY())+(GetPositionZ()-GetInnPosZ())*(GetPositionZ()-GetInnPosZ()))>40)
And Changed it to:
if (GetMapId() != GetInnPosMapId() || sqrt((GetPositionX()-GetInnPosX())*(GetPositionX()-GetInnPosX())+(GetPositionY()-GetInnPosY())*(GetPositionY()-GetInnPosY())+(GetPositionZ()-GetInnPosZ())*(GetPositionZ()-GetInnPosZ()))>1)
Was there a significant reason why the player had to be 40 yards/units away from Inn/Taverns?