Update grid system. Try to fix some crashes and transport passengers (now they are despawned after a while).

This commit is contained in:
megamage
2011-12-20 17:07:09 -05:00
parent e1afd79b1e
commit 8cf2062c1f
24 changed files with 117 additions and 87 deletions
+8 -2
View File
@@ -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;