Skip to content

Commit

Permalink
[10132] Cleanup code for Group::_homebindIfInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirMangos committed Jul 1, 2010
1 parent 8f75384 commit 7a6fd8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/game/Group.cpp
Expand Up @@ -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;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit 7a6fd8c

Please sign in to comment.