mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10132] Cleanup code for Group::_homebindIfInstance
This commit is contained in:
parent
8d80906296
commit
885c3449b4
2 changed files with 10 additions and 7 deletions
|
|
@ -1731,15 +1731,18 @@ void Group::UnbindInstance(uint32 mapid, uint8 difficulty, bool unload)
|
||||||
|
|
||||||
void Group::_homebindIfInstance(Player *player)
|
void Group::_homebindIfInstance(Player *player)
|
||||||
{
|
{
|
||||||
if(player && !player->isGameMaster() && sMapStore.LookupEntry(player->GetMapId())->IsDungeon())
|
if (player && !player->isGameMaster())
|
||||||
|
{
|
||||||
|
Map* map = player->GetMap();
|
||||||
|
if (map->IsDungeon())
|
||||||
{
|
{
|
||||||
// leaving the group in an instance, the homebind timer is started
|
// leaving the group in an instance, the homebind timer is started
|
||||||
// unless the player is permanently saved to the instance
|
// unless the player is permanently saved to the instance
|
||||||
Map* map = player->GetMap();
|
InstancePlayerBind *playerBind = player->GetBoundInstance(map->GetId(), map->GetDifficulty());
|
||||||
InstancePlayerBind *playerBind = map->IsDungeon() ? player->GetBoundInstance(map->GetId(), map->GetDifficulty()) : NULL;
|
|
||||||
if(!playerBind || !playerBind->perm)
|
if(!playerBind || !playerBind->perm)
|
||||||
player->m_InstanceValid = false;
|
player->m_InstanceValid = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void RewardGroupAtKill_helper(Player* pGroupGuy, Unit* pVictim, uint32 count, bool PvP, float group_rate, uint32 sum_level, bool is_dungeon, Player* not_gray_member_with_max_level, Player* member_with_max_level, uint32 xp )
|
static void RewardGroupAtKill_helper(Player* pGroupGuy, Unit* pVictim, uint32 count, bool PvP, float group_rate, uint32 sum_level, bool is_dungeon, Player* not_gray_member_with_max_level, Player* member_with_max_level, uint32 xp )
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10131"
|
#define REVISION_NR "10132"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue