* Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -154,9 +154,30 @@ class TRINITY_DLL_DECL ObjectAccessor : public Trinity::Singleton<ObjectAccessor
|
||||
|
||||
Player* FindPlayerByName(const char *name) ;
|
||||
|
||||
HashMapHolder<Player>::MapType& GetPlayers()
|
||||
{
|
||||
return HashMapHolder<Player>::GetContainer();
|
||||
HashMapHolder<Player>::MapType& GetPlayers()
|
||||
{
|
||||
return HashMapHolder<Player>::GetContainer();
|
||||
}
|
||||
|
||||
HashMapHolder<Creature>::MapType& GetCreatures()
|
||||
{
|
||||
return HashMapHolder<Creature>::GetContainer();
|
||||
}
|
||||
|
||||
HashMapHolder<Unit>::MapType& GetUnits()
|
||||
{
|
||||
return HashMapHolder<Unit>::GetContainer();
|
||||
}
|
||||
|
||||
HashMapHolder<GameObject>::MapType& GetGameObjects()
|
||||
{
|
||||
return HashMapHolder<GameObject>::GetContainer();
|
||||
}
|
||||
|
||||
// note: possibly very heavy
|
||||
HashMapHolder<WorldObject>::MapType& GetWorldObjects()
|
||||
{
|
||||
return HashMapHolder<WorldObject>::GetContainer();
|
||||
}
|
||||
|
||||
template<class T> void AddObject(T *object)
|
||||
|
||||
@@ -4834,7 +4834,10 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float
|
||||
// then check faction
|
||||
GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
|
||||
GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
|
||||
if(graveLow==graveUp)
|
||||
MapEntry const* map = sMapStore.LookupEntry(MapId);
|
||||
// not need to check validity of map object; MapId _MUST_ be valid here
|
||||
|
||||
if(graveLow==graveUp && !map->IsBattleArena())
|
||||
{
|
||||
sLog.outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.",zoneId,team);
|
||||
return NULL;
|
||||
|
||||
@@ -228,6 +228,12 @@ class ByteBuffer
|
||||
_rpos += sizeof(T);
|
||||
return r;
|
||||
};
|
||||
template<> std::string read<std::string>()
|
||||
{
|
||||
std::string tmp;
|
||||
*this >> tmp;
|
||||
return tmp;
|
||||
}
|
||||
template <typename T> T read(size_t pos) const
|
||||
{
|
||||
ASSERT(pos + sizeof(T) <= size() || PrintPosError(false,pos,sizeof(T)));
|
||||
|
||||
Reference in New Issue
Block a user