Update grid system. Try to fix some crashes and transport passengers (now they are despawned after a while).
This commit is contained in:
@@ -6721,9 +6721,15 @@ void ObjectMgr::LoadCorpses()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
uint32 guid = fields[16].GetUInt32();
|
||||
CorpseType type = CorpseType(fields[13].GetUInt8());
|
||||
if (type >= MAX_CORPSE_TYPE)
|
||||
{
|
||||
sLog->outError("Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type);
|
||||
continue;
|
||||
}
|
||||
|
||||
Corpse* corpse = new Corpse();
|
||||
if (!corpse->LoadFromDB(guid, fields))
|
||||
Corpse* corpse = new Corpse(type);
|
||||
if (!corpse->LoadCorpseFromDB(guid, fields))
|
||||
{
|
||||
delete corpse;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user