*Improvements in map managing.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-01 00:20:32 +02:00
parent 0db1fd6c26
commit 1d96091d2a
24 changed files with 276 additions and 305 deletions

View File

@@ -268,7 +268,7 @@ ObjectAccessor::RemoveCorpse(Corpse *corpse)
}
void
ObjectAccessor::AddCorpse(Corpse *corpse)
ObjectAccessor::AddCorpse(Corpse *corpse, uint32 mapId, uint32 instanceId)
{
assert(corpse && corpse->GetType() != CORPSE_BONES);
@@ -280,7 +280,7 @@ ObjectAccessor::AddCorpse(Corpse *corpse)
CellPair cell_pair = Trinity::ComputeCellPair(corpse->GetPositionX(), corpse->GetPositionY());
uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
objmgr.AddCorpseCellData(corpse->GetMapId(), cell_id, corpse->GetOwnerGUID(), corpse->GetInstanceId());
objmgr.AddCorpseCellData(mapId, cell_id, corpse->GetOwnerGUID(), instanceId);
}
void