mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8832] Fixed typo in difficulty name
This commit is contained in:
parent
398ca010ca
commit
f66f0a0914
5 changed files with 12 additions and 16 deletions
|
|
@ -234,7 +234,7 @@ enum AreaFlags
|
|||
|
||||
enum Difficulty
|
||||
{
|
||||
REGULAR_DEFAULT = 0,
|
||||
REGULAR_DIFFICULTY = 0,
|
||||
|
||||
DUNGEON_DIFFICULTY_NORMAL = 0,
|
||||
DUNGEON_DIFFICULTY_HEROIC = 1,
|
||||
|
|
@ -251,7 +251,7 @@ enum Difficulty
|
|||
|
||||
enum SpawnMask
|
||||
{
|
||||
SPAWNMASK_REGULAR = (1 << REGULAR_DEFAULT), // any any maps without spawn modes (continents/subway) or in minimal spawnmode
|
||||
SPAWNMASK_REGULAR = (1 << REGULAR_DIFFICULTY),// any any maps without spawn modes (continents/subway) or in minimal spawnmode
|
||||
|
||||
SPAWNMASK_DUNGEON_NORMAL = (1 << DUNGEON_DIFFICULTY_NORMAL),
|
||||
SPAWNMASK_DUNGEON_HEROIC = (1 << DUNGEON_DIFFICULTY_HEROIC),
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
// regular difficulty = continent/dungeon normal/first raid normal difficulty
|
||||
uint8 GetSpawnMode() const { return (i_spawnMode); }
|
||||
Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); }
|
||||
bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DEFAULT; }
|
||||
bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; }
|
||||
uint32 GetMaxPlayers() const; // dependent from map difficulty
|
||||
uint32 GetMaxResetDelay() const; // dependent from map difficulty
|
||||
MapDifficulty const* GetMapDifficulty() const; // dependent from map difficulty
|
||||
|
|
@ -380,7 +380,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
// NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
|
||||
bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); }
|
||||
bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); }
|
||||
bool IsRaidOrHeroicDungeon() const { return IsRaid() || i_spawnMode > DUNGEON_DIFFICULTY_NORMAL; }
|
||||
bool IsRaidOrHeroicDungeon() const { return IsRaid() || GetDifficulty() > DUNGEON_DIFFICULTY_NORMAL; }
|
||||
bool IsBattleGround() const { return i_mapEntry && i_mapEntry->IsBattleGround(); }
|
||||
bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
|
||||
bool IsBattleGroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattleGroundOrArena(); }
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ MapManager::_createBaseMap(uint32 id)
|
|||
}
|
||||
else
|
||||
{
|
||||
m = new Map(id, i_gridCleanUpDelay, 0, DUNGEON_DIFFICULTY_NORMAL);
|
||||
m = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
|
||||
}
|
||||
i_maps[id] = m;
|
||||
}
|
||||
|
|
@ -184,13 +184,11 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||
MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID,player->GetDifficulty(entry->map_type == MAP_RAID));
|
||||
if (!mapDiff)
|
||||
{
|
||||
bool isNormalTargetMap = entry->map_type == MAP_RAID
|
||||
? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
: (player->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
|
||||
bool isRegularTargetMap = player->GetDifficulty(entry->IsRaid()) == REGULAR_DIFFICULTY;
|
||||
|
||||
//Send aborted message
|
||||
// FIX ME: what about absent normal/heroic mode with specific players limit...
|
||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, isNormalTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
|
||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, isRegularTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -810,12 +810,10 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
|||
if(!mapEntry)
|
||||
return;
|
||||
|
||||
bool isNormalTargetMap = mapEntry->IsRaid()
|
||||
? (GetPlayer()->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
: (GetPlayer()->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
|
||||
bool isRegularTargetMap = GetPlayer()->GetDifficulty(mapEntry->IsRaid()) == REGULAR_DIFFICULTY;
|
||||
|
||||
uint32 missingKey = 0;
|
||||
if (!isNormalTargetMap)
|
||||
if (!isRegularTargetMap)
|
||||
{
|
||||
if(at->heroicKey)
|
||||
{
|
||||
|
|
@ -828,7 +826,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
|||
}
|
||||
|
||||
uint32 missingQuest = 0;
|
||||
if (!isNormalTargetMap)
|
||||
if (!isRegularTargetMap)
|
||||
{
|
||||
if (at->requiredQuestHeroic && !GetPlayer()->GetQuestRewardStatus(at->requiredQuestHeroic))
|
||||
missingQuest = at->requiredQuestHeroic;
|
||||
|
|
@ -845,7 +843,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
|||
if(missingItem)
|
||||
SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, ObjectMgr::GetItemPrototype(missingItem)->Name1);
|
||||
else if(missingKey)
|
||||
GetPlayer()->SendTransferAborted(at->target_mapId, TRANSFER_ABORT_DIFFICULTY, isNormalTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
|
||||
GetPlayer()->SendTransferAborted(at->target_mapId, TRANSFER_ABORT_DIFFICULTY, isRegularTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
|
||||
else if(missingQuest)
|
||||
SendAreaTriggerMessage(at->requiredFailedText.c_str());
|
||||
else if(missingLevel)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8831"
|
||||
#define REVISION_NR "8832"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue