mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/DataStores: load ScalingStatDistribution.db2 and ScalingStatValues.db2
This commit is contained in:
91
sql/updates/hotfixes/3.4.x/2023_11_23_00_hotfixes.sql
Normal file
91
sql/updates/hotfixes/3.4.x/2023_11_23_00_hotfixes.sql
Normal file
@@ -0,0 +1,91 @@
|
||||
--
|
||||
-- Table structure for table `scaling_stat_distribution`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `scaling_stat_distribution`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `scaling_stat_distribution` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`PlayerLevelToItemLevelCurveID` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`MinLevel` int(11) NOT NULL DEFAULT '0',
|
||||
`MaxLevel` int(11) NOT NULL DEFAULT '0',
|
||||
`Bonus1` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus2` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus3` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus4` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus5` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus6` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus7` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus8` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus9` int(10) NOT NULL DEFAULT '0',
|
||||
`Bonus10` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID1` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID2` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID3` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID4` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID5` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID6` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID7` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID8` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID9` int(10) NOT NULL DEFAULT '0',
|
||||
`StatID10` int(10) NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `scaling_stat_distribution`
|
||||
--
|
||||
|
||||
LOCK TABLES `scaling_stat_distribution` WRITE;
|
||||
/*!40000 ALTER TABLE `scaling_stat_distribution` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `scaling_stat_distribution` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `scaling_stat_values`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `scaling_stat_values`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `scaling_stat_values` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Charlevel` int(11) NOT NULL DEFAULT '0',
|
||||
`WeaponDPS1H` int(11) NOT NULL DEFAULT '0',
|
||||
`WeaponDPS2h` int(11) NOT NULL DEFAULT '0',
|
||||
`SpellcasterDPS1H` int(11) NOT NULL DEFAULT '0',
|
||||
`SpellcasterDPS2H` int(11) NOT NULL DEFAULT '0',
|
||||
`RangedDPS` int(11) NOT NULL DEFAULT '0',
|
||||
`WandDPS` int(11) NOT NULL DEFAULT '0',
|
||||
`SpellPower` int(11) NOT NULL DEFAULT '0',
|
||||
`ShoulderBudget` int(11) NOT NULL DEFAULT '0',
|
||||
`TrinketBudget` int(11) NOT NULL DEFAULT '0',
|
||||
`WeaponBudget` int(11) NOT NULL DEFAULT '0',
|
||||
`PrimaryBudget` int(11) NOT NULL DEFAULT '0',
|
||||
`RangedBudget` int(11) NOT NULL DEFAULT '0',
|
||||
`TertiaryBudget` int(11) NOT NULL DEFAULT '0',
|
||||
`ClothShoulderArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`LeatherShoulderArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`MailShoulderArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`PlateShoulderArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`ClothCloakArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`ClothChestArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`LeatherChestArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`MailChestArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`PlateChestArmor` int(11) NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `scaling_stat_values`
|
||||
--
|
||||
|
||||
LOCK TABLES `scaling_stat_values` WRITE;
|
||||
/*!40000 ALTER TABLE `scaling_stat_values` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `scaling_stat_values` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
@@ -1320,6 +1320,19 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_SCENARIO_STEP, "SELECT ID, Description_lang, Title_lang FROM scenario_step_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// ScalingStatDistribution.db2
|
||||
PrepareStatement(HOTFIX_SEL_SCALING_STAT_DISTRIBUTION, "SELECT ID, PlayerLevelToItemLevelCurveID, MinLevel, MaxLevel, Bonus1, Bonus2, Bonus3, "
|
||||
"Bonus4, Bonus5, Bonus6, Bonus7, Bonus8, Bonus9, Bonus10, StatID1, StatID2, StatID3, StatID4, StatID5, StatID6, StatID7, StatID8, StatID9, "
|
||||
"StatID10 FROM scaling_stat_distribution WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SCALING_STAT_DISTRIBUTION, "SELECT MAX(ID) + 1 FROM scaling_stat_distribution", CONNECTION_SYNCH);
|
||||
|
||||
// ScalingStatValues.db2
|
||||
PrepareStatement(HOTFIX_SEL_SCALING_STAT_VALUES, "SELECT ID, Charlevel, WeaponDPS1H, WeaponDPS2h, SpellcasterDPS1H, SpellcasterDPS2H, RangedDPS, "
|
||||
"WandDPS, SpellPower, ShoulderBudget, TrinketBudget, WeaponBudget, PrimaryBudget, RangedBudget, TertiaryBudget, ClothShoulderArmor, "
|
||||
"LeatherShoulderArmor, MailShoulderArmor, PlateShoulderArmor, ClothCloakArmor, ClothChestArmor, LeatherChestArmor, MailChestArmor, "
|
||||
"PlateChestArmor FROM scaling_stat_values WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SCALING_STAT_VALUES, "SELECT MAX(ID) + 1 FROM scaling_stat_values", CONNECTION_SYNCH);
|
||||
|
||||
// SceneScript.db2
|
||||
PrepareStatement(HOTFIX_SEL_SCENE_SCRIPT, "SELECT ID, FirstSceneScriptID, NextSceneScriptID, Unknown915 FROM scene_script"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
|
||||
@@ -763,6 +763,12 @@ enum HotfixDatabaseStatements : uint32
|
||||
HOTFIX_SEL_SCENARIO_STEP_MAX_ID,
|
||||
HOTFIX_SEL_SCENARIO_STEP_LOCALE,
|
||||
|
||||
HOTFIX_SEL_SCALING_STAT_DISTRIBUTION,
|
||||
HOTFIX_SEL_SCALING_STAT_DISTRIBUTION_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_SCALING_STAT_VALUES,
|
||||
HOTFIX_SEL_SCALING_STAT_VALUES_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_SCENE_SCRIPT,
|
||||
HOTFIX_SEL_SCENE_SCRIPT_MAX_ID,
|
||||
|
||||
|
||||
@@ -4359,6 +4359,72 @@ struct ScenarioStepLoadInfo
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 12, &ScenarioStepMeta::Instance, HOTFIX_SEL_SCENARIO_STEP };
|
||||
};
|
||||
|
||||
struct ScalingStatDistributionLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[24] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_SHORT, "PlayerLevelToItemLevelCurveID" },
|
||||
{ true, FT_INT, "MinLevel" },
|
||||
{ true, FT_INT, "MaxLevel" },
|
||||
{ true, FT_INT, "Bonus1" },
|
||||
{ true, FT_INT, "Bonus2" },
|
||||
{ true, FT_INT, "Bonus3" },
|
||||
{ true, FT_INT, "Bonus4" },
|
||||
{ true, FT_INT, "Bonus5" },
|
||||
{ true, FT_INT, "Bonus6" },
|
||||
{ true, FT_INT, "Bonus7" },
|
||||
{ true, FT_INT, "Bonus8" },
|
||||
{ true, FT_INT, "Bonus9" },
|
||||
{ true, FT_INT, "Bonus10" },
|
||||
{ true, FT_INT, "StatID1" },
|
||||
{ true, FT_INT, "StatID2" },
|
||||
{ true, FT_INT, "StatID3" },
|
||||
{ true, FT_INT, "StatID4" },
|
||||
{ true, FT_INT, "StatID5" },
|
||||
{ true, FT_INT, "StatID6" },
|
||||
{ true, FT_INT, "StatID7" },
|
||||
{ true, FT_INT, "StatID8" },
|
||||
{ true, FT_INT, "StatID9" },
|
||||
{ true, FT_INT, "StatID10" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 24, &ScalingStatDistributionMeta::Instance, HOTFIX_SEL_SCALING_STAT_DISTRIBUTION };
|
||||
};
|
||||
|
||||
struct ScalingStatValuesLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[24] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "Charlevel" },
|
||||
{ true, FT_INT, "WeaponDPS1H" },
|
||||
{ true, FT_INT, "WeaponDPS2h" },
|
||||
{ true, FT_INT, "SpellcasterDPS1H" },
|
||||
{ true, FT_INT, "SpellcasterDPS2H" },
|
||||
{ true, FT_INT, "RangedDPS" },
|
||||
{ true, FT_INT, "WandDPS" },
|
||||
{ true, FT_INT, "SpellPower" },
|
||||
{ true, FT_INT, "ShoulderBudget" },
|
||||
{ true, FT_INT, "TrinketBudget" },
|
||||
{ true, FT_INT, "WeaponBudget" },
|
||||
{ true, FT_INT, "PrimaryBudget" },
|
||||
{ true, FT_INT, "RangedBudget" },
|
||||
{ true, FT_INT, "TertiaryBudget" },
|
||||
{ true, FT_INT, "ClothShoulderArmor" },
|
||||
{ true, FT_INT, "LeatherShoulderArmor" },
|
||||
{ true, FT_INT, "MailShoulderArmor" },
|
||||
{ true, FT_INT, "PlateShoulderArmor" },
|
||||
{ true, FT_INT, "ClothCloakArmor" },
|
||||
{ true, FT_INT, "ClothChestArmor" },
|
||||
{ true, FT_INT, "LeatherChestArmor" },
|
||||
{ true, FT_INT, "MailChestArmor" },
|
||||
{ true, FT_INT, "PlateChestArmor" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 24, &ScalingStatValuesMeta::Instance, HOTFIX_SEL_SCALING_STAT_VALUES };
|
||||
};
|
||||
|
||||
struct SceneScriptLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[4] =
|
||||
|
||||
@@ -258,6 +258,8 @@ DB2Storage<RandPropPointsEntry> sRandPropPointsStore("RandPropPo
|
||||
DB2Storage<RewardPackEntry> sRewardPackStore("RewardPack.db2", &RewardPackLoadInfo::Instance);
|
||||
DB2Storage<RewardPackXCurrencyTypeEntry> sRewardPackXCurrencyTypeStore("RewardPackXCurrencyType.db2", &RewardPackXCurrencyTypeLoadInfo::Instance);
|
||||
DB2Storage<RewardPackXItemEntry> sRewardPackXItemStore("RewardPackXItem.db2", &RewardPackXItemLoadInfo::Instance);
|
||||
DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore("ScalingStatDistribution.db2", &ScalingStatDistributionLoadInfo::Instance);
|
||||
DB2Storage<ScalingStatValuesEntry> sScalingStatValuesStore("ScalingStatValues.db2", &ScalingStatValuesLoadInfo::Instance);
|
||||
DB2Storage<ScenarioEntry> sScenarioStore("Scenario.db2", &ScenarioLoadInfo::Instance);
|
||||
DB2Storage<ScenarioStepEntry> sScenarioStepStore("ScenarioStep.db2", &ScenarioStepLoadInfo::Instance);
|
||||
DB2Storage<SceneScriptEntry> sSceneScriptStore("SceneScript.db2", &SceneScriptLoadInfo::Instance);
|
||||
@@ -828,6 +830,8 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
LOAD_DB2(sRewardPackStore);
|
||||
LOAD_DB2(sRewardPackXCurrencyTypeStore);
|
||||
LOAD_DB2(sRewardPackXItemStore);
|
||||
LOAD_DB2(sScalingStatDistributionStore);
|
||||
LOAD_DB2(sScalingStatValuesStore);
|
||||
LOAD_DB2(sScenarioStore);
|
||||
LOAD_DB2(sScenarioStepStore);
|
||||
LOAD_DB2(sSceneScriptStore);
|
||||
|
||||
@@ -206,6 +206,8 @@ TC_GAME_API extern DB2Storage<RewardPackEntry> sRewardPackS
|
||||
TC_GAME_API extern DB2Storage<ScenarioEntry> sScenarioStore;
|
||||
TC_GAME_API extern DB2Storage<ScenarioStepEntry> sScenarioStepStore;
|
||||
TC_GAME_API extern DB2Storage<SkillLineEntry> sSkillLineStore;
|
||||
TC_GAME_API extern DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore;
|
||||
TC_GAME_API extern DB2Storage<ScalingStatValuesEntry> sScalingStatValuesStore;
|
||||
TC_GAME_API extern DB2Storage<SceneScriptPackageEntry> sSceneScriptPackageStore;
|
||||
TC_GAME_API extern DB2Storage<ServerMessagesEntry> sServerMessagesStore;
|
||||
TC_GAME_API extern DB2Storage<SkillLineAbilityEntry> sSkillLineAbilityStore;
|
||||
|
||||
@@ -3153,6 +3153,44 @@ struct ScenarioStepEntry
|
||||
}
|
||||
};
|
||||
|
||||
struct ScalingStatDistributionEntry
|
||||
{
|
||||
uint32 ID;
|
||||
uint16 PlayerLevelToItemLevelCurveID;
|
||||
int32 MinLevel;
|
||||
int32 MaxLevel;
|
||||
std::array<int32, 10> Bonus;
|
||||
std::array<int32, 10> StatID;
|
||||
};
|
||||
|
||||
struct ScalingStatValuesEntry
|
||||
{
|
||||
uint32 ID;
|
||||
int32 Charlevel;
|
||||
int32 WeaponDPS1H;
|
||||
int32 WeaponDPS2h;
|
||||
int32 SpellcasterDPS1H;
|
||||
int32 SpellcasterDPS2H;
|
||||
int32 RangedDPS;
|
||||
int32 WandDPS;
|
||||
int32 SpellPower;
|
||||
int32 ShoulderBudget;
|
||||
int32 TrinketBudget;
|
||||
int32 WeaponBudget;
|
||||
int32 PrimaryBudget;
|
||||
int32 RangedBudget;
|
||||
int32 TertiaryBudget;
|
||||
int32 ClothShoulderArmor;
|
||||
int32 LeatherShoulderArmor;
|
||||
int32 MailShoulderArmor;
|
||||
int32 PlateShoulderArmor;
|
||||
int32 ClothCloakArmor;
|
||||
int32 ClothChestArmor;
|
||||
int32 LeatherChestArmor;
|
||||
int32 MailChestArmor;
|
||||
int32 PlateChestArmor;
|
||||
};
|
||||
|
||||
struct SceneScriptEntry
|
||||
{
|
||||
uint32 ID;
|
||||
|
||||
Reference in New Issue
Block a user