Skip to content

Commit

Permalink
[11783] Let scripting library decide if an encounter is in progress i…
Browse files Browse the repository at this point in the history
…n instances

Replace wrong Group::InCombatToInstance check, this was preventing entering when any member is in any combat.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
  • Loading branch information
Schmoozerd committed Sep 3, 2011
1 parent c8a2282 commit 3495e25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/game/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,9 +1261,8 @@ bool DungeonMap::CanEnter(Player *player)
return false;
}

// cannot enter while players in the instance are in combat
Group *pGroup = player->GetGroup();
if(pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->isAlive() && player->GetMapId() != GetId())
// cannot enter while an encounter in the instance is in progress
if (!player->isGameMaster() && GetInstanceData() && GetInstanceData()->IsEncounterInProgress() && player->GetMapId() != GetId())
{
player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11782"
#define REVISION_NR "11783"
#endif // __REVISION_NR_H__

6 comments on commit 3495e25

@PSZ
Copy link
Contributor

@PSZ PSZ commented on 3495e25 Sep 3, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shmoo, congrats with mangos-dev status!

@sergeev
Copy link

@sergeev sergeev commented on 3495e25 Sep 3, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!.

@Ambal
Copy link
Contributor

@Ambal Ambal commented on 3495e25 Sep 4, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schmoozerd is finally a dev, cool :) Cheers! :)

@PSZ
Copy link
Contributor

@PSZ PSZ commented on 3495e25 Sep 4, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ambal is dev too ;)

@SkirnirMaNGOS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations!

@Schmoozerd
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you guys :)

Please sign in to comment.