aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-02-24 23:50:54 -0700
committerBrian <runningnak3d@gmail.com>2010-02-24 23:50:54 -0700
commitcb5ffcafdbcd4dde38d51e1af3870870b3479b78 (patch)
tree2ec27c6d6ab05e906eab142d3354895d0c659d16 /src/game/Player.cpp
parent1ee9839bcb4aa31321a011595ceb557bee930ef1 (diff)
parentc76cb0ce7cae42970ac1b0792a9ee4ed33a23386 (diff)
* Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 8379ec77d58..1a5e2720525 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -16980,6 +16980,30 @@ bool Player::Satisfy(AccessRequirement const *ar, uint32 target_map, bool report
if(!mapEntry)
return false;
+ bool closed = false;
+
+ switch(mapEntry->IsRaid() ? GetRaidDifficulty() : GetDungeonDifficulty())
+ {
+ case DUNGEON_DIFFICULTY_NORMAL:
+ closed = (ar->status & DUNGEON_STATUSFLAG_NORMAL) == 0;
+ break;
+ case DUNGEON_DIFFICULTY_HEROIC:
+ closed = (ar->status & DUNGEON_STATUSFLAG_HEROIC) == 0;
+ break;
+ case RAID_DIFFICULTY_10MAN_HEROIC:
+ closed = (ar->status & RAID_STATUSFLAG_10MAN_HEROIC) == 0;
+ break;
+ case RAID_DIFFICULTY_25MAN_HEROIC:
+ closed = (ar->status & RAID_STATUSFLAG_25MAN_HEROIC) == 0;
+ break;
+ }
+
+ if (closed)
+ {
+ GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_INSTANCE_CLOSED));
+ return false;
+ }
+
bool isNormalTargetMap = mapEntry->IsRaid()
? (GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
: (GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);