mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11819] move SetActiveObjectState to WorldObject level
This commit is contained in:
parent
012be82c86
commit
df0715284f
7 changed files with 23 additions and 29 deletions
|
|
@ -1081,9 +1081,11 @@ bool Map::ActiveObjectsNearGrid(uint32 x, uint32 y) const
|
|||
void Map::AddToActive( WorldObject* obj )
|
||||
{
|
||||
m_activeNonPlayers.insert(obj);
|
||||
Cell cell = Cell(MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()));
|
||||
EnsureGridLoaded(cell);
|
||||
|
||||
// also not allow unloading spawn grid to prevent creating creature clone at load
|
||||
if (obj->GetTypeId()==TYPEID_UNIT)
|
||||
if (obj->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Creature* c= (Creature*)obj;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue