aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-06-02 00:40:52 +0200
committerOvahlord <dreadkiller@gmx.de>2024-06-02 00:40:52 +0200
commit281f8e3209d14184faf7600835b95d9f69b27271 (patch)
tree82500332d769ae1c0680794c24e73e6c231a5820
parent710a0f26818b59b5ee0e064fd633ce780cd5b0ae (diff)
Core/Items: added new db2 and update field accessors for future updates
-rw-r--r--src/server/game/DataStores/DB2Structure.h2
-rw-r--r--src/server/game/Entities/Item/Item.h3
-rw-r--r--src/server/game/Entities/Item/ItemTemplate.h4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index 380110ec140..18fa184e3e7 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -2348,7 +2348,7 @@ struct ItemSparseEntry
std::array<uint16, 5> MaxDamage;
std::array<int16, 7> Resistances;
uint16 ScalingStatDistributionID;
- std::array<int16, 10> StatModifierBonusAmount;
+ std::array<int16, MAX_ITEM_PROTO_STATS> StatModifierBonusAmount;
uint8 ExpansionID;
uint8 ArtifactID;
uint8 SpellWeight;
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index 0726a72ac08..aa9153a6cfe 100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -417,6 +417,9 @@ class TC_GAME_API Item : public Object
void SetPetitionId(uint32 petitionId) { SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::Enchantment, 0).ModifyValue(&UF::ItemEnchantment::ID), petitionId); }
void SetPetitionNumSignatures(uint32 signatures) { SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::Enchantment, 0).ModifyValue(&UF::ItemEnchantment::Duration), signatures); }
+ int32 GetRandomPropertiesId() const { return m_itemData->RandomPropertiesID; };
+ int32 GetPropertySeed() const { return m_itemData->PropertySeed; };
+
std::string GetDebugInfo() const override;
UF::UpdateField<UF::ItemData, 0, TYPEID_ITEM> m_itemData;
diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h
index 4b59c348d48..14f9b114d15 100644
--- a/src/server/game/Entities/Item/ItemTemplate.h
+++ b/src/server/game/Entities/Item/ItemTemplate.h
@@ -830,9 +830,11 @@ struct TC_GAME_API ItemTemplate
uint32 GetRequiredReputationRank() const { return ExtendedData->MinReputation; }
uint32 GetMaxCount() const { return ExtendedData->MaxCount; }
uint32 GetContainerSlots() const { return ExtendedData->ContainerSlots; }
+ int32 GetStatModifierBonusAmount(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatModifierBonusAmount[index]; }
int32 GetStatModifierBonusStat(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatModifierBonusStat[index]; }
int32 GetStatPercentEditor(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatPercentEditor[index]; }
float GetStatPercentageOfSocket(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatPercentageOfSocket[index]; }
+ uint16 GetScalingStatDistributionID() const { return ExtendedData->ScalingStatDistributionID; }
uint32 GetScalingStatContentTuning() const { return ExtendedData->ContentTuningID; }
uint32 GetPlayerLevelToItemLevelCurveId() const { return ExtendedData->PlayerLevelToItemLevelCurveID; }
uint32 GetDamageType() const { return ExtendedData->DamageDamageType; }
@@ -858,6 +860,8 @@ struct TC_GAME_API ItemTemplate
float GetDmgVariance() const { return ExtendedData->DmgVariance; }
uint8 GetArtifactID() const { return ExtendedData->ArtifactID; }
uint8 GetRequiredExpansion() const { return ExtendedData->ExpansionID; }
+ uint16 GetRandomSelect() const { return ExtendedData->RandomSelect; }
+ uint16 GetItemRandomSuffixGroupID() const { return ExtendedData->ItemRandomSuffixGroupID; }
uint32 MaxDurability;
std::vector<ItemEffectEntry const*> Effects;