diff options
Diffstat (limited to 'src/game/ObjectMgr.h')
-rw-r--r-- | src/game/ObjectMgr.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 7dc6c1f8a9f..7750cf7095a 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -335,13 +335,13 @@ class ObjectMgr Guild* GetGuildByLeader(uint64 const&guid) const; Guild* GetGuildById(const uint32 GuildId) const; - Guild* GetGuildByName(std::string guildname) const; + Guild* GetGuildByName(const std::string& guildname) const; std::string GetGuildNameById(const uint32 GuildId) const; void AddGuild(Guild* guild) { mGuildSet.insert( guild ); } void RemoveGuild(Guild* guild) { mGuildSet.erase( guild ); } ArenaTeam* GetArenaTeamById(const uint32 ArenaTeamId) const; - ArenaTeam* GetArenaTeamByName(std::string ArenaTeamName) const; + ArenaTeam* GetArenaTeamByName(const std::string& ArenaTeamName) const; ArenaTeam* GetArenaTeamByCapitan(uint64 const& guid) const; void AddArenaTeam(ArenaTeam* arenateam) { mArenaTeamSet.insert( arenateam ); } void RemoveArenaTeam(ArenaTeam* arenateam) { mArenaTeamSet.erase( arenateam ); } @@ -429,7 +429,7 @@ class ObjectMgr bool GetPlayerNameByGUID(const uint64 &guid, std::string &name) const; uint32 GetPlayerTeamByGUID(const uint64 &guid) const; uint32 GetPlayerAccountIdByGUID(const uint64 &guid) const; - uint32 GetPlayerAccountIdByPlayerName(std::string name) const; + uint32 GetPlayerAccountIdByPlayerName(const std::string& name) const; uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid ); void GetTaxiPath( uint32 source, uint32 destination, uint32 &path, uint32 &cost); @@ -728,15 +728,15 @@ class ObjectMgr // reserved names void LoadReservedPlayersNames(); - bool IsReservedName(std::string name) const + bool IsReservedName(const std::string& name) const { return m_ReservedNames.find(name) != m_ReservedNames.end(); } // name with valid structure and symbols - static bool IsValidName( std::string name, bool create = false ); - static bool IsValidCharterName( std::string name ); - static bool IsValidPetName( std::string name ); + static bool IsValidName( const std::string& name, bool create = false ); + static bool IsValidCharterName( const std::string& name ); + static bool IsValidPetName( const std::string& name ); static bool CheckDeclinedNames(std::wstring mainpart, DeclinedName const& names); @@ -764,10 +764,10 @@ class ObjectMgr if(itr==m_GameTeleMap.end()) return NULL; return &itr->second; } - GameTele const* GetGameTele(std::string name) const; + GameTele const* GetGameTele(const std::string& name) const; GameTeleMap const& GetGameTeleMap() const { return m_GameTeleMap; } bool AddGameTele(GameTele& data); - bool DeleteGameTele(std::string name); + bool DeleteGameTele(const std::string& name); CacheNpcOptionList const& GetNpcOptions() const { return m_mCacheNpcOptionList; } @@ -878,6 +878,7 @@ class ObjectMgr int GetOrNewIndexForLocale(LocaleConstant loc); int DBCLocaleIndex; + private: void LoadScripts(ScriptMapMap& scripts, char const* tablename); void CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids); |