Core/Maps:
* Scarlet Monastry will now properly scale down to normal difficulty when trying to enter the instance on heroic difficulty * removed deprecated quest text requirement from access_requirement * added new access_requirement field to specifiy if a dungeon is only available for heroic difficulty * added heroic exclusive access_requirement entries for Zul'Gurub, Zul'Aman, End Time, Well of Eternity and Hour of Twilight * Players will no longer be able to enter dungeons when a encounter is in progress
This commit is contained in:
1 parent
5389375bab
commit
c991d4bfe7
9 files changed
+60
-47
No files matched your search
@@ -17811,7 +17811,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder* holder)
|
||||
SendTransferAborted(map->GetId(), TRANSFER_ABORT_DIFFICULTY, map->GetDifficulty());
|
||||
break;
|
||||
case Map::CANNOT_ENTER_INSTANCE_BIND_MISMATCH:
|
||||
ChatHandler(GetSession()).PSendSysMessage(GetSession()->GetTrinityString(LANG_INSTANCE_BIND_MISMATCH), map->GetMapName());
|
||||
SendTransferAborted(map->GetId(), TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE);
|
||||
break;
|
||||
case Map::CANNOT_ENTER_TOO_MANY_INSTANCES:
|
||||
SendTransferAborted(map->GetId(), TRANSFER_ABORT_TOO_MANY_INSTANCES);
|
||||
@@ -19637,6 +19637,12 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
|
||||
if (!mapEntry)
|
||||
return false;
|
||||
|
||||
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, target_map, this))
|
||||
{
|
||||
GetSession()->SendAreaTriggerMessage("%s", GetSession()->GetTrinityString(LANG_INSTANCE_CLOSED));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sWorld->getBoolConfig(CONFIG_INSTANCE_IGNORE_LEVEL))
|
||||
{
|
||||
if (ar->levelMin && getLevel() < ar->levelMin)
|
||||
@@ -19655,12 +19661,6 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
|
||||
else if (ar->item2 && !HasItemCount(ar->item2))
|
||||
missingItem = ar->item2;
|
||||
|
||||
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, target_map, this))
|
||||
{
|
||||
GetSession()->SendAreaTriggerMessage("%s", GetSession()->GetTrinityString(LANG_INSTANCE_CLOSED));
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 missingQuest = 0;
|
||||
if (GetTeam() == ALLIANCE && ar->quest_A && !GetQuestRewardStatus(ar->quest_A))
|
||||
missingQuest = ar->quest_A;
|
||||
@@ -19677,21 +19677,17 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
|
||||
if (!leader || !leader->HasAchieved(ar->achievement))
|
||||
missingAchievement = ar->achievement;
|
||||
|
||||
bool heroicExclusive = ar->heroicExclusive;
|
||||
|
||||
Difficulty target_difficulty = GetDifficulty(mapEntry->IsRaid());
|
||||
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(target_map, target_difficulty);
|
||||
if (LevelMin || LevelMax || missingItem || missingQuest || missingAchievement)
|
||||
if (!mapDiff)
|
||||
return false;
|
||||
|
||||
if (LevelMin || LevelMax || missingItem || missingQuest || missingAchievement || heroicExclusive)
|
||||
{
|
||||
if (report)
|
||||
{
|
||||
if (missingQuest && !ar->questFailedText.empty())
|
||||
ChatHandler(GetSession()).PSendSysMessage("%s", ar->questFailedText.c_str());
|
||||
else if (mapDiff->hasErrorMessage) // if (missingAchievement) covered by this case
|
||||
SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty);
|
||||
else if (missingItem)
|
||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, ASSERT_NOTNULL(sObjectMgr->GetItemTemplate(missingItem))->Name1.c_str());
|
||||
else if (LevelMin)
|
||||
GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED), LevelMin);
|
||||
}
|
||||
if (report && mapDiff->hasErrorMessage)
|
||||
SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user