diff options
| author | joschiwald <joschiwald.trinity@gmail.com> | 2015-10-04 14:53:05 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2015-10-31 19:11:41 +0100 |
| commit | df88c7f2789e5e07cc4ec9ea400dacfea518a102 (patch) | |
| tree | 0bc410da791ff32811db87ce5352b31b62ebfdfb /src/server/game | |
| parent | f7e6f7a1054a1fbd44491dd347d46d7389d8b704 (diff) | |
Core/Misc: removed some useless map checks
(cherry picked from commit cf1e80e3d09067ca4d0078a8113a09227a9f91ae)
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/Chat/Chat.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Miscellaneous/Formulas.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 259e51eb471..161aefdfc67 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -308,7 +308,7 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c fullcmd.c_str(), player->GetName().c_str(), player->GetGUID().ToString().c_str(), m_session->GetAccountId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), - player->GetMap() ? player->GetMap()->GetMapName() : "Unknown", + player->FindMap() ? player->FindMap()->GetMapName() : "Unknown", areaId, areaName.c_str(), zoneName.c_str(), (player->GetSelectedUnit()) ? player->GetSelectedUnit()->GetName().c_str() : "", guid.ToString().c_str()); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index f7260326857..b19b0068be6 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -231,7 +231,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) case CONDITION_INSTANCE_INFO: { Map* map = object->GetMap(); - if (map && map->IsDungeon()) + if (map->IsDungeon()) { if (InstanceScript const* instance = ((InstanceMap*)map)->GetInstanceScript()) { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 232f7cb58df..e9f9fdace3b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -6920,7 +6920,7 @@ void Player::RewardReputation(Unit* victim, float rate) { // support for: Championing - http://www.wowwiki.com/Championing Map const* map = GetMap(); - if (map && map->IsNonRaidDungeon()) + if (map->IsNonRaidDungeon()) if (LFGDungeonEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficulty())) if (dungeon->reclevel == 80) ChampioningFaction = GetChampioningFaction(); @@ -20264,7 +20264,7 @@ void Player::ResetInstances(uint8 method, bool isRaid) // if the map is loaded, reset it Map* map = sMapMgr->FindMap(p->GetMapId(), p->GetInstanceId()); if (map && map->IsDungeon()) - if (!((InstanceMap*)map)->Reset(method)) + if (!map->ToInstanceMap()->Reset(method)) { ++itr; continue; diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index aa9a738b5dc..6edc3d74a5d 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -175,7 +175,7 @@ namespace Trinity if (creature->isElite()) { // Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus. - if (u->GetMap() && u->GetMap()->IsDungeon()) + if (u->GetMap()->IsDungeon()) xpMod *= 2.75f; else xpMod *= 2.0f; |
