aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-10-30 20:02:42 +0100
committerShauren <shauren.trinity@gmail.com>2014-10-30 20:02:42 +0100
commit785f0bf5c0dc945af9da494559955ac69e5a7198 (patch)
tree976fe868323bf4a5a0378ec8f6fe671836a4f42a /src/server/game/Globals/ObjectMgr.cpp
parent6881fd6146285258e5f8476e9cbc8f124d61b15e (diff)
Core/GameObjects: Updated GameObjectTemplate data structure
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index a33a3cd436f..8d723599214 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -6506,7 +6506,7 @@ inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32
return;
TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but lock (Id: %u) not found.",
- goInfo->entry, goInfo->type, N, goInfo->door.lockId, goInfo->door.lockId);
+ goInfo->entry, goInfo->type, N, goInfo->door.open, goInfo->door.open);
}
inline void CheckGOLinkedTrapId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N)
@@ -6569,8 +6569,8 @@ void ObjectMgr::LoadGameObjectTemplate()
"questItem4, questItem5, questItem6, data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, "
// 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
"data13, data14, data15, data16, data17, data18, data19, data20, data21, data22, data23, data24, data25, data26, data27, data28, "
- // 45 46 47 48 49 50
- "data29, data30, data31, unkInt32, AIName, ScriptName "
+ // 45 46 47 48 49 50 51
+ "data29, data30, data31, data32, unkInt32, AIName, ScriptName "
"FROM gameobject_template");
if (!result)
@@ -6606,9 +6606,9 @@ void ObjectMgr::LoadGameObjectTemplate()
for (uint8 i = 0; i < MAX_GAMEOBJECT_DATA; ++i)
got.raw.data[i] = fields[16 + i].GetUInt32();
- got.unkInt32 = fields[48].GetInt32();
- got.AIName = fields[49].GetString();
- got.ScriptId = GetScriptId(fields[50].GetCString());
+ got.unkInt32 = fields[49].GetInt32();
+ got.AIName = fields[50].GetString();
+ got.ScriptId = GetScriptId(fields[51].GetCString());
// Checks
@@ -6616,95 +6616,95 @@ void ObjectMgr::LoadGameObjectTemplate()
{
case GAMEOBJECT_TYPE_DOOR: //0
{
- if (got.door.lockId)
- CheckGOLockId(&got, got.door.lockId, 1);
+ if (got.door.open)
+ CheckGOLockId(&got, got.door.open, 1);
CheckGONoDamageImmuneId(&got, got.door.noDamageImmune, 3);
break;
}
case GAMEOBJECT_TYPE_BUTTON: //1
{
- if (got.button.lockId)
- CheckGOLockId(&got, got.button.lockId, 1);
+ if (got.button.open)
+ CheckGOLockId(&got, got.button.open, 1);
CheckGONoDamageImmuneId(&got, got.button.noDamageImmune, 4);
break;
}
case GAMEOBJECT_TYPE_QUESTGIVER: //2
{
- if (got.questgiver.lockId)
- CheckGOLockId(&got, got.questgiver.lockId, 0);
+ if (got.questgiver.open)
+ CheckGOLockId(&got, got.questgiver.open, 0);
CheckGONoDamageImmuneId(&got, got.questgiver.noDamageImmune, 5);
break;
}
case GAMEOBJECT_TYPE_CHEST: //3
{
- if (got.chest.lockId)
- CheckGOLockId(&got, got.chest.lockId, 0);
+ if (got.chest.open)
+ CheckGOLockId(&got, got.chest.open, 0);
CheckGOConsumable(&got, got.chest.consumable, 3);
- if (got.chest.linkedTrapId) // linked trap
- CheckGOLinkedTrapId(&got, got.chest.linkedTrapId, 7);
+ if (got.chest.linkedTrap) // linked trap
+ CheckGOLinkedTrapId(&got, got.chest.linkedTrap, 7);
break;
}
case GAMEOBJECT_TYPE_TRAP: //6
{
- if (got.trap.lockId)
- CheckGOLockId(&got, got.trap.lockId, 0);
+ if (got.trap.open)
+ CheckGOLockId(&got, got.trap.open, 0);
break;
}
case GAMEOBJECT_TYPE_CHAIR: //7
- CheckAndFixGOChairHeightId(&got, got.chair.height, 1);
+ CheckAndFixGOChairHeightId(&got, got.chair.chairheight, 1);
break;
case GAMEOBJECT_TYPE_SPELL_FOCUS: //8
{
- if (got.spellFocus.focusId)
+ if (got.spellFocus.spellFocusType)
{
- if (!sSpellFocusObjectStore.LookupEntry(got.spellFocus.focusId))
+ if (!sSpellFocusObjectStore.LookupEntry(got.spellFocus.spellFocusType))
TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data0=%u but SpellFocus (Id: %u) not exist.",
- entry, got.type, got.spellFocus.focusId, got.spellFocus.focusId);
+ entry, got.type, got.spellFocus.spellFocusType, got.spellFocus.spellFocusType);
}
- if (got.spellFocus.linkedTrapId) // linked trap
- CheckGOLinkedTrapId(&got, got.spellFocus.linkedTrapId, 2);
+ if (got.spellFocus.linkedTrap) // linked trap
+ CheckGOLinkedTrapId(&got, got.spellFocus.linkedTrap, 2);
break;
}
case GAMEOBJECT_TYPE_GOOBER: //10
{
- if (got.goober.lockId)
- CheckGOLockId(&got, got.goober.lockId, 0);
+ if (got.goober.open)
+ CheckGOLockId(&got, got.goober.open, 0);
CheckGOConsumable(&got, got.goober.consumable, 3);
- if (got.goober.pageId) // pageId
+ if (got.goober.pageID) // pageId
{
- if (!GetPageText(got.goober.pageId))
+ if (!GetPageText(got.goober.pageID))
TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data7=%u but PageText (Entry %u) not exist.",
- entry, got.type, got.goober.pageId, got.goober.pageId);
+ entry, got.type, got.goober.pageID, got.goober.pageID);
}
CheckGONoDamageImmuneId(&got, got.goober.noDamageImmune, 11);
- if (got.goober.linkedTrapId) // linked trap
- CheckGOLinkedTrapId(&got, got.goober.linkedTrapId, 12);
+ if (got.goober.linkedTrap) // linked trap
+ CheckGOLinkedTrapId(&got, got.goober.linkedTrap, 12);
break;
}
case GAMEOBJECT_TYPE_AREADAMAGE: //12
{
- if (got.areadamage.lockId)
- CheckGOLockId(&got, got.areadamage.lockId, 0);
+ if (got.areaDamage.open)
+ CheckGOLockId(&got, got.areaDamage.open, 0);
break;
}
case GAMEOBJECT_TYPE_CAMERA: //13
{
- if (got.camera.lockId)
- CheckGOLockId(&got, got.camera.lockId, 0);
+ if (got.camera.open)
+ CheckGOLockId(&got, got.camera.open, 0);
break;
}
case GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT: //15
{
- if (got.moTransport.taxiPathId)
+ if (got.moTransport.taxiPathID)
{
- if (got.moTransport.taxiPathId >= sTaxiPathNodesByPath.size() || sTaxiPathNodesByPath[got.moTransport.taxiPathId].empty())
+ if (got.moTransport.taxiPathID >= sTaxiPathNodesByPath.size() || sTaxiPathNodesByPath[got.moTransport.taxiPathID].empty())
TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.",
- entry, got.type, got.moTransport.taxiPathId, got.moTransport.taxiPathId);
+ entry, got.type, got.moTransport.taxiPathID, got.moTransport.taxiPathID);
}
if (uint32 transportMap = got.moTransport.mapID)
_transportMaps.insert(transportMap);
@@ -6715,27 +6715,27 @@ void ObjectMgr::LoadGameObjectTemplate()
case GAMEOBJECT_TYPE_SPELLCASTER: //22
{
// always must have spell
- CheckGOSpellId(&got, got.spellcaster.spellId, 0);
+ CheckGOSpellId(&got, got.spellCaster.spell, 0);
break;
}
case GAMEOBJECT_TYPE_FLAGSTAND: //24
{
- if (got.flagstand.lockId)
- CheckGOLockId(&got, got.flagstand.lockId, 0);
- CheckGONoDamageImmuneId(&got, got.flagstand.noDamageImmune, 5);
+ if (got.flagStand.open)
+ CheckGOLockId(&got, got.flagStand.open, 0);
+ CheckGONoDamageImmuneId(&got, got.flagStand.noDamageImmune, 5);
break;
}
case GAMEOBJECT_TYPE_FISHINGHOLE: //25
{
- if (got.fishinghole.lockId)
- CheckGOLockId(&got, got.fishinghole.lockId, 4);
+ if (got.fishingHole.open)
+ CheckGOLockId(&got, got.fishingHole.open, 4);
break;
}
case GAMEOBJECT_TYPE_FLAGDROP: //26
{
- if (got.flagdrop.lockId)
- CheckGOLockId(&got, got.flagdrop.lockId, 0);
- CheckGONoDamageImmuneId(&got, got.flagdrop.noDamageImmune, 3);
+ if (got.flagDrop.open)
+ CheckGOLockId(&got, got.flagDrop.open, 0);
+ CheckGONoDamageImmuneId(&got, got.flagDrop.noDamageImmune, 3);
break;
}
case GAMEOBJECT_TYPE_BARBER_CHAIR: //32
@@ -7724,7 +7724,7 @@ void ObjectMgr::LoadGameObjectForQuests()
uint32 loot_id = (itr->second.GetLootId());
// find quest loot for GO
- if (itr->second.chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
+ if (itr->second.chest.questID || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{
_gameObjectForQuestStore.insert(itr->second.entry);
++count;
@@ -7733,7 +7733,7 @@ void ObjectMgr::LoadGameObjectForQuests()
}
case GAMEOBJECT_TYPE_GENERIC:
{
- if (itr->second._generic.questID > 0) //quests objects
+ if (itr->second.generic.questID > 0) //quests objects
{
_gameObjectForQuestStore.insert(itr->second.entry);
++count;
@@ -7742,7 +7742,7 @@ void ObjectMgr::LoadGameObjectForQuests()
}
case GAMEOBJECT_TYPE_GOOBER:
{
- if (itr->second.goober.questId > 0) //quests objects
+ if (itr->second.goober.questID > 0) //quests objects
{
_gameObjectForQuestStore.insert(itr->second.entry);
++count;