mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
f5e40a5fda
commit
f67d89f109
43 changed files with 1254 additions and 1128 deletions
|
|
@ -568,7 +568,10 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
|||
sObjectMgr.AddCreatureToGrid(*itr, data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
|
||||
Map* map = const_cast<Map*>(sMapMgr.FindMap(data->mapid));
|
||||
if(!map)
|
||||
return;
|
||||
|
||||
// We use spawn coords to spawn
|
||||
if(!map->Instanceable() && map->IsLoaded(data->posX,data->posY))
|
||||
{
|
||||
|
|
@ -614,7 +617,10 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
|||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
// this base map checked as non-instanced and then only existing
|
||||
Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
|
||||
Map* map = const_cast<Map*>(sMapMgr.FindMap(data->mapid));
|
||||
if(!map)
|
||||
return;
|
||||
|
||||
// We use current coords to unspawn, not spawn coords since creature can have changed grid
|
||||
if(!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue