aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-03-09 00:14:16 +0100
committerOvahlord <dreadkiller@gmx.de>2024-03-09 00:14:16 +0100
commita0ee8a08d20e78f5bd856fc62314dd294a872f80 (patch)
tree4377f2d006baf6f875c073aad53c5177acc2370e /src
parent2822dbeac766126c926b76a6b880f1b77aea4c93 (diff)
Core/DataStores: updated game table structures
Diffstat (limited to 'src')
-rw-r--r--src/server/game/BattlePets/BattlePetMgr.cpp4
-rw-r--r--src/server/game/DataStores/GameTables.cpp82
-rw-r--r--src/server/game/DataStores/GameTables.h314
-rw-r--r--src/server/game/Entities/Item/Item.cpp12
-rw-r--r--src/server/game/Entities/Player/Player.cpp46
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp4
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp13
-rw-r--r--src/server/game/Handlers/ArtifactHandler.cpp11
-rw-r--r--src/server/game/Miscellaneous/Formulas.h4
-rw-r--r--src/server/game/Spells/SpellInfo.cpp2
-rw-r--r--src/tools/map_extractor/System.cpp2
11 files changed, 264 insertions, 230 deletions
diff --git a/src/server/game/BattlePets/BattlePetMgr.cpp b/src/server/game/BattlePets/BattlePetMgr.cpp
index a6260eb36a8..52729affb5a 100644
--- a/src/server/game/BattlePets/BattlePetMgr.cpp
+++ b/src/server/game/BattlePets/BattlePetMgr.cpp
@@ -699,6 +699,9 @@ void BattlePetMgr::ChangeBattlePetQuality(ObjectGuid guid, BattlePetBreedQuality
void BattlePetMgr::GrantBattlePetExperience(ObjectGuid guid, uint16 xp, BattlePetXpSource xpSource)
{
+ return;
+
+ /*
if (!HasJournalLock())
return;
@@ -755,6 +758,7 @@ void BattlePetMgr::GrantBattlePetExperience(ObjectGuid guid, uint16 xp, BattlePe
std::vector<std::reference_wrapper<BattlePet>> updates;
updates.push_back(std::ref(*pet));
SendUpdates(std::move(updates), false);
+ */
}
void BattlePetMgr::GrantBattlePetLevel(ObjectGuid guid, uint16 grantedLevels)
diff --git a/src/server/game/DataStores/GameTables.cpp b/src/server/game/DataStores/GameTables.cpp
index 2f786ddb63b..a9f5e251100 100644
--- a/src/server/game/DataStores/GameTables.cpp
+++ b/src/server/game/DataStores/GameTables.cpp
@@ -25,19 +25,24 @@
#include <fstream>
#include <sstream>
-GameTable<GtArtifactKnowledgeMultiplierEntry> sArtifactKnowledgeMultiplierGameTable;
-GameTable<GtArtifactLevelXPEntry> sArtifactLevelXPGameTable;
-GameTable<GtBarberShopCostBaseEntry> sBarberShopCostBaseGameTable;
-GameTable<GtBaseMPEntry> sBaseMPGameTable;
-GameTable<GtBattlePetXPEntry> sBattlePetXPGameTable;
-GameTable<GtCombatRatingsEntry> sCombatRatingsGameTable;
-GameTable<GtCombatRatingsMultByILvl> sCombatRatingsMultByILvlGameTable;
-GameTable<GtHpPerStaEntry> sHpPerStaGameTable;
-GameTable<GtItemSocketCostPerLevelEntry> sItemSocketCostPerLevelGameTable;
-GameTable<GtNpcManaCostScalerEntry> sNpcManaCostScalerGameTable;
-GameTable<GtSpellScalingEntry> sSpellScalingGameTable;
-GameTable<GtStaminaMultByILvl> sStaminaMultByILvlGameTable;
-GameTable<GtXpEntry> sXpGameTable;
+GameTable<GtBarberShopCostBaseEntry> sBarberShopCostBaseGameTable;
+GameTable<GtChanceToMeleeCritEntry> sChanceToMeleeCritGameTable;
+GameTable<GtChanceToMeleeCritBaseEntry> sChanceToMeleeCritBaseGameTable;
+GameTable<GtChanceToSpellCritEntry> sChanceToSpellCritGameTable;
+GameTable<GtChanceToSpellCritBaseEntry> sChanceToSpellCritBaseGameTable;
+GameTable<GtCombatRatingsEntry> sCombatRatingsGameTable;
+GameTable<GtNpcManaCostScalerEntry> sNpcManaCostScalerGameTable;
+GameTable<GtOctBaseHpByClassEntry> sOctBaseHpByClassGameTable;
+GameTable<GtOctBaseMpByClassEntry> sOctBaseMpByClassGameTable;
+GameTable<GtOctClassCombatRatingScalarEntry> sOctClassCombatRazingScalarGameTable;
+GameTable<GtOctHpPerStaminaEntry> sOctHpPerStaminaGameTable;
+GameTable<GtOctRegenHpEntry> sOctRegenHpGameTable;
+GameTable<GtOctRegenMpEntry> sOctRegenMpGameTable;
+GameTable<GtRegenHpPerSptEntry> sRegenHpPerSptTable;
+GameTable<GtRegenMpPerSptEntry> sRegenMpPerSptTable;
+GameTable<GtShieldBlockRegularEntry> sShieldBlockRegularTable;
+GameTable<GtSpellScalingEntry> sSpellScalingGameTable;
+GameTable<GtTeamContributionPointsEntry> sTeamContributionPointsGameTable;
template<class T>
inline uint32 LoadGameTable(std::vector<std::string>& errors, GameTable<T>& storage, boost::filesystem::path const& path)
@@ -112,19 +117,25 @@ void LoadGameTables(std::string const& dataPath)
#define LOAD_GT(store, file) gameTableCount += LoadGameTable(bad_gt_files, store, gtPath / file); ++expectedGameTableCount;
- LOAD_GT(sArtifactKnowledgeMultiplierGameTable, "ArtifactKnowledgeMultiplier.txt");
- LOAD_GT(sArtifactLevelXPGameTable, "ArtifactLevelXP.txt");
LOAD_GT(sBarberShopCostBaseGameTable, "BarberShopCostBase.txt");
- LOAD_GT(sBaseMPGameTable, "BaseMp.txt");
- LOAD_GT(sBattlePetXPGameTable, "BattlePetXP.txt");
+ LOAD_GT(sChanceToMeleeCritGameTable, "ChanceToMeleeCrit.txt");
+ LOAD_GT(sChanceToMeleeCritBaseGameTable, "ChanceToMeleeCritBase.txt");
+ LOAD_GT(sChanceToSpellCritGameTable, "ChanceToSpellCrit.txt");
+ LOAD_GT(sChanceToSpellCritBaseGameTable, "ChanceToSpellCritBase.txt");
LOAD_GT(sCombatRatingsGameTable, "CombatRatings.txt");
- LOAD_GT(sCombatRatingsMultByILvlGameTable, "CombatRatingsMultByILvl.txt");
- LOAD_GT(sItemSocketCostPerLevelGameTable, "ItemSocketCostPerLevel.txt");
- LOAD_GT(sHpPerStaGameTable, "HpPerSta.txt");
LOAD_GT(sNpcManaCostScalerGameTable, "NPCManaCostScaler.txt");
+ LOAD_GT(sOctBaseHpByClassGameTable, "OCTBaseHPByClass.txt");
+ LOAD_GT(sOctBaseMpByClassGameTable, "OCTBaseMPByClass.txt");
+ LOAD_GT(sOctClassCombatRazingScalarGameTable, "OCTClassCombatRatingScalar.txt");
+ LOAD_GT(sOctHpPerStaminaGameTable, "OCTHPPerStamina.txt");
+ LOAD_GT(sOctRegenHpGameTable, "OCTRegenHP.txt");
+ LOAD_GT(sOctRegenMpGameTable, "OCTRegenMP.txt");
+ LOAD_GT(sRegenHpPerSptTable, "RegenHPPerSpt.txt");
+ LOAD_GT(sRegenMpPerSptTable, "RegenMPPerSpt.txt");
+ LOAD_GT(sShieldBlockRegularTable, "ShieldBlockRegular.txt");
LOAD_GT(sSpellScalingGameTable, "SpellScaling.txt");
- LOAD_GT(sStaminaMultByILvlGameTable, "StaminaMultByILvl.txt");
- LOAD_GT(sXpGameTable, "xp.txt");
+ LOAD_GT(sTeamContributionPointsGameTable, "TeamContributionPoints.txt");
+
#undef LOAD_GT
@@ -144,30 +155,5 @@ void LoadGameTables(std::string const& dataPath)
template<class T>
float GetIlvlStatMultiplier(T const* row, InventoryType invType)
{
- switch (invType)
- {
- case INVTYPE_NECK:
- case INVTYPE_FINGER:
- return row->JewelryMultiplier;
- break;
- case INVTYPE_TRINKET:
- return row->TrinketMultiplier;
- break;
- case INVTYPE_WEAPON:
- case INVTYPE_SHIELD:
- case INVTYPE_RANGED:
- case INVTYPE_2HWEAPON:
- case INVTYPE_WEAPONMAINHAND:
- case INVTYPE_WEAPONOFFHAND:
- case INVTYPE_HOLDABLE:
- case INVTYPE_RANGEDRIGHT:
- return row->WeaponMultiplier;
- break;
- default:
- return row->ArmorMultiplier;
- break;
- }
+ return 1.0f;
}
-
-template float GetIlvlStatMultiplier(GtCombatRatingsMultByILvl const* row, InventoryType invType);
-template float GetIlvlStatMultiplier(GtStaminaMultByILvl const* row, InventoryType invType);
diff --git a/src/server/game/DataStores/GameTables.h b/src/server/game/DataStores/GameTables.h
index 188c9b74a65..14274061727 100644
--- a/src/server/game/DataStores/GameTables.h
+++ b/src/server/game/DataStores/GameTables.h
@@ -24,49 +24,74 @@
enum InventoryType : uint8;
-struct GtArtifactKnowledgeMultiplierEntry
-{
- float Multiplier = 0.0f;
-};
-
-struct GtArtifactLevelXPEntry
-{
- float XP = 0.0f;
- float XP2 = 0.0f;
-};
-
struct GtBarberShopCostBaseEntry
{
float Cost = 0.0f;
};
-struct GtBaseMPEntry
+struct GtChanceToMeleeCritEntry
{
- float Rogue = 0.0f;
- float Druid = 0.0f;
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
+};
+
+struct GtChanceToMeleeCritBaseEntry
+{
+ float Warrior = 0.0f;
float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
float Priest = 0.0f;
+ float DeathKnight = 0.0f;
float Shaman = 0.0f;
+ float Mage = 0.0f;
float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
+};
+
+struct GtChanceToSpellCritEntry
+{
float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
float Monk = 0.0f;
- float DemonHunter = 0.0f;
- float Evoker = 0.0f;
- float Adventurer = 0.0f;
+ float Druid = 0.0f;
};
-struct GtBattlePetXPEntry
+struct GtChanceToSpellCritBaseEntry
{
- float Wins = 0.0f;
- float Xp = 0.0f;
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
};
struct GtCombatRatingsEntry
{
- float Amplify = 0.0f;
+ float WeaponSkill = 0.0f;
float DefenseSkill = 0.0f;
float Dodge = 0.0f;
float Parry = 0.0f;
@@ -77,94 +102,176 @@ struct GtCombatRatingsEntry
float CritMelee = 0.0f;
float CritRanged = 0.0f;
float CritSpell = 0.0f;
- float Corruption = 0.0f;
- float CorruptionResistance = 0.0f;
- float Speed = 0.0f;
- float ResilienceCritTaken = 0.0f;
- float ResiliencePlayerDamage = 0.0f;
- float Lifesteal = 0.0f;
+ float HitTakenMelee = 0.0f;
+ float HitTakenRanged = 0.0f;
+ float HitTakenSpell = 0.0f;
+ float CritTakenMelee = 0.0f;
+ float CritTakenRanged = 0.0f;
+ float CritTakenSpell = 0.0f;
float HasteMelee = 0.0f;
float HasteRanged = 0.0f;
float HasteSpell = 0.0f;
- float Avoidance = 0.0f;
- float Sturdiness = 0.0f;
- float Unused7 = 0.0f;
- float Expertise = 0.0f;
- float ArmorPenetration = 0.0f;
- float Mastery = 0.0f;
- float PvPPower = 0.0f;
- float Cleave = 0.0f;
- float VersatilityDamageDone = 0.0f;
- float VersatilityHealingDone = 0.0f;
- float VersatilityDamageTaken = 0.0f;
- float Unused12 = 0.0f;
+ float Unknown1 = 0.0f;
+ float Unknown2 = 0.0f;
+ float Unknown3 = 0.0f;
+ float Unknown4 = 0.0f;
+ float Unknown5 = 0.0f;
+ float Unknown6 = 0.0f;
+ float Unknown7 = 0.0f;
+ float Unknown8 = 0.0f;
+ float Unknown9 = 0.0f;
+ float Unknown10 = 0.0f;
+ float Unknown11 = 0.0f;
+ float Unknown12 = 0.0f;
};
-struct GtCombatRatingsMultByILvl
+struct GtNpcManaCostScalerEntry
{
- float ArmorMultiplier = 0.0f;
- float WeaponMultiplier = 0.0f;
- float TrinketMultiplier = 0.0f;
- float JewelryMultiplier = 0.0f;
+ float Scaler = 0.0f;
};
-struct GtHpPerStaEntry
+struct GtOctBaseHpByClassEntry
{
- float Health = 0.0f;
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
};
-struct GtItemSocketCostPerLevelEntry
+struct GtOctBaseMpByClassEntry
{
- float SocketCost = 0.0f;
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
};
-struct GtNpcManaCostScalerEntry
+struct GtOctClassCombatRatingScalarEntry
{
- float Scaler = 0.0f;
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
};
-struct GtSpellScalingEntry
+struct GtOctHpPerStaminaEntry
+{
+ float Scalar = 0.0f;
+};
+
+struct GtOctRegenHpEntry
{
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
float Druid = 0.0f;
+};
+
+struct GtOctRegenMpEntry
+{
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
+};
+
+struct GtRegenHpPerSptEntry
+{
+ float Warrior = 0.0f;
float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
float Priest = 0.0f;
+ float DeathKnight = 0.0f;
float Shaman = 0.0f;
+ float Mage = 0.0f;
float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
+};
+
+struct GtRegenMpPerSptEntry
+{
float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
float Monk = 0.0f;
- float DemonHunter = 0.0f;
- float Evoker = 0.0f;
- float Adventurer = 0.0f;
- float Item = 0.0f;
- float Consumable = 0.0f;
- float Gem1 = 0.0f;
- float Gem2 = 0.0f;
- float Gem3 = 0.0f;
- float Health = 0.0f;
- float DamageReplaceStat = 0.0f;
- float DamageSecondary = 0.0f;
- float ManaConsumable = 0.0f;
+ float Druid = 0.0f;
};
-struct GtStaminaMultByILvl
+struct GtShieldBlockRegularEntry
{
- float ArmorMultiplier = 0.0f;
- float WeaponMultiplier = 0.0f;
- float TrinketMultiplier = 0.0f;
- float JewelryMultiplier = 0.0f;
+ float Poor = 0.0f;
+ float Standard = 0.0f;
+ float Good = 0.0f;
+ float Superior = 0.0f;
+ float Epic = 0.0f;
+ float Legendary = 0.0f;
+ float Artifact = 0.0f;
+ float ScalingStat = 0.0;
};
-struct GtXpEntry
+struct GtSpellScalingEntry
+{
+ float Warrior = 0.0f;
+ float Paladin = 0.0f;
+ float Hunter = 0.0f;
+ float Rogue = 0.0f;
+ float Priest = 0.0f;
+ float DeathKnight = 0.0f;
+ float Shaman = 0.0f;
+ float Mage = 0.0f;
+ float Warlock = 0.0f;
+ float Monk = 0.0f;
+ float Druid = 0.0f;
+ float Unknown1 = 0.0f;
+ float Unknown2 = 0.0f;
+};
+
+struct GtTeamContributionPointsEntry
{
- float Total = 0.0f;
- float PerKill = 0.0f;
- float Junk = 0.0f;
- float Stats = 0.0f;
- float Divisor = 0.0f;
+ float Value = 0.0f;
};
template<class T>
@@ -187,19 +294,24 @@ private:
std::vector<T> _data;
};
-TC_GAME_API extern GameTable<GtArtifactKnowledgeMultiplierEntry> sArtifactKnowledgeMultiplierGameTable;
-TC_GAME_API extern GameTable<GtArtifactLevelXPEntry> sArtifactLevelXPGameTable;
TC_GAME_API extern GameTable<GtBarberShopCostBaseEntry> sBarberShopCostBaseGameTable;
-TC_GAME_API extern GameTable<GtBaseMPEntry> sBaseMPGameTable;
-TC_GAME_API extern GameTable<GtBattlePetXPEntry> sBattlePetXPGameTable;
+TC_GAME_API extern GameTable<GtChanceToMeleeCritEntry> sChanceToMeleeCritGameTable;
+TC_GAME_API extern GameTable<GtChanceToMeleeCritBaseEntry> sChanceToMeleeCritBaseGameTable;
+TC_GAME_API extern GameTable<GtChanceToSpellCritEntry> sChanceToSpellCritGameTable;
+TC_GAME_API extern GameTable<GtChanceToSpellCritBaseEntry> sChanceToSpellCritBaseGameTable;
TC_GAME_API extern GameTable<GtCombatRatingsEntry> sCombatRatingsGameTable;
-TC_GAME_API extern GameTable<GtCombatRatingsMultByILvl> sCombatRatingsMultByILvlGameTable;
-TC_GAME_API extern GameTable<GtHpPerStaEntry> sHpPerStaGameTable;
-TC_GAME_API extern GameTable<GtItemSocketCostPerLevelEntry> sItemSocketCostPerLevelGameTable;
TC_GAME_API extern GameTable<GtNpcManaCostScalerEntry> sNpcManaCostScalerGameTable;
+TC_GAME_API extern GameTable<GtOctBaseHpByClassEntry> sOctBaseHpByClassGameTable;
+TC_GAME_API extern GameTable<GtOctBaseMpByClassEntry> sOctBaseMpByClassGameTable;
+TC_GAME_API extern GameTable<GtOctClassCombatRatingScalarEntry> sOctClassCombatRazingScalarGameTable;
+TC_GAME_API extern GameTable<GtOctHpPerStaminaEntry> sOctHpPerStaminaGameTable;
+TC_GAME_API extern GameTable<GtOctRegenHpEntry> sOctRegenHpGameTable;
+TC_GAME_API extern GameTable<GtOctRegenMpEntry> sOctRegenMpGameTable;
+TC_GAME_API extern GameTable<GtRegenHpPerSptEntry> sRegenHpPerSptTable;
+TC_GAME_API extern GameTable<GtRegenMpPerSptEntry> sRegenMpPerSptTable;
+TC_GAME_API extern GameTable<GtShieldBlockRegularEntry> sShieldBlockRegularTable;
TC_GAME_API extern GameTable<GtSpellScalingEntry> sSpellScalingGameTable;
-TC_GAME_API extern GameTable<GtStaminaMultByILvl> sStaminaMultByILvlGameTable;
-TC_GAME_API extern GameTable<GtXpEntry> sXpGameTable;
+TC_GAME_API extern GameTable<GtTeamContributionPointsEntry> sTeamContributionPointsGameTable;
TC_GAME_API void LoadGameTables(std::string const& dataPath);
@@ -230,12 +342,6 @@ inline float GetGameTableColumnForClass(T const* row, int32 class_)
return row->Monk;
case CLASS_DRUID:
return row->Druid;
- case CLASS_DEMON_HUNTER:
- return row->DemonHunter;
- case CLASS_EVOKER:
- return row->Evoker;
- case CLASS_ADVENTURER:
- return row->Adventurer;
default:
break;
}
@@ -269,31 +375,6 @@ inline float GetSpellScalingColumnForClass(GtSpellScalingEntry const* row, int32
return row->Monk;
case CLASS_DRUID:
return row->Druid;
- case CLASS_DEMON_HUNTER:
- return row->DemonHunter;
- case CLASS_EVOKER:
- return row->Evoker;
- case CLASS_ADVENTURER:
- return row->Adventurer;
- case -1:
- case -7:
- return row->Item;
- case -2:
- return row->Consumable;
- case -3:
- return row->Gem1;
- case -4:
- return row->Gem2;
- case -5:
- return row->Gem3;
- case -6:
- return row->Health;
- case -8:
- return row->DamageReplaceStat;
- case -9:
- return row->DamageSecondary;
- case -10:
- return row->ManaConsumable;
default:
break;
}
@@ -301,11 +382,6 @@ inline float GetSpellScalingColumnForClass(GtSpellScalingEntry const* row, int32
return 0.0f;
}
-inline float GetBattlePetXPPerLevel(GtBattlePetXPEntry const* row)
-{
- return row->Wins * row->Xp;
-}
-
template<class T>
float GetIlvlStatMultiplier(T const* row, InventoryType invType);
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 99a3abb6084..af82859acf1 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -2348,8 +2348,8 @@ float Item::GetItemStatValue(uint32 index, Player const* owner) const
if (float randomPropPoints = GetRandomPropertyPoints(itemLevel, GetQuality(), GetTemplate()->GetInventoryType(), GetTemplate()->GetSubClass()))
{
float statValue = float(_bonusData.StatPercentEditor[index] * randomPropPoints) * 0.0001f;
- if (GtItemSocketCostPerLevelEntry const* gtCost = sItemSocketCostPerLevelGameTable.GetRow(itemLevel))
- statValue -= float(int32(_bonusData.ItemStatSocketCostMultiplier[index] * gtCost->SocketCost));
+ //if (GtItemSocketCostPerLevelEntry const* gtCost = sItemSocketCostPerLevelGameTable.GetRow(itemLevel))
+ // statValue -= float(int32(_bonusData.ItemStatSocketCostMultiplier[index] * gtCost->SocketCost));
return statValue;
}
@@ -2638,8 +2638,8 @@ uint32 Item::GetTotalUnlockedArtifactPowers() const
do
{
uint64 xpCost = 0;
- if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(purchased + extraUnlocked + 1))
- xpCost = uint64(currentArtifactTier == MAX_ARTIFACT_TIER ? cost->XP2 : cost->XP);
+ //if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(purchased + extraUnlocked + 1))
+ // xpCost = uint64(currentArtifactTier == MAX_ARTIFACT_TIER ? cost->XP2 : cost->XP);
if (artifactXp < xpCost)
break;
@@ -2769,8 +2769,8 @@ void Item::GiveArtifactXp(uint64 amount, Item* sourceItem, uint32 artifactCatego
if (sourceItem && sourceItem->GetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL))
artifactKnowledgeLevel = sourceItem->GetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL);
- if (GtArtifactKnowledgeMultiplierEntry const* artifactKnowledge = sArtifactKnowledgeMultiplierGameTable.GetRow(artifactKnowledgeLevel))
- amount = uint64(amount * artifactKnowledge->Multiplier);
+ //if (GtArtifactKnowledgeMultiplierEntry const* artifactKnowledge = sArtifactKnowledgeMultiplierGameTable.GetRow(artifactKnowledgeLevel))
+ // amount = uint64(amount * artifactKnowledge->Multiplier);
if (amount >= 5000)
amount = 50 * (amount / 50);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index cbe9326ce91..296875faa06 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -5197,8 +5197,6 @@ inline float GetGameTableColumnForCombatRating(GtCombatRatingsEntry const* row,
{
switch (rating)
{
- case CR_AMPLIFY:
- return row->Amplify;
case CR_DEFENSE_SKILL:
return row->DefenseSkill;
case CR_DODGE:
@@ -5219,48 +5217,12 @@ inline float GetGameTableColumnForCombatRating(GtCombatRatingsEntry const* row,
return row->CritRanged;
case CR_CRIT_SPELL:
return row->CritSpell;
- case CR_CORRUPTION:
- return row->Corruption;
- case CR_CORRUPTION_RESISTANCE:
- return row->CorruptionResistance;
- case CR_SPEED:
- return row->Speed;
- case CR_RESILIENCE_CRIT_TAKEN:
- return row->ResilienceCritTaken;
- case CR_RESILIENCE_PLAYER_DAMAGE:
- return row->ResiliencePlayerDamage;
- case CR_LIFESTEAL:
- return row->Lifesteal;
case CR_HASTE_MELEE:
return row->HasteMelee;
case CR_HASTE_RANGED:
return row->HasteRanged;
case CR_HASTE_SPELL:
return row->HasteSpell;
- case CR_AVOIDANCE:
- return row->Avoidance;
- case CR_STURDINESS:
- return row->Sturdiness;
- case CR_UNUSED_7:
- return row->Unused7;
- case CR_EXPERTISE:
- return row->Expertise;
- case CR_ARMOR_PENETRATION:
- return row->ArmorPenetration;
- case CR_MASTERY:
- return row->Mastery;
- case CR_PVP_POWER:
- return row->PvPPower;
- case CR_CLEAVE:
- return row->Cleave;
- case CR_VERSATILITY_DAMAGE_DONE:
- return row->VersatilityDamageDone;
- case CR_VERSATILITY_HEALING_DONE:
- return row->VersatilityHealingDone;
- case CR_VERSATILITY_DAMAGE_TAKEN:
- return row->VersatilityDamageTaken;
- case CR_UNUSED_12:
- return row->Unused12;
default:
break;
}
@@ -7885,8 +7847,8 @@ void Player::_ApplyItemBonuses(Item* item, uint8 slot, bool apply)
uint32 itemLevel = item->GetItemLevel(this);
float combatRatingMultiplier = 1.0f;
- if (GtCombatRatingsMultByILvl const* ratingMult = sCombatRatingsMultByILvlGameTable.GetRow(itemLevel))
- combatRatingMultiplier = GetIlvlStatMultiplier(ratingMult, proto->GetInventoryType());
+ //if (GtCombatRatingsMultByILvl const* ratingMult = sCombatRatingsMultByILvlGameTable.GetRow(itemLevel))
+ // combatRatingMultiplier = GetIlvlStatMultiplier(ratingMult, proto->GetInventoryType());
for (uint8 i = 0; i < MAX_ITEM_PROTO_STATS; ++i)
{
@@ -7924,8 +7886,8 @@ void Player::_ApplyItemBonuses(Item* item, uint8 slot, bool apply)
// break;
case ITEM_MOD_STAMINA: //modify stamina
{
- if (GtStaminaMultByILvl const* staminaMult = sStaminaMultByILvlGameTable.GetRow(itemLevel))
- val = int32(val * GetIlvlStatMultiplier(staminaMult, proto->GetInventoryType()));
+ //if (GtStaminaMultByILvl const* staminaMult = sStaminaMultByILvlGameTable.GetRow(itemLevel))
+ // val = int32(val * GetIlvlStatMultiplier(staminaMult, proto->GetInventoryType()));
HandleStatFlatModifier(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(val), apply);
UpdateStatBuffMod(STAT_STAMINA);
break;
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 5f97bb49a7c..b07e7d625e9 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -280,8 +280,8 @@ float Player::GetHealthBonusFromStamina() const
{
// Taken from PaperDollFrame.lua - 6.0.3.19085
float ratio = 10.0f;
- if (GtHpPerStaEntry const* hpBase = sHpPerStaGameTable.GetRow(GetLevel()))
- ratio = hpBase->Health;
+ if (GtOctHpPerStaminaEntry const* hpBase = sOctHpPerStaminaGameTable.GetRow(GetLevel()))
+ ratio = hpBase->Scalar;
float stamina = GetStat(STAT_STAMINA);
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 0f4c7112e8e..0f63ab58c88 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4311,18 +4311,15 @@ void ObjectMgr::LoadPlayerInfo()
{
uint32 oldMSTime = getMSTime();
- _playerXPperLevel.resize(sXpGameTable.GetTableRowCount(), 0);
+ _playerXPperLevel.resize(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
+ for (uint8 level = 0; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
+ _playerXPperLevel[level] = 0;
// 0 1
QueryResult result = WorldDatabase.Query("SELECT Level, Experience FROM player_xp_for_level");
- // load the DBC's levels at first...
- for (uint32 level = 1; level < sXpGameTable.GetTableRowCount(); ++level)
- _playerXPperLevel[level] = sXpGameTable.GetRow(level)->Total;
-
uint32 count = 0;
- // ...overwrite if needed (custom values)
if (result)
{
do
@@ -4355,7 +4352,7 @@ void ObjectMgr::LoadPlayerInfo()
if (_playerXPperLevel[level] == 0)
{
TC_LOG_ERROR("sql.sql", "Level {} does not have XP for level data. Using data of level [{}] + 12000.", level + 1, level);
- _playerXPperLevel[level] = _playerXPperLevel[level - 1] + 12000;
+ _playerXPperLevel[level] = _playerXPperLevel[level - 1] + 100;
}
}
@@ -4371,7 +4368,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& base
if (level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
level = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
- GtBaseMPEntry const* mp = sBaseMPGameTable.GetRow(level);
+ GtOctBaseMpByClassEntry const* mp = sOctBaseMpByClassGameTable.GetRow(level);
if (!mp)
{
TC_LOG_ERROR("misc", "Tried to get non-existant Class-Level combination data for base hp/mp. Class {} Level {}", class_, level);
diff --git a/src/server/game/Handlers/ArtifactHandler.cpp b/src/server/game/Handlers/ArtifactHandler.cpp
index 66d94b955c3..2412a20a9ac 100644
--- a/src/server/game/Handlers/ArtifactHandler.cpp
+++ b/src/server/game/Handlers/ArtifactHandler.cpp
@@ -38,8 +38,8 @@ void WorldSession::HandleArtifactAddPower(WorldPackets::Artifact::ArtifactAddPow
uint32 currentArtifactTier = artifact->GetModifier(ITEM_MODIFIER_ARTIFACT_TIER);
uint64 xpCost = 0;
- if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(artifact->GetTotalPurchasedArtifactPowers() + 1))
- xpCost = uint64(currentArtifactTier == MAX_ARTIFACT_TIER ? cost->XP2 : cost->XP);
+ //if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(artifact->GetTotalPurchasedArtifactPowers() + 1))
+ // xpCost = uint64(currentArtifactTier == MAX_ARTIFACT_TIER ? cost->XP2 : cost->XP);
if (xpCost > artifact->m_itemData->ArtifactXP)
return;
@@ -208,16 +208,19 @@ void WorldSession::HandleConfirmArtifactRespec(WorldPackets::Artifact::ConfirmAr
return;
uint64 xpCost = 0;
- if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(artifact->GetTotalPurchasedArtifactPowers() + 1))
- xpCost = uint64(artifact->GetModifier(ITEM_MODIFIER_ARTIFACT_TIER) == 1 ? cost->XP2 : cost->XP);
+ //if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(artifact->GetTotalPurchasedArtifactPowers() + 1))
+ // xpCost = uint64(artifact->GetModifier(ITEM_MODIFIER_ARTIFACT_TIER) == 1 ? cost->XP2 : cost->XP);
if (xpCost > artifact->m_itemData->ArtifactXP)
return;
uint64 newAmount = artifact->m_itemData->ArtifactXP - xpCost;
+
+ /*
for (uint32 i = 0; i <= artifact->GetTotalPurchasedArtifactPowers(); ++i)
if (GtArtifactLevelXPEntry const* cost = sArtifactLevelXPGameTable.GetRow(i))
newAmount += uint64(artifact->GetModifier(ITEM_MODIFIER_ARTIFACT_TIER) == 1 ? cost->XP2 : cost->XP);
+ */
for (UF::ArtifactPower const& artifactPower : artifact->m_itemData->ArtifactPowers)
{
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 6a1f5d1540a..5cde7ae1a95 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -138,6 +138,9 @@ namespace Trinity
inline uint32 BaseGain(uint8 pl_level, uint8 mob_level)
{
+ return 0;
+
+ /*
uint32 baseGain;
GtXpEntry const* xpPlayer = sXpGameTable.GetRow(pl_level);
@@ -172,6 +175,7 @@ namespace Trinity
sScriptMgr->OnBaseGainCalculation(baseGain, pl_level, mob_level);
return baseGain;
+ */
}
inline uint32 Gain(Player* player, Unit* u, bool isBattleGround = false)
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 6f86e41ac45..4df6b83d89c 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -596,6 +596,7 @@ int32 SpellEffectInfo::CalcBaseValue(WorldObject const* caster, Unit const* targ
else
value = GetSpellScalingColumnForClass(sSpellScalingGameTable.GetRow(level), Scaling.Class);
+ /*
if (Scaling.Class == -7)
if (GtCombatRatingsMultByILvl const* ratingMult = sCombatRatingsMultByILvlGameTable.GetRow(effectiveItemLevel))
if (ItemSparseEntry const* itemSparse = sItemSparseStore.LookupEntry(itemId))
@@ -605,6 +606,7 @@ int32 SpellEffectInfo::CalcBaseValue(WorldObject const* caster, Unit const* targ
if (GtStaminaMultByILvl const* staminaMult = sStaminaMultByILvlGameTable.GetRow(effectiveItemLevel))
if (ItemSparseEntry const* itemSparse = sItemSparseStore.LookupEntry(itemId))
value *= GetIlvlStatMultiplier(staminaMult, InventoryType(itemSparse->InventoryType));
+ */
}
value *= Scaling.Coefficient;
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index a12dbb21317..1288955a3d9 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -1334,7 +1334,7 @@ void ExtractGameTables()
{
{ 1391663, "BarberShopCostBase.txt" },
{ 3999262, "ChanceToMeleeCrit.txt" },
- { 3999263, "ChanceToMeleeCritbase.txt" },
+ { 3999263, "ChanceToMeleeCritBase.txt" },
{ 3999265, "ChanceToSpellCrit.txt" },
{ 3999264, "ChanceToSpellCritBase.txt" },
{ 1391669, "CombatRatings.txt" },