diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-03-12 18:20:26 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-03-12 23:11:49 +0100 |
commit | 007b5a68c50bbee7d05acec888d3273c2a5a8577 (patch) | |
tree | 4818b60a73730b98ae4785d0630edbd6cd27d5bf /src/server/game/Globals/ObjectMgr.cpp | |
parent | 50a912af72ca84095eab5effa7d70e8a50ff8a04 (diff) |
Core/DataStores: Fixed db2 structures after 7.3.5
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index cbafb647347..fb52120263a 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1366,7 +1366,7 @@ void ObjectMgr::LoadEquipmentTemplates() "for CreatureID = %u and ID=%u, forced to default.", equipmentInfo.Items[i].ItemId, equipmentInfo.Items[i].AppearanceModId, i + 1, i + 1, entry, id); if (ItemModifiedAppearanceEntry const* defaultAppearance = sDB2Manager.GetDefaultItemModifiedAppearance(equipmentInfo.Items[i].ItemId)) - equipmentInfo.Items[i].AppearanceModId = defaultAppearance->AppearanceModID; + equipmentInfo.Items[i].AppearanceModId = defaultAppearance->ItemAppearanceModifierID; else equipmentInfo.Items[i].AppearanceModId = 0; continue; @@ -2589,10 +2589,10 @@ struct ItemSpecStats { memset(ItemSpecStatTypes, -1, sizeof(ItemSpecStatTypes)); - if (item->Class == ITEM_CLASS_WEAPON) + if (item->ClassID == ITEM_CLASS_WEAPON) { ItemType = 5; - switch (item->SubClass) + switch (item->SubclassID) { case ITEM_SUBCLASS_WEAPON_AXE: AddStat(ITEM_SPEC_STAT_ONE_HANDED_AXE); @@ -2646,9 +2646,9 @@ struct ItemSpecStats break; } } - else if (item->Class == ITEM_CLASS_ARMOR) + else if (item->ClassID == ITEM_CLASS_ARMOR) { - switch (item->SubClass) + switch (item->SubclassID) { case ITEM_SUBCLASS_ARMOR_CLOTH: if (sparse->InventoryType != INVTYPE_CLOAK) @@ -2670,12 +2670,12 @@ struct ItemSpecStats ItemType = 4; break; default: - if (item->SubClass == ITEM_SUBCLASS_ARMOR_SHIELD) + if (item->SubclassID == ITEM_SUBCLASS_ARMOR_SHIELD) { ItemType = 6; AddStat(ITEM_SPEC_STAT_SHIELD); } - else if (item->SubClass > ITEM_SUBCLASS_ARMOR_SHIELD && item->SubClass <= ITEM_SUBCLASS_ARMOR_RELIC) + else if (item->SubclassID > ITEM_SUBCLASS_ARMOR_SHIELD && item->SubclassID <= ITEM_SUBCLASS_ARMOR_RELIC) { ItemType = 6; AddStat(ITEM_SPEC_STAT_RELIC); @@ -2685,7 +2685,7 @@ struct ItemSpecStats break; } } - else if (item->Class == ITEM_CLASS_GEM) + else if (item->ClassID == ITEM_CLASS_GEM) { ItemType = 7; if (GemPropertiesEntry const* gem = sGemPropertiesStore.LookupEntry(sparse->GemProperties)) @@ -2718,8 +2718,8 @@ struct ItemSpecStats ItemType = 0; for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) - if (sparse->ItemStatType[i] != -1) - AddModStat(sparse->ItemStatType[i]); + if (sparse->StatModifierBonusStat[i] != -1) + AddModStat(sparse->StatModifierBonusStat[i]); } void AddStat(ItemSpecStat statType) @@ -2805,7 +2805,7 @@ void ObjectMgr::LoadItemTemplates() itemTemplate.BasicData = db2Data; itemTemplate.ExtendedData = sparse; - itemTemplate.MaxDurability = FillMaxDurability(db2Data->Class, db2Data->SubClass, sparse->InventoryType, sparse->Quality, sparse->ItemLevel); + itemTemplate.MaxDurability = FillMaxDurability(db2Data->ClassID, db2Data->SubclassID, sparse->InventoryType, sparse->OverallQualityID, sparse->ItemLevel); itemTemplate.ScriptId = 0; itemTemplate.FoodType = 0; itemTemplate.MinMoneyLoot = 0; @@ -2849,7 +2849,7 @@ void ObjectMgr::LoadItemTemplates() if (!hasPrimary || !hasSecondary) continue; - if (ChrSpecializationEntry const* specialization = sChrSpecializationStore.LookupEntry(itemSpec->SpecID)) + if (ChrSpecializationEntry const* specialization = sChrSpecializationStore.LookupEntry(itemSpec->SpecializationID)) { if ((1 << (specialization->ClassID - 1)) & sparse->AllowableClass) { @@ -2876,7 +2876,7 @@ void ObjectMgr::LoadItemTemplates() // Load item effects (spells) for (ItemEffectEntry const* effectEntry : sItemEffectStore) { - auto itemItr = _itemTemplateStore.find(effectEntry->ItemID); + auto itemItr = _itemTemplateStore.find(effectEntry->ParentItemID); if (itemItr == _itemTemplateStore.end()) continue; @@ -3285,8 +3285,8 @@ void ObjectMgr::LoadPlayerInfo() info->positionY = positionY; info->positionZ = positionZ; info->orientation = orientation; - info->displayId_m = rEntry->MaleDisplayID; - info->displayId_f = rEntry->FemaleDisplayID; + info->displayId_m = rEntry->MaleDisplayId; + info->displayId_f = rEntry->FemaleDisplayId; _playerInfo[current_race][current_class] = info; ++count; @@ -6016,7 +6016,7 @@ uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, ui uint32 requireFlag = (team == ALLIANCE) ? TAXI_NODE_FLAG_ALLIANCE : TAXI_NODE_FLAG_HORDE; for (TaxiNodesEntry const* node : sTaxiNodesStore) { - if (!node || node->MapID != mapid || !(node->Flags & requireFlag)) + if (!node || node->ContinentID != mapid || !(node->Flags & requireFlag)) continue; uint8 field = (uint8)((node->ID - 1) / 8); @@ -6249,7 +6249,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float if (!mapEntry || mapEntry->CorpseMapID < 0 || uint32(mapEntry->CorpseMapID) != entry->MapID - || (mapEntry->CorpsePos.X == 0 && mapEntry->CorpsePos.Y == 0)) // Check X and Y + || (mapEntry->Corpse.X == 0 && mapEntry->Corpse.Y == 0)) // Check X and Y { // not have any corrdinates for check distance anyway entryFar = entry; @@ -6257,8 +6257,8 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float } // at entrance map calculate distance (2D); - float dist2 = (entry->Loc.X - mapEntry->CorpsePos.X)*(entry->Loc.X - mapEntry->CorpsePos.X) - +(entry->Loc.Y - mapEntry->CorpsePos.Y)*(entry->Loc.Y - mapEntry->CorpsePos.Y); + float dist2 = (entry->Loc.X - mapEntry->Corpse.X)*(entry->Loc.X - mapEntry->Corpse.X) + +(entry->Loc.Y - mapEntry->Corpse.Y)*(entry->Loc.Y - mapEntry->Corpse.Y); if (foundEntr) { if (dist2 < distEntr) @@ -6597,7 +6597,7 @@ AreaTriggerStruct const* ObjectMgr::GetGoBackTrigger(uint32 Map) const if ((!useParentDbValue && itr->second.target_mapId == entrance_map) || (useParentDbValue && itr->second.target_mapId == parentId)) { AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first); - if (atEntry && atEntry->MapID == Map) + if (atEntry && atEntry->ContinentID == int32(Map)) return &itr->second; } return nullptr; @@ -6846,12 +6846,12 @@ void ObjectMgr::LoadGameObjectTemplate() { GameObjectTemplate& go = _gameObjectTemplateStore[db2go->ID]; go.entry = db2go->ID; - go.type = db2go->Type; + go.type = db2go->TypeID; go.displayId = db2go->DisplayID; go.name = db2go->Name->Str[sWorld->GetDefaultDbcLocale()]; - go.size = db2go->Size; + go.size = db2go->Scale; memset(go.raw.data, 0, sizeof(go.raw.data)); - memcpy(go.raw.data, db2go->Data, std::min(sizeof(db2go->Data), sizeof(go.raw.data))); + memcpy(go.raw.data, db2go->PropValue, std::min(sizeof(db2go->PropValue), sizeof(go.raw.data))); go.RequiredLevel = 0; go.ScriptId = 0; } |