diff options
Diffstat (limited to 'src/game/ObjectMgr.h')
-rw-r--r-- | src/game/ObjectMgr.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 783a859418f..272c7a1753d 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -479,17 +479,17 @@ class ObjectMgr PlayerClassInfo const* GetPlayerClassInfo(uint32 class_) const { - if(class_ >= MAX_CLASSES) return NULL; + if (class_ >= MAX_CLASSES) return NULL; return &playerClassInfo[class_]; } void GetPlayerClassLevelInfo(uint32 class_,uint8 level, PlayerClassLevelInfo* info) const; PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const { - if(race >= MAX_RACES) return NULL; - if(class_ >= MAX_CLASSES) return NULL; + if (race >= MAX_RACES) return NULL; + if (class_ >= MAX_CLASSES) return NULL; PlayerInfo const* info = &playerInfo[race][class_]; - if(info->displayId_m==0 || info->displayId_f==0) return NULL; + if (info->displayId_m==0 || info->displayId_f==0) return NULL; return info; } void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const; @@ -516,7 +516,7 @@ class ObjectMgr uint32 GetQuestForAreaTrigger(uint32 Trigger_ID) const { QuestAreaTriggerMap::const_iterator itr = mQuestAreaTriggerMap.find(Trigger_ID); - if(itr != mQuestAreaTriggerMap.end()) + if (itr != mQuestAreaTriggerMap.end()) return itr->second; return 0; } @@ -541,7 +541,7 @@ class ObjectMgr AreaTrigger const* GetAreaTrigger(uint32 trigger) const { AreaTriggerMap::const_iterator itr = mAreaTriggers.find( trigger ); - if( itr != mAreaTriggers.end( ) ) + if ( itr != mAreaTriggers.end( ) ) return &itr->second; return NULL; } @@ -549,7 +549,7 @@ class ObjectMgr AccessRequirement const* GetAccessRequirement(uint32 requirement) const { AccessRequirementMap::const_iterator itr = mAccessRequirements.find( requirement ); - if( itr != mAccessRequirements.end( ) ) + if ( itr != mAccessRequirements.end( ) ) return &itr->second; return NULL; } @@ -562,7 +562,7 @@ class ObjectMgr ReputationOnKillEntry const* GetReputationOnKilEntry(uint32 id) const { RepOnKillMap::const_iterator itr = mRepOnKill.find(id); - if(itr != mRepOnKill.end()) + if (itr != mRepOnKill.end()) return &itr->second; return NULL; } @@ -570,7 +570,7 @@ class ObjectMgr PointOfInterest const* GetPointOfInterest(uint32 id) const { PointOfInterestMap::const_iterator itr = mPointsOfInterest.find(id); - if(itr != mPointsOfInterest.end()) + if (itr != mPointsOfInterest.end()) return &itr->second; return NULL; } @@ -578,7 +578,7 @@ class ObjectMgr QuestPOIVector const* GetQuestPOIVector(uint32 questId) { QuestPOIMap::const_iterator itr = mQuestPOIMap.find(questId); - if(itr != mQuestPOIMap.end()) + if (itr != mQuestPOIMap.end()) return &itr->second; return NULL; } @@ -749,7 +749,7 @@ class ObjectMgr WeatherZoneChances const* GetWeatherChances(uint32 zone_id) const { WeatherZoneMap::const_iterator itr = mWeatherZoneMap.find(zone_id); - if(itr != mWeatherZoneMap.end()) + if (itr != mWeatherZoneMap.end()) return &itr->second; else return NULL; @@ -763,7 +763,7 @@ class ObjectMgr CreatureData const* GetCreatureData(uint32 guid) const { CreatureDataMap::const_iterator itr = mCreatureDataMap.find(guid); - if(itr==mCreatureDataMap.end()) return NULL; + if (itr==mCreatureDataMap.end()) return NULL; return &itr->second; } CreatureData& NewOrExistCreatureData(uint32 guid) { return mCreatureDataMap[guid]; } @@ -771,55 +771,55 @@ class ObjectMgr uint32 GetLinkedRespawnGuid(uint32 guid) const { CreatureLinkedRespawnMap::const_iterator itr = mCreatureLinkedRespawnMap.find(guid); - if(itr == mCreatureLinkedRespawnMap.end()) return 0; + if (itr == mCreatureLinkedRespawnMap.end()) return 0; return itr->second; } CreatureLocale const* GetCreatureLocale(uint32 entry) const { CreatureLocaleMap::const_iterator itr = mCreatureLocaleMap.find(entry); - if(itr==mCreatureLocaleMap.end()) return NULL; + if (itr==mCreatureLocaleMap.end()) return NULL; return &itr->second; } GameObjectLocale const* GetGameObjectLocale(uint32 entry) const { GameObjectLocaleMap::const_iterator itr = mGameObjectLocaleMap.find(entry); - if(itr==mGameObjectLocaleMap.end()) return NULL; + if (itr==mGameObjectLocaleMap.end()) return NULL; return &itr->second; } ItemLocale const* GetItemLocale(uint32 entry) const { ItemLocaleMap::const_iterator itr = mItemLocaleMap.find(entry); - if(itr==mItemLocaleMap.end()) return NULL; + if (itr==mItemLocaleMap.end()) return NULL; return &itr->second; } QuestLocale const* GetQuestLocale(uint32 entry) const { QuestLocaleMap::const_iterator itr = mQuestLocaleMap.find(entry); - if(itr==mQuestLocaleMap.end()) return NULL; + if (itr==mQuestLocaleMap.end()) return NULL; return &itr->second; } NpcTextLocale const* GetNpcTextLocale(uint32 entry) const { NpcTextLocaleMap::const_iterator itr = mNpcTextLocaleMap.find(entry); - if(itr==mNpcTextLocaleMap.end()) return NULL; + if (itr==mNpcTextLocaleMap.end()) return NULL; return &itr->second; } PageTextLocale const* GetPageTextLocale(uint32 entry) const { PageTextLocaleMap::const_iterator itr = mPageTextLocaleMap.find(entry); - if(itr==mPageTextLocaleMap.end()) return NULL; + if (itr==mPageTextLocaleMap.end()) return NULL; return &itr->second; } GossipMenuItemsLocale const* GetGossipMenuItemsLocale(uint32 entry) const { GossipMenuItemsLocaleMap::const_iterator itr = mGossipMenuItemsLocaleMap.find(entry); - if(itr==mGossipMenuItemsLocaleMap.end()) return NULL; + if (itr==mGossipMenuItemsLocaleMap.end()) return NULL; return &itr->second; } PointOfInterestLocale const* GetPointOfInterestLocale(uint32 poi_id) const { PointOfInterestLocaleMap::const_iterator itr = mPointOfInterestLocaleMap.find(poi_id); - if(itr==mPointOfInterestLocaleMap.end()) return NULL; + if (itr==mPointOfInterestLocaleMap.end()) return NULL; return &itr->second; } @@ -835,7 +835,7 @@ class ObjectMgr GameObjectData const* GetGOData(uint32 guid) const { GameObjectDataMap::const_iterator itr = mGameObjectDataMap.find(guid); - if(itr==mGameObjectDataMap.end()) return NULL; + if (itr==mGameObjectDataMap.end()) return NULL; return &itr->second; } GameObjectData& NewGOData(uint32 guid) { return mGameObjectDataMap[guid]; } @@ -844,7 +844,7 @@ class ObjectMgr TrinityStringLocale const* GetTrinityStringLocale(int32 entry) const { TrinityStringLocaleMap::const_iterator itr = mTrinityStringLocaleMap.find(entry); - if(itr==mTrinityStringLocaleMap.end()) return NULL; + if (itr==mTrinityStringLocaleMap.end()) return NULL; return &itr->second; } const char *GetTrinityString(int32 entry, int locale_idx) const; @@ -892,7 +892,7 @@ class ObjectMgr uint16 GetConditionId(ConditionType condition, uint32 value1, uint32 value2); bool IsPlayerMeetToCondition(Player const* player, uint16 condition_id) const { - if(condition_id >= mConditions.size()) + if (condition_id >= mConditions.size()) return false; return mConditions[condition_id].Meets(player); @@ -901,7 +901,7 @@ class ObjectMgr GameTele const* GetGameTele(uint32 id) const { GameTeleMap::const_iterator itr = m_GameTeleMap.find(id); - if(itr==m_GameTeleMap.end()) return NULL; + if (itr==m_GameTeleMap.end()) return NULL; return &itr->second; } GameTele const* GetGameTele(const std::string& name) const; @@ -912,7 +912,7 @@ class ObjectMgr uint32 GetNpcGossip(uint32 entry) const { CacheNpcTextIdMap::const_iterator iter = m_mCacheNpcTextIdMap.find(entry); - if(iter == m_mCacheNpcTextIdMap.end()) + if (iter == m_mCacheNpcTextIdMap.end()) return 0; return iter->second; @@ -921,7 +921,7 @@ class ObjectMgr TrainerSpellData const* GetNpcTrainerSpells(uint32 entry) const { CacheTrainerSpellMap::const_iterator iter = m_mCacheTrainerSpellMap.find(entry); - if(iter == m_mCacheTrainerSpellMap.end()) + if (iter == m_mCacheTrainerSpellMap.end()) return NULL; return &iter->second; @@ -930,7 +930,7 @@ class ObjectMgr VendorItemData const* GetNpcVendorItemList(uint32 entry) const { CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry); - if(iter == m_mCacheVendorItemMap.end()) + if (iter == m_mCacheVendorItemMap.end()) return NULL; return &iter->second; @@ -959,7 +959,7 @@ class ObjectMgr GM_Ticket *GetGMTicket(uint64 ticketGuid) { for (GmTicketList::const_iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i) - if((*i) && (*i)->guid == ticketGuid) + if ((*i) && (*i)->guid == ticketGuid) return (*i); return NULL; @@ -967,7 +967,7 @@ class ObjectMgr GM_Ticket *GetGMTicketByPlayer(uint64 playerGuid) { for (GmTicketList::const_iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i) - if((*i) && (*i)->playerGuid == playerGuid && (*i)->closed == 0) + if ((*i) && (*i)->playerGuid == playerGuid && (*i)->closed == 0) return (*i); return NULL; |