root/trunk/src/game/ObjectAccessor.cpp @ 18

Revision 2, 20.8 kB (checked in by yumileroy, 17 years ago)

[svn] * Proper SVN structure

Original author: Neo2003
Date: 2008-10-02 16:23:55-05:00

Line 
1/*
2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18
19#include "ObjectAccessor.h"
20#include "ObjectMgr.h"
21#include "Policies/SingletonImp.h"
22#include "Player.h"
23#include "Creature.h"
24#include "GameObject.h"
25#include "DynamicObject.h"
26#include "Corpse.h"
27#include "WorldSession.h"
28#include "WorldPacket.h"
29#include "Item.h"
30#include "Corpse.h"
31#include "GridNotifiers.h"
32#include "MapManager.h"
33#include "Map.h"
34#include "CellImpl.h"
35#include "GridNotifiersImpl.h"
36#include "Opcodes.h"
37#include "ObjectDefines.h"
38#include "MapInstanced.h"
39
40#include <cmath>
41
42#define CLASS_LOCK MaNGOS::ClassLevelLockable<ObjectAccessor, ZThread::FastMutex>
43INSTANTIATE_SINGLETON_2(ObjectAccessor, CLASS_LOCK);
44INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ZThread::FastMutex);
45
46namespace MaNGOS
47{
48
49    struct MANGOS_DLL_DECL BuildUpdateForPlayer
50    {
51        Player &i_player;
52        UpdateDataMapType &i_updatePlayers;
53
54        BuildUpdateForPlayer(Player &player, UpdateDataMapType &data_map) : i_player(player), i_updatePlayers(data_map) {}
55
56        void Visit(PlayerMapType &m)
57        {
58            for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
59            {
60                if( iter->getSource() == &i_player )
61                    continue;
62
63                UpdateDataMapType::iterator iter2 = i_updatePlayers.find(iter->getSource());
64                if( iter2 == i_updatePlayers.end() )
65                {
66                    std::pair<UpdateDataMapType::iterator, bool> p = i_updatePlayers.insert( ObjectAccessor::UpdateDataValueType(iter->getSource(), UpdateData()) );
67                    assert(p.second);
68                    iter2 = p.first;
69                }
70
71                i_player.BuildValuesUpdateBlockForPlayer(&iter2->second, iter2->first);
72            }
73        }
74
75        template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
76    };
77}
78
79ObjectAccessor::ObjectAccessor() {}
80ObjectAccessor::~ObjectAccessor() {}
81
82Creature*
83ObjectAccessor::GetNPCIfCanInteractWith(Player const &player, uint64 guid, uint32 npcflagmask)
84{
85    // unit checks
86    if (!guid)
87        return NULL;
88
89    // exist
90    Creature *unit = GetCreature(player, guid);
91    if (!unit)
92        return NULL;
93
94    // player check
95    if(!player.CanInteractWithNPCs(!unit->isSpiritService()))
96        return NULL;
97
98    // appropriate npc type
99    if(npcflagmask && !unit->HasFlag( UNIT_NPC_FLAGS, npcflagmask ))
100        return NULL;
101
102    // alive or spirit healer
103    if(!unit->isAlive() && (!unit->isSpiritService() || player.isAlive() ))
104        return NULL;
105
106    // not allow interaction under control
107    if(unit->GetCharmerOrOwnerGUID())
108        return NULL;
109
110    // not enemy
111    if( unit->IsHostileTo(&player))
112        return NULL;
113
114    // not unfriendly
115    FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(unit->getFaction());
116    if(factionTemplate)
117    {
118        FactionEntry const* faction = sFactionStore.LookupEntry(factionTemplate->faction);
119        if( faction->reputationListID >= 0 && player.GetReputationRank(faction) <= REP_UNFRIENDLY)
120            return NULL;
121    }
122
123    // not too far
124    if(!unit->IsWithinDistInMap(&player,INTERACTION_DISTANCE))
125        return NULL;
126
127    return unit;
128}
129
130Creature*
131ObjectAccessor::GetCreatureOrPet(WorldObject const &u, uint64 guid)
132{
133    if(Creature *unit = GetPet(guid))
134        return unit;
135
136    return GetCreature(u, guid);
137}
138
139Creature*
140ObjectAccessor::GetCreature(WorldObject const &u, uint64 guid)
141{
142    Creature * ret = GetObjectInWorld(guid, (Creature*)NULL);
143    if(ret && ret->GetMapId() != u.GetMapId()) ret = NULL;
144    return ret;
145}
146
147Unit*
148ObjectAccessor::GetUnit(WorldObject const &u, uint64 guid)
149{
150    if(!guid)
151        return NULL;
152
153    if(IS_PLAYER_GUID(guid))
154        return FindPlayer(guid);
155
156    return GetCreatureOrPet(u, guid);
157}
158
159Corpse*
160ObjectAccessor::GetCorpse(WorldObject const &u, uint64 guid)
161{
162    Corpse * ret = GetObjectInWorld(guid, (Corpse*)NULL);
163    if(ret && ret->GetMapId() != u.GetMapId()) ret = NULL;
164    return ret;
165}
166
167Object* ObjectAccessor::GetObjectByTypeMask(Player const &p, uint64 guid, uint32 typemask)
168{
169    Object *obj = NULL;
170
171    if(typemask & TYPEMASK_PLAYER)
172    {
173        obj = FindPlayer(guid);
174        if(obj) return obj;
175    }
176
177    if(typemask & TYPEMASK_UNIT)
178    {
179        obj = GetCreatureOrPet(p,guid);
180        if(obj) return obj;
181    }
182
183    if(typemask & TYPEMASK_GAMEOBJECT)
184    {
185        obj = GetGameObject(p,guid);
186        if(obj) return obj;
187    }
188
189    if(typemask & TYPEMASK_DYNAMICOBJECT)
190    {
191        obj = GetDynamicObject(p,guid);
192        if(obj) return obj;
193    }
194
195    if(typemask & TYPEMASK_ITEM)
196    {
197        obj = p.GetItemByGuid( guid );
198        if(obj) return obj;
199    }
200
201    return NULL;
202}
203
204GameObject*
205ObjectAccessor::GetGameObject(WorldObject const &u, uint64 guid)
206{
207    GameObject * ret = GetObjectInWorld(guid, (GameObject*)NULL);
208    if(ret && ret->GetMapId() != u.GetMapId()) ret = NULL;
209    return ret;
210}
211
212DynamicObject*
213ObjectAccessor::GetDynamicObject(Unit const &u, uint64 guid)
214{
215    DynamicObject * ret = GetObjectInWorld(guid, (DynamicObject*)NULL);
216    if(ret && ret->GetMapId() != u.GetMapId()) ret = NULL;
217    return ret;
218}
219
220Player*
221ObjectAccessor::FindPlayer(uint64 guid)
222{
223    return GetObjectInWorld(guid, (Player*)NULL);
224}
225
226Player*
227ObjectAccessor::FindPlayerByName(const char *name)
228{
229    //TODO: Player Guard
230    HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
231    HashMapHolder<Player>::MapType::iterator iter = m.begin();
232    for(; iter != m.end(); ++iter)
233        if( ::strcmp(name, iter->second->GetName()) == 0 )
234            return iter->second;
235    return NULL;
236}
237
238void
239ObjectAccessor::SaveAllPlayers()
240{
241    Guard guard(*HashMapHolder<Player*>::GetLock());
242    HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
243    HashMapHolder<Player>::MapType::iterator itr = m.begin();
244    for(; itr != m.end(); ++itr)
245        itr->second->SaveToDB();
246}
247
248void
249ObjectAccessor::_update()
250{
251    UpdateDataMapType update_players;
252    {
253        Guard guard(i_updateGuard);
254        while(!i_objects.empty())
255        {
256            Object* obj = *i_objects.begin();
257            i_objects.erase(i_objects.begin());
258            if (!obj)
259                continue;
260            _buildUpdateObject(obj, update_players);
261            obj->ClearUpdateMask(false);
262        }
263    }
264
265    WorldPacket packet;                                     // here we allocate a std::vector with a size of 0x10000
266    for(UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
267    {
268        iter->second.BuildPacket(&packet);
269        iter->first->GetSession()->SendPacket(&packet);
270        packet.clear();                                     // clean the string
271    }
272}
273
274void
275ObjectAccessor::UpdateObject(Object* obj, Player* exceptPlayer)
276{
277    UpdateDataMapType update_players;
278    obj->BuildUpdate(update_players);
279
280    WorldPacket packet;
281    for(UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
282    {
283        if(iter->first == exceptPlayer)
284            continue;
285
286        iter->second.BuildPacket(&packet);
287        iter->first->GetSession()->SendPacket(&packet);
288        packet.clear();
289    }
290}
291
292void
293ObjectAccessor::AddUpdateObject(Object *obj)
294{
295    Guard guard(i_updateGuard);
296    i_objects.insert(obj);
297}
298
299void
300ObjectAccessor::RemoveUpdateObject(Object *obj)
301{
302    Guard guard(i_updateGuard);
303    std::set<Object *>::iterator iter = i_objects.find(obj);
304    if( iter != i_objects.end() )
305        i_objects.erase( iter );
306}
307
308void
309ObjectAccessor::_buildUpdateObject(Object *obj, UpdateDataMapType &update_players)
310{
311    bool build_for_all = true;
312    Player *pl = NULL;
313    if( obj->isType(TYPEMASK_ITEM) )
314    {
315        Item *item = static_cast<Item *>(obj);
316        pl = item->GetOwner();
317        build_for_all = false;
318    }
319
320    if( pl != NULL )
321        _buildPacket(pl, obj, update_players);
322
323    // Capt: okey for all those fools who think its a real fix
324    //       THIS IS A TEMP FIX
325    if( build_for_all )
326    {
327        WorldObject * temp = dynamic_cast<WorldObject*>(obj);
328
329        //assert(dynamic_cast<WorldObject*>(obj)!=NULL);
330        if (temp)
331            _buildChangeObjectForPlayer(temp, update_players);
332        else
333            sLog.outDebug("ObjectAccessor: Ln 405 Temp bug fix");
334    }
335}
336
337void
338ObjectAccessor::_buildPacket(Player *pl, Object *obj, UpdateDataMapType &update_players)
339{
340    UpdateDataMapType::iterator iter = update_players.find(pl);
341
342    if( iter == update_players.end() )
343    {
344        std::pair<UpdateDataMapType::iterator, bool> p = update_players.insert( UpdateDataValueType(pl, UpdateData()) );
345        assert(p.second);
346        iter = p.first;
347    }
348
349    obj->BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
350}
351
352void
353ObjectAccessor::_buildChangeObjectForPlayer(WorldObject *obj, UpdateDataMapType &update_players)
354{
355    CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
356    Cell cell(p);
357    cell.data.Part.reserved = ALL_DISTRICT;
358    cell.SetNoCreate();
359    WorldObjectChangeAccumulator notifier(*obj, update_players);
360    TypeContainerVisitor<WorldObjectChangeAccumulator, WorldTypeMapContainer > player_notifier(notifier);
361    CellLock<GridReadGuard> cell_lock(cell, p);
362    cell_lock->Visit(cell_lock, player_notifier, *MapManager::Instance().GetMap(obj->GetMapId(), obj));
363}
364
365Pet*
366ObjectAccessor::GetPet(uint64 guid)
367{
368    return GetObjectInWorld(guid, (Pet*)NULL);
369}
370
371Corpse*
372ObjectAccessor::GetCorpseForPlayerGUID(uint64 guid)
373{
374    Guard guard(i_corpseGuard);
375
376    Player2CorpsesMapType::iterator iter = i_player2corpse.find(guid);
377    if( iter == i_player2corpse.end() ) return NULL;
378
379    assert(iter->second->GetType() != CORPSE_BONES);
380
381    return iter->second;
382}
383
384void
385ObjectAccessor::RemoveCorpse(Corpse *corpse)
386{
387    assert(corpse && corpse->GetType() != CORPSE_BONES);
388
389    Guard guard(i_corpseGuard);
390    Player2CorpsesMapType::iterator iter = i_player2corpse.find(corpse->GetOwnerGUID());
391    if( iter == i_player2corpse.end() )
392        return;
393
394    // build mapid*cellid -> guid_set map
395    CellPair cell_pair = MaNGOS::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
396    uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
397
398    objmgr.DeleteCorpseCellData(corpse->GetMapId(),cell_id,corpse->GetOwnerGUID());
399    corpse->RemoveFromWorld();
400
401    i_player2corpse.erase(iter);
402}
403
404void
405ObjectAccessor::AddCorpse(Corpse *corpse)
406{
407    assert(corpse && corpse->GetType() != CORPSE_BONES);
408
409    Guard guard(i_corpseGuard);
410    assert(i_player2corpse.find(corpse->GetOwnerGUID()) == i_player2corpse.end());
411    i_player2corpse[corpse->GetOwnerGUID()] = corpse;
412
413    // build mapid*cellid -> guid_set map
414    CellPair cell_pair = MaNGOS::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
415    uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
416
417    objmgr.AddCorpseCellData(corpse->GetMapId(),cell_id,corpse->GetOwnerGUID(),corpse->GetInstanceId());
418}
419
420void
421ObjectAccessor::AddCorpsesToGrid(GridPair const& gridpair,GridType& grid,Map* map)
422{
423    Guard guard(i_corpseGuard);
424    for(Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
425        if(iter->second->GetGrid()==gridpair)
426    {
427        // verify, if the corpse in our instance (add only corpses which are)
428        if (map->Instanceable())
429        {
430            if (iter->second->GetInstanceId() == map->GetInstanceId())
431            {
432                grid.AddWorldObject(iter->second,iter->second->GetGUID());
433            }
434        }
435        else
436        {
437            grid.AddWorldObject(iter->second,iter->second->GetGUID());
438        }
439    }
440}
441
442Corpse*
443ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid)
444{
445    Corpse *corpse = GetCorpseForPlayerGUID(player_guid);
446    if(!corpse)
447    {
448        //in fact this function is called from several places
449        //even when player doesn't have a corpse, not an error
450        //sLog.outError("ERROR: Try remove corpse that not in map for GUID %ul", player_guid);
451        return NULL;
452    }
453
454    DEBUG_LOG("Deleting Corpse and spawning bones.\n");
455
456    // remove corpse from player_guid -> corpse map
457    RemoveCorpse(corpse);
458
459    // remove resurrectble corpse from grid object registry (loaded state checked into call)
460    // do not load the map if it's not loaded
461    Map *map = MapManager::Instance().FindMap(corpse->GetMapId(), corpse->GetInstanceId());
462    if(map) map->Remove(corpse,false);
463
464    // remove corpse from DB
465    corpse->DeleteFromDB();
466
467    Corpse *bones = NULL;
468    // create the bones only if the map and the grid is loaded at the corpse's location
469    if(map && !map->IsRemovalGrid(corpse->GetPositionX(), corpse->GetPositionY()))
470    {
471        // Create bones, don't change Corpse
472        bones = new Corpse;
473        bones->Create(corpse->GetGUIDLow());
474
475        for (int i = 3; i < CORPSE_END; i++)                    // don't overwrite guid and object type
476            bones->SetUInt32Value(i, corpse->GetUInt32Value(i));
477
478        bones->SetGrid(corpse->GetGrid());
479        // bones->m_time = m_time;                              // don't overwrite time
480        // bones->m_inWorld = m_inWorld;                        // don't overwrite world state
481        // bones->m_type = m_type;                              // don't overwrite type
482        bones->Relocate(corpse->GetPositionX(), corpse->GetPositionY(), corpse->GetPositionZ(), corpse->GetOrientation());
483        bones->SetMapId(corpse->GetMapId());
484        bones->SetInstanceId(corpse->GetInstanceId());
485
486        bones->SetUInt32Value(CORPSE_FIELD_FLAGS, CORPSE_FLAG_UNK2 | CORPSE_FLAG_BONES);
487        bones->SetUInt64Value(CORPSE_FIELD_OWNER, 0);
488
489        for (int i = 0; i < EQUIPMENT_SLOT_END; i++)
490        {
491            if(corpse->GetUInt32Value(CORPSE_FIELD_ITEM + i))
492                bones->SetUInt32Value(CORPSE_FIELD_ITEM + i, 0);
493        }
494
495        // add bones in grid store if grid loaded where corpse placed
496        map->Add(bones);
497    }
498
499    // all references to the corpse should be removed at this point
500    delete corpse;
501
502    return bones;
503}
504
505void
506ObjectAccessor::Update(uint32 diff)
507{
508    {
509        typedef std::multimap<uint32, Player *> CreatureLocationHolderType;
510        CreatureLocationHolderType creature_locations;
511        //TODO: Player guard
512        HashMapHolder<Player>::MapType& playerMap = HashMapHolder<Player>::GetContainer();
513        for(HashMapHolder<Player>::MapType::iterator iter = playerMap.begin(); iter != playerMap.end(); ++iter)
514        {
515            if(iter->second->IsInWorld())
516            {
517                iter->second->Update(diff);
518                creature_locations.insert( CreatureLocationHolderType::value_type(iter->second->GetMapId(), iter->second) );
519            }
520        }
521
522        Map *map;
523
524        MaNGOS::ObjectUpdater updater(diff);
525        // for creature
526        TypeContainerVisitor<MaNGOS::ObjectUpdater, GridTypeMapContainer  > grid_object_update(updater);
527        // for pets
528        TypeContainerVisitor<MaNGOS::ObjectUpdater, WorldTypeMapContainer > world_object_update(updater);
529
530        for(CreatureLocationHolderType::iterator iter=creature_locations.begin(); iter != creature_locations.end(); ++iter)
531        {
532            MapManager::Instance().GetMap((*iter).first, (*iter).second)->resetMarkedCells();
533        }
534
535        for(CreatureLocationHolderType::iterator iter=creature_locations.begin(); iter != creature_locations.end(); ++iter)
536        {
537            Player *player = (*iter).second;
538            map = MapManager::Instance().GetMap((*iter).first, player);
539
540            CellPair standing_cell(MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY()));
541
542            // Check for correctness of standing_cell, it also avoids problems with update_cell
543            if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
544                continue;
545
546            // the overloaded operators handle range checking
547            // so ther's no need for range checking inside the loop
548            CellPair begin_cell(standing_cell), end_cell(standing_cell);
549            begin_cell << 1; begin_cell -= 1;               // upper left
550            end_cell >> 1; end_cell += 1;                   // lower right
551
552            for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
553            {
554                for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
555                {
556                    uint32 cell_id = (y * TOTAL_NUMBER_OF_CELLS_PER_MAP) + x;
557                    if( !map->isCellMarked(cell_id) )
558                    {
559                        CellPair cell_pair(x,y);
560                        map->markCell(cell_id);
561                        Cell cell(cell_pair);
562                        cell.data.Part.reserved = CENTER_DISTRICT;
563                        cell.SetNoCreate();
564                        CellLock<NullGuard> cell_lock(cell, cell_pair);
565                        cell_lock->Visit(cell_lock, grid_object_update,  *map);
566                        cell_lock->Visit(cell_lock, world_object_update, *map);
567                    }
568                }
569            }
570        }
571    }
572
573    _update();
574}
575
576bool
577ObjectAccessor::PlayersNearGrid(uint32 x, uint32 y, uint32 m_id, uint32 i_id) const
578{
579    CellPair cell_min(x*MAX_NUMBER_OF_CELLS, y*MAX_NUMBER_OF_CELLS);
580    CellPair cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
581    cell_min << 2;
582    cell_min -= 2;
583    cell_max >> 2;
584    cell_max += 2;
585
586    //TODO: Guard player
587    HashMapHolder<Player>::MapType& playerMap = HashMapHolder<Player>::GetContainer();
588    for(HashMapHolder<Player>::MapType::const_iterator iter=playerMap.begin(); iter != playerMap.end(); ++iter)
589    {
590        if( m_id != iter->second->GetMapId() || i_id != iter->second->GetInstanceId() )
591            continue;
592
593        CellPair p = MaNGOS::ComputeCellPair(iter->second->GetPositionX(), iter->second->GetPositionY());
594        if( (cell_min.x_coord <= p.x_coord && p.x_coord <= cell_max.x_coord) &&
595            (cell_min.y_coord <= p.y_coord && p.y_coord <= cell_max.y_coord) )
596            return true;
597    }
598
599    return false;
600}
601
602void
603ObjectAccessor::WorldObjectChangeAccumulator::Visit(PlayerMapType &m)
604{
605    for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
606        if(iter->getSource()->HaveAtClient(&i_object))
607            ObjectAccessor::_buildPacket(iter->getSource(), &i_object, i_updateDatas);
608}
609
610void
611ObjectAccessor::UpdateObjectVisibility(WorldObject *obj)
612{
613    CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
614    Cell cell(p);
615
616    MapManager::Instance().GetMap(obj->GetMapId(), obj)->UpdateObjectVisibility(obj,cell,p);
617}
618
619void ObjectAccessor::UpdateVisibilityForPlayer( Player* player )
620{
621    CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
622    Cell cell(p);
623    Map* m = MapManager::Instance().GetMap(player->GetMapId(),player);
624
625    m->UpdatePlayerVisibility(player,cell,p);
626    m->UpdateObjectsVisibilityFor(player,cell,p);
627}
628
629/// Define the static member of HashMapHolder
630
631template <class T> HM_NAMESPACE::hash_map< uint64, T* > HashMapHolder<T>::m_objectMap;
632template <class T> ZThread::FastMutex HashMapHolder<T>::i_lock;
633
634/// Global defintions for the hashmap storage
635
636template class HashMapHolder<Player>;
637template class HashMapHolder<Pet>;
638template class HashMapHolder<GameObject>;
639template class HashMapHolder<DynamicObject>;
640template class HashMapHolder<Creature>;
641template class HashMapHolder<Corpse>;
642
643template Player* ObjectAccessor::GetObjectInWorld<Player>(uint32 mapid, float x, float y, uint64 guid, Player* /*fake*/);
644template Pet* ObjectAccessor::GetObjectInWorld<Pet>(uint32 mapid, float x, float y, uint64 guid, Pet* /*fake*/);
645template Creature* ObjectAccessor::GetObjectInWorld<Creature>(uint32 mapid, float x, float y, uint64 guid, Creature* /*fake*/);
646template Corpse* ObjectAccessor::GetObjectInWorld<Corpse>(uint32 mapid, float x, float y, uint64 guid, Corpse* /*fake*/);
647template GameObject* ObjectAccessor::GetObjectInWorld<GameObject>(uint32 mapid, float x, float y, uint64 guid, GameObject* /*fake*/);
648template DynamicObject* ObjectAccessor::GetObjectInWorld<DynamicObject>(uint32 mapid, float x, float y, uint64 guid, DynamicObject* /*fake*/);
Note: See TracBrowser for help on using the browser.