aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-03-14 03:48:48 +0100
committerOvahlord <dreadkiller@gmx.de>2024-03-14 03:48:48 +0100
commitc16e24fd7fc7952105b8c1ff5bc039766b2e7c78 (patch)
tree4d60216e168dcf1cf084d52ccad5b04e7d2a337b /src/server/game
parent47519bf425f727dd82568fa617e5c91eb9dd4f76 (diff)
Core/DataStores: updated DB2 structures to 4.4.0.53750
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/DataStores/DB2LoadInfo.h68
-rw-r--r--src/server/game/DataStores/DB2Metadata.h64
-rw-r--r--src/server/game/DataStores/DB2Structure.h39
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp5
-rw-r--r--src/server/game/Entities/Player/Player.cpp37
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp7
6 files changed, 94 insertions, 126 deletions
diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h
index 65e90a37e91..84dbfd6975b 100644
--- a/src/server/game/DataStores/DB2LoadInfo.h
+++ b/src/server/game/DataStores/DB2LoadInfo.h
@@ -2980,7 +2980,7 @@ struct ItemSetSpellLoadInfo
struct ItemSparseLoadInfo
{
- static constexpr DB2FieldMeta Fields[130] =
+ static constexpr DB2FieldMeta Fields[140] =
{
{ false, FT_INT, "ID" },
{ true, FT_LONG, "AllowableRace" },
@@ -3005,6 +3005,16 @@ struct ItemSparseLoadInfo
{ false, FT_FLOAT, "StatPercentageOfSocket8" },
{ false, FT_FLOAT, "StatPercentageOfSocket9" },
{ false, FT_FLOAT, "StatPercentageOfSocket10" },
+ { true, FT_INT, "Unknown440_11" },
+ { true, FT_INT, "Unknown440_12" },
+ { true, FT_INT, "Unknown440_13" },
+ { true, FT_INT, "Unknown440_14" },
+ { true, FT_INT, "Unknown440_15" },
+ { true, FT_INT, "Unknown440_16" },
+ { true, FT_INT, "Unknown440_17" },
+ { true, FT_INT, "Unknown440_18" },
+ { true, FT_INT, "Unknown440_19" },
+ { true, FT_INT, "Unknown440_110" },
{ true, FT_INT, "StatPercentEditor1" },
{ true, FT_INT, "StatPercentEditor2" },
{ true, FT_INT, "StatPercentEditor3" },
@@ -3114,7 +3124,7 @@ struct ItemSparseLoadInfo
{ true, FT_BYTE, "RequiredLevel" },
};
- static constexpr DB2LoadInfo Instance{ Fields, 130, &ItemSparseMeta::Instance, HOTFIX_SEL_ITEM_SPARSE };
+ static constexpr DB2LoadInfo Instance{ Fields, 140, &ItemSparseMeta::Instance, HOTFIX_SEL_ITEM_SPARSE };
};
struct ItemSpecLoadInfo
@@ -4785,36 +4795,36 @@ struct SpellItemEnchantmentLoadInfo
{ false, FT_INT, "ID" },
{ false, FT_STRING, "Name" },
{ false, FT_STRING, "HordeName" },
- { false, FT_INT, "EffectArg1" },
- { false, FT_INT, "EffectArg2" },
- { false, FT_INT, "EffectArg3" },
+ { true, FT_INT, "Charges" },
+ { true, FT_INT, "Effect1" },
+ { true, FT_INT, "Effect2" },
+ { true, FT_INT, "Effect3" },
+ { true, FT_INT, "EffectPointsMin1" },
+ { true, FT_INT, "EffectPointsMin2" },
+ { true, FT_INT, "EffectPointsMin3" },
+ { true, FT_INT, "EffectPointsMax1" },
+ { true, FT_INT, "EffectPointsMax2" },
+ { true, FT_INT, "EffectPointsMax3" },
+ { true, FT_INT, "EffectArg1" },
+ { true, FT_INT, "EffectArg2" },
+ { true, FT_INT, "EffectArg3" },
+ { true, FT_INT, "ItemVisual" },
+ { true, FT_INT, "Flags" },
{ false, FT_FLOAT, "EffectScalingPoints1" },
{ false, FT_FLOAT, "EffectScalingPoints2" },
{ false, FT_FLOAT, "EffectScalingPoints3" },
- { false, FT_INT, "GemItemID" },
- { false, FT_INT, "TransmogUseConditionID" },
- { false, FT_INT, "TransmogCost" },
- { false, FT_INT, "IconFileDataID" },
- { true, FT_SHORT, "EffectPointsMin1" },
- { true, FT_SHORT, "EffectPointsMin2" },
- { true, FT_SHORT, "EffectPointsMin3" },
- { true, FT_SHORT, "EffectPointsMax1" },
- { true, FT_SHORT, "EffectPointsMax2" },
- { true, FT_SHORT, "EffectPointsMax3" },
- { false, FT_SHORT, "ItemVisual" },
- { false, FT_SHORT, "Flags" },
- { false, FT_SHORT, "RequiredSkillID" },
- { false, FT_SHORT, "RequiredSkillRank" },
- { false, FT_SHORT, "ItemLevel" },
- { false, FT_BYTE, "Charges" },
- { false, FT_BYTE, "Effect1" },
- { false, FT_BYTE, "Effect2" },
- { false, FT_BYTE, "Effect3" },
- { true, FT_BYTE, "ScalingClass" },
- { true, FT_BYTE, "ScalingClassRestricted" },
- { false, FT_BYTE, "ConditionID" },
- { false, FT_BYTE, "MinLevel" },
- { false, FT_BYTE, "MaxLevel" },
+ { true, FT_INT, "ScalingClass" },
+ { true, FT_INT, "Unk440_1" },
+ { true, FT_INT, "GemItemID" },
+ { true, FT_INT, "ConditionID" },
+ { true, FT_INT, "RequiredSkillID" },
+ { true, FT_INT, "RequiredSkillRank" },
+ { true, FT_INT, "MinLevel" },
+ { true, FT_INT, "Unk440_2" },
+ { true, FT_INT, "Unk440_3" },
+ { true, FT_INT, "ItemLevel" },
+ { true, FT_INT, "Unk440_4" },
+ { true, FT_INT, "Unk440_5" },
};
static constexpr DB2LoadInfo Instance{ Fields, 33, &SpellItemEnchantmentMeta::Instance, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT };
diff --git a/src/server/game/DataStores/DB2Metadata.h b/src/server/game/DataStores/DB2Metadata.h
index 333f784951d..be259b097df 100644
--- a/src/server/game/DataStores/DB2Metadata.h
+++ b/src/server/game/DataStores/DB2Metadata.h
@@ -2968,11 +2968,11 @@ struct CreatureImmunitiesMeta
{ FT_BYTE, 1, false },
{ FT_BYTE, 1, false },
{ FT_INT, 2, true },
- { FT_INT, 10, false },
+ { FT_INT, 11, false },
{ FT_INT, 20, false },
};
- static constexpr DB2Meta Instance{ 1131322, -1, 9, 9, 0x1B605529, Fields, -1 };
+ static constexpr DB2Meta Instance{ 1131322, -1, 9, 9, 0x6103DDDA, Fields, -1 };
};
struct CreatureModelDataMeta
@@ -5647,10 +5647,10 @@ struct ItemRandomPropertiesMeta
static constexpr DB2MetaField Fields[2] =
{
{ FT_STRING, 1, true },
- { FT_SHORT, 5, false },
+ { FT_SHORT, 5, true },
};
- static constexpr DB2Meta Instance{ 1237441, -1, 2, 2, 0xA74D16F8, Fields, -1 };
+ static constexpr DB2Meta Instance{ 1237441, -1, 2, 2, 0x0D2C3577, Fields, -1 };
};
struct ItemRandomSuffixMeta
@@ -5658,11 +5658,11 @@ struct ItemRandomSuffixMeta
static constexpr DB2MetaField Fields[3] =
{
{ FT_STRING, 1, true },
- { FT_SHORT, 5, false },
- { FT_SHORT, 5, false },
+ { FT_INT, 5, true },
+ { FT_INT, 5, true },
};
- static constexpr DB2Meta Instance{ 1237592, -1, 3, 3, 0x0FF4E63B, Fields, -1 };
+ static constexpr DB2Meta Instance{ 1237592, -1, 3, 3, 0x07FFE191, Fields, -1 };
};
struct ItemRangedDisplayInfoMeta
@@ -5680,8 +5680,9 @@ struct ItemRangedDisplayInfoMeta
struct ItemReforgeMeta
{
- static constexpr DB2MetaField Fields[5] =
+ static constexpr DB2MetaField Fields[6] =
{
+ { FT_INT, 1, true },
{ FT_SHORT, 1, false },
{ FT_FLOAT, 1, true },
{ FT_SHORT, 1, false },
@@ -5689,7 +5690,7 @@ struct ItemReforgeMeta
{ FT_SHORT, 1, false },
};
- static constexpr DB2Meta Instance{ 5633983, -1, 5, 5, 0xE91C7760, Fields, -1 };
+ static constexpr DB2Meta Instance{ 5633983, 0, 6, 6, 0xF3A870E9, Fields, -1 };
};
struct ItemSearchNameMeta
@@ -5744,7 +5745,7 @@ struct ItemSetSpellMeta
struct ItemSparseMeta
{
- static constexpr DB2MetaField Fields[73] =
+ static constexpr DB2MetaField Fields[74] =
{
{ FT_LONG, 1, true },
{ FT_STRING, 1, true },
@@ -5760,6 +5761,7 @@ struct ItemSparseMeta
{ FT_FLOAT, 1, true },
{ FT_FLOAT, 10, true },
{ FT_INT, 10, true },
+ { FT_INT, 10, true },
{ FT_INT, 1, true },
{ FT_INT, 1, true },
{ FT_INT, 1, true },
@@ -5821,7 +5823,7 @@ struct ItemSparseMeta
{ FT_BYTE, 1, true },
};
- static constexpr DB2Meta Instance{ 1572924, -1, 73, 73, 0xD532973D, Fields, -1 };
+ static constexpr DB2Meta Instance{ 1572924, -1, 74, 74, 0xE3090D23, Fields, -1 };
};
struct ItemSpecMeta
@@ -9643,29 +9645,29 @@ struct SpellItemEnchantmentMeta
{
{ FT_STRING, 1, true },
{ FT_STRING, 1, true },
- { FT_INT, 3, false },
+ { FT_INT, 1, true },
+ { FT_INT, 3, true },
+ { FT_INT, 3, true },
+ { FT_INT, 3, true },
+ { FT_INT, 3, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
{ FT_FLOAT, 3, true },
- { FT_INT, 1, false },
- { FT_INT, 1, false },
- { FT_INT, 1, false },
- { FT_INT, 1, false },
- { FT_SHORT, 3, true },
- { FT_SHORT, 3, true },
- { FT_SHORT, 1, false },
- { FT_SHORT, 1, false },
- { FT_SHORT, 1, false },
- { FT_SHORT, 1, false },
- { FT_SHORT, 1, false },
- { FT_BYTE, 1, false },
- { FT_BYTE, 3, false },
- { FT_BYTE, 1, true },
- { FT_BYTE, 1, true },
- { FT_BYTE, 1, false },
- { FT_BYTE, 1, false },
- { FT_BYTE, 1, false },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
};
- static constexpr DB2Meta Instance{ 1362771, -1, 22, 22, 0x18AA1166, Fields, -1 };
+ static constexpr DB2Meta Instance{ 1362771, -1, 22, 22, 0x31CF18E7, Fields, -1 };
};
struct SpellItemEnchantmentConditionMeta
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index 1b270288c6e..4a9840e25fa 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -2288,6 +2288,7 @@ struct ItemSparseEntry
int32 StartQuestID;
float ItemRange;
std::array<float, MAX_ITEM_PROTO_STATS> StatPercentageOfSocket;
+ std::array<int32, MAX_ITEM_PROTO_STATS> Unknown440_1;
std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor;
int32 Stackable;
int32 MaxCount;
@@ -3462,26 +3463,26 @@ struct SpellItemEnchantmentEntry
uint32 ID;
LocalizedString Name;
LocalizedString HordeName;
- std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectArg;
+ int32 Charges;
+ std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> Effect;
+ std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMin;
+ std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMax;
+ std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectArg;
+ int32 ItemVisual;
+ int32 Flags;
std::array<float, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectScalingPoints;
- uint32 GemItemID;
- uint32 TransmogUseConditionID;
- uint32 TransmogCost;
- uint32 IconFileDataID;
- std::array<int16, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMin;
- std::array<int16, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMax;
- uint16 ItemVisual;
- uint16 Flags;
- uint16 RequiredSkillID;
- uint16 RequiredSkillRank;
- uint16 ItemLevel;
- uint8 Charges;
- std::array<uint8, MAX_ITEM_ENCHANTMENT_EFFECTS> Effect;
- int8 ScalingClass;
- int8 ScalingClassRestricted;
- uint8 ConditionID;
- uint8 MinLevel;
- uint8 MaxLevel;
+ int32 ScalingClass;
+ int32 Unk440_1;
+ int32 GemItemID;
+ int32 ConditionID;
+ int32 RequiredSkillID;
+ int32 RequiredSkillRank;
+ int32 MinLevel;
+ int32 Unk440_2;
+ int32 Unk440_3;
+ int32 ItemLevel;
+ int32 Unk440_4;
+ int32 Unk440_5;
EnumFlag<SpellItemEnchantmentFlags> GetFlags() const { return static_cast<SpellItemEnchantmentFlags>(Flags); }
};
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 2d2cac13da0..e80d629c1c4 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -911,9 +911,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
uint32 health = uint32(basehp * healthmod);
uint32 mana = stats->GenerateMana(m_creatureDifficulty);
- CreatureDifficulty const* creatureDifficulty = GetCreatureDifficulty();
- SetCreateHealth(std::max(sDB2Manager.EvaluateExpectedStat(ExpectedStatType::CreatureHealth, petlevel, creatureDifficulty->GetHealthScalingExpansion(), m_unitData->ContentTuningID, Classes(cinfo->unit_class), 0) * creatureDifficulty->HealthModifier * GetHealthMod(cinfo->Classification), 1.0f));
- SetCreateMana(stats->BaseMana);
+ SetCreateHealth(health);
+ SetCreateMana(mana);
SetCreateStat(STAT_STRENGTH, 22);
SetCreateStat(STAT_AGILITY, 22);
SetCreateStat(STAT_STAMINA, 25);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 9c916689153..7429c4ee48d 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -13334,48 +13334,11 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
}
break;
case ITEM_ENCHANTMENT_TYPE_RESISTANCE:
- if (pEnchant->ScalingClass)
- {
- int32 scalingClass = pEnchant->ScalingClass;
- if ((*m_unitData->MinItemLevel || *m_unitData->MaxItemLevel) && pEnchant->ScalingClassRestricted)
- scalingClass = pEnchant->ScalingClassRestricted;
-
- uint8 minLevel = pEnchant->GetFlags().HasFlag(SpellItemEnchantmentFlags::ScaleAsAGem) ? 1 : 60;
- uint8 scalingLevel = GetLevel();
- uint8 maxLevel = uint8(pEnchant->MaxLevel ? pEnchant->MaxLevel : sSpellScalingGameTable.GetTableRowCount() - 1);
-
- if (minLevel > GetLevel())
- scalingLevel = minLevel;
- else if (maxLevel < GetLevel())
- scalingLevel = maxLevel;
-
- if (GtSpellScalingEntry const* spellScaling = sSpellScalingGameTable.GetRow(scalingLevel))
- enchant_amount = uint32(pEnchant->EffectScalingPoints[s] * GetSpellScalingColumnForClass(spellScaling, scalingClass));
- }
enchant_amount = std::max(enchant_amount, 1u);
HandleStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + enchant_spell_id), TOTAL_VALUE, float(enchant_amount), apply);
break;
case ITEM_ENCHANTMENT_TYPE_STAT:
{
- if (pEnchant->ScalingClass)
- {
- int32 scalingClass = pEnchant->ScalingClass;
- if ((*m_unitData->MinItemLevel || *m_unitData->MaxItemLevel) && pEnchant->ScalingClassRestricted)
- scalingClass = pEnchant->ScalingClassRestricted;
-
- uint8 minLevel = pEnchant->GetFlags().HasFlag(SpellItemEnchantmentFlags::ScaleAsAGem) ? 1 : 60;
- uint8 scalingLevel = GetLevel();
- uint8 maxLevel = uint8(pEnchant->MaxLevel ? pEnchant->MaxLevel : sSpellScalingGameTable.GetTableRowCount() - 1);
-
- if (minLevel > GetLevel())
- scalingLevel = minLevel;
- else if (maxLevel < GetLevel())
- scalingLevel = maxLevel;
-
- if (GtSpellScalingEntry const* spellScaling = sSpellScalingGameTable.GetRow(scalingLevel))
- enchant_amount = uint32(pEnchant->EffectScalingPoints[s] * GetSpellScalingColumnForClass(spellScaling, scalingClass));
- }
-
enchant_amount = std::max(enchant_amount, 1u);
TC_LOG_DEBUG("entities.player.items", "Adding {} to stat nb {}", enchant_amount, enchant_spell_id);
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 8bcb9011c69..01d75d58b51 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -1951,13 +1951,6 @@ void WorldSession::HandleEquipmentSetSave(WorldPackets::EquipmentSet::SaveEquipm
if (!illusion->ItemVisual || !illusion->GetFlags().HasFlag(SpellItemEnchantmentFlags::AllowTransmog))
return false;
- if (PlayerConditionEntry const* condition = sPlayerConditionStore.LookupEntry(illusion->TransmogUseConditionID))
- if (!sConditionMgr->IsPlayerMeetingCondition(_player, condition))
- return false;
-
- if (illusion->ScalingClassRestricted > 0 && uint8(illusion->ScalingClassRestricted) != _player->GetClass())
- return false;
-
return true;
};