From 885c3449b4655ab5a8009bc34e0d88182fde362f Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Fri, 2 Jul 2010 03:19:50 +0400 Subject: [PATCH] [10132] Cleanup code for Group::_homebindIfInstance --- src/game/Group.cpp | 15 +++++++++------ src/shared/revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 3a1a54baf..abf51b2d9 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -1731,14 +1731,17 @@ void Group::UnbindInstance(uint32 mapid, uint8 difficulty, bool unload) void Group::_homebindIfInstance(Player *player) { - if(player && !player->isGameMaster() && sMapStore.LookupEntry(player->GetMapId())->IsDungeon()) + if (player && !player->isGameMaster()) { - // leaving the group in an instance, the homebind timer is started - // unless the player is permanently saved to the instance Map* map = player->GetMap(); - InstancePlayerBind *playerBind = map->IsDungeon() ? player->GetBoundInstance(map->GetId(), map->GetDifficulty()) : NULL; - if(!playerBind || !playerBind->perm) - player->m_InstanceValid = false; + if (map->IsDungeon()) + { + // leaving the group in an instance, the homebind timer is started + // unless the player is permanently saved to the instance + InstancePlayerBind *playerBind = player->GetBoundInstance(map->GetId(), map->GetDifficulty()); + if(!playerBind || !playerBind->perm) + player->m_InstanceValid = false; + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4a014316c..eb5d6d3c4 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10131" + #define REVISION_NR "10132" #endif // __REVISION_NR_H__