[8832] Fixed typo in difficulty name

This commit is contained in:
VladimirMangos 2009-11-19 03:49:00 +03:00
parent 398ca010ca
commit f66f0a0914
5 changed files with 12 additions and 16 deletions

View file

@ -234,7 +234,7 @@ enum AreaFlags
enum Difficulty enum Difficulty
{ {
REGULAR_DEFAULT = 0, REGULAR_DIFFICULTY = 0,
DUNGEON_DIFFICULTY_NORMAL = 0, DUNGEON_DIFFICULTY_NORMAL = 0,
DUNGEON_DIFFICULTY_HEROIC = 1, DUNGEON_DIFFICULTY_HEROIC = 1,
@ -251,7 +251,7 @@ enum Difficulty
enum SpawnMask 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_NORMAL = (1 << DUNGEON_DIFFICULTY_NORMAL),
SPAWNMASK_DUNGEON_HEROIC = (1 << DUNGEON_DIFFICULTY_HEROIC), SPAWNMASK_DUNGEON_HEROIC = (1 << DUNGEON_DIFFICULTY_HEROIC),

View file

@ -371,7 +371,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
// regular difficulty = continent/dungeon normal/first raid normal difficulty // regular difficulty = continent/dungeon normal/first raid normal difficulty
uint8 GetSpawnMode() const { return (i_spawnMode); } uint8 GetSpawnMode() const { return (i_spawnMode); }
Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); } 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 GetMaxPlayers() const; // dependent from map difficulty
uint32 GetMaxResetDelay() const; // dependent from map difficulty uint32 GetMaxResetDelay() const; // dependent from map difficulty
MapDifficulty const* GetMapDifficulty() 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 // 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 IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); }
bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); } 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 IsBattleGround() const { return i_mapEntry && i_mapEntry->IsBattleGround(); }
bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); } bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
bool IsBattleGroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattleGroundOrArena(); } bool IsBattleGroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattleGroundOrArena(); }

View file

@ -118,7 +118,7 @@ MapManager::_createBaseMap(uint32 id)
} }
else else
{ {
m = new Map(id, i_gridCleanUpDelay, 0, DUNGEON_DIFFICULTY_NORMAL); m = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
} }
i_maps[id] = m; 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)); MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID,player->GetDifficulty(entry->map_type == MAP_RAID));
if (!mapDiff) if (!mapDiff)
{ {
bool isNormalTargetMap = entry->map_type == MAP_RAID bool isRegularTargetMap = player->GetDifficulty(entry->IsRaid()) == REGULAR_DIFFICULTY;
? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
: (player->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
//Send aborted message //Send aborted message
// FIX ME: what about absent normal/heroic mode with specific players limit... // 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; return false;
} }

View file

@ -810,12 +810,10 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if(!mapEntry) if(!mapEntry)
return; return;
bool isNormalTargetMap = mapEntry->IsRaid() bool isRegularTargetMap = GetPlayer()->GetDifficulty(mapEntry->IsRaid()) == REGULAR_DIFFICULTY;
? (GetPlayer()->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
: (GetPlayer()->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
uint32 missingKey = 0; uint32 missingKey = 0;
if (!isNormalTargetMap) if (!isRegularTargetMap)
{ {
if(at->heroicKey) if(at->heroicKey)
{ {
@ -828,7 +826,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
} }
uint32 missingQuest = 0; uint32 missingQuest = 0;
if (!isNormalTargetMap) if (!isRegularTargetMap)
{ {
if (at->requiredQuestHeroic && !GetPlayer()->GetQuestRewardStatus(at->requiredQuestHeroic)) if (at->requiredQuestHeroic && !GetPlayer()->GetQuestRewardStatus(at->requiredQuestHeroic))
missingQuest = at->requiredQuestHeroic; missingQuest = at->requiredQuestHeroic;
@ -845,7 +843,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if(missingItem) if(missingItem)
SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, ObjectMgr::GetItemPrototype(missingItem)->Name1); SendAreaTriggerMessage(GetMangosString(LANG_LEVEL_MINREQUIRED_AND_ITEM), at->requiredLevel, ObjectMgr::GetItemPrototype(missingItem)->Name1);
else if(missingKey) 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) else if(missingQuest)
SendAreaTriggerMessage(at->requiredFailedText.c_str()); SendAreaTriggerMessage(at->requiredFailedText.c_str());
else if(missingLevel) else if(missingLevel)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8831" #define REVISION_NR "8832"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__