Changeset 44 for trunk/src/game/ObjectAccessor.h
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/ObjectAccessor.h
r2 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 #ifndef MANGOS_OBJECTACCESSOR_H20 #define MANGOS_OBJECTACCESSOR_H21 #ifndef TRINITY_OBJECTACCESSOR_H 22 #define TRINITY_OBJECTACCESSOR_H 21 23 22 24 #include "Platform/Define.h" … … 50 52 typedef HM_NAMESPACE::hash_map< uint64, T* > MapType; 51 53 typedef ZThread::FastMutex LockType; 52 typedef MaNGOS::GeneralLock<LockType > Guard;54 typedef Trinity::GeneralLock<LockType > Guard; 53 55 54 56 static void Insert(T* o) { m_objectMap[o->GetGUID()] = o; } … … 80 82 }; 81 83 82 class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor, MaNGOS::ClassLevelLockable<ObjectAccessor, ZThread::FastMutex> >84 class TRINITY_DLL_DECL ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassLevelLockable<ObjectAccessor, ZThread::FastMutex> > 83 85 { 84 86 85 friend class MaNGOS::OperatorNew<ObjectAccessor>;87 friend class Trinity::OperatorNew<ObjectAccessor>; 86 88 ObjectAccessor(); 87 89 ~ObjectAccessor(); … … 117 119 if(!obj || obj->GetMapId() != mapid) return NULL; 118 120 119 CellPair p = MaNGOS::ComputeCellPair(x,y);121 CellPair p = Trinity::ComputeCellPair(x,y); 120 122 if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP ) 121 123 { … … 124 126 } 125 127 126 CellPair q = MaNGOS::ComputeCellPair(obj->GetPositionX(),obj->GetPositionY());128 CellPair q = Trinity::ComputeCellPair(obj->GetPositionX(),obj->GetPositionY()); 127 129 if(q.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || q.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP ) 128 130 { … … 213 215 214 216 typedef ZThread::FastMutex LockType; 215 typedef MaNGOS::GeneralLock<LockType > Guard;217 typedef Trinity::GeneralLock<LockType > Guard; 216 218 217 219 static void _buildChangeObjectForPlayer(WorldObject *, UpdateDataMapType &);