diff options
author | Spp <none@none> | 2010-09-13 09:16:57 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-09-13 09:16:57 +0200 |
commit | 6e55c22a122ad69db3819d9a23b705dae1a04d49 (patch) | |
tree | 2831254d14c8f441340d1a068127468791f9f560 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 62d0d8921d9678f41f9a54880b824d9b1d7bc86f (diff) |
Core: Add function to find players by low guid
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 0128c110278..7346521d666 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -312,7 +312,7 @@ Group * ObjectMgr::GetGroupByGUID(uint32 guid) const return NULL; } -Guild * ObjectMgr::GetGuildById(uint32 GuildId) const +Guild* ObjectMgr::GetGuildById(uint32 GuildId) const { GuildMap::const_iterator itr = mGuildMap.find(GuildId); if (itr != mGuildMap.end()) @@ -321,7 +321,7 @@ Guild * ObjectMgr::GetGuildById(uint32 GuildId) const return NULL; } -Guild * ObjectMgr::GetGuildByName(const std::string& guildname) const +Guild* ObjectMgr::GetGuildByName(const std::string& guildname) const { std::string search = guildname; std::transform(search.begin(), search.end(), search.begin(), ::toupper); @@ -1840,6 +1840,12 @@ void ObjectMgr::LoadGameobjectRespawnTimes() sLog.outString(); } +Player* ObjectMgr::GetPlayerByLowGUID(uint32 lowguid) const +{ + uint64 guid = MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER); + return ObjectAccessor::FindPlayer(guid); +} + // name must be checked to correctness (if received) before call this function uint64 ObjectMgr::GetPlayerGUIDByName(std::string name) const { |