Fix TC build

This commit is contained in:
Rochet2
2017-08-02 21:15:51 +03:00
parent 8982acfc08
commit 86a0ae93f0

View File

@@ -1636,7 +1636,7 @@ namespace LuaGlobalFunctions
if (save) if (save)
{ {
Creature* creature = new Creature(); Creature* creature = new Creature();
if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, phase, entry, x, y, z, o)) if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, phase, entry, pos))
{ {
delete creature; delete creature;
Eluna::Push(L); Eluna::Push(L);
@@ -1652,7 +1652,7 @@ namespace LuaGlobalFunctions
creature->CleanupsBeforeDelete(); creature->CleanupsBeforeDelete();
delete creature; delete creature;
creature = new Creature(); creature = new Creature();
if (!creature->LoadCreatureFromDB(db_guid, map)) if (!creature->LoadFromDB(db_guid, map, true, true))
{ {
delete creature; delete creature;
Eluna::Push(L); Eluna::Push(L);
@@ -1723,14 +1723,14 @@ namespace LuaGlobalFunctions
object = new GameObject(); object = new GameObject();
// this will generate a new lowguid if the object is in an instance // this will generate a new lowguid if the object is in an instance
if (!object->LoadGameObjectFromDB(guidLow, map)) if (!object->LoadFromDB(guidLow, map, true))
{ {
delete object; delete object;
Eluna::Push(L); Eluna::Push(L);
return 1; return 1;
} }
eObjectMgr->AddGameobjectToGrid(guidLow, eObjectMgr->GetGOData(guidLow)); eObjectMgr->AddGameobjectToGrid(guidLow, eObjectMgr->GetGameObjectData(guidLow));
} }
else else
map->AddToMap(object); map->AddToMap(object);