mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 04:42:10 +01:00
Core/DataStores: Load UnitCondition.db2
This commit is contained in:
37
sql/updates/hotfixes/master/2022_01_14_00_hotfixes.sql
Normal file
37
sql/updates/hotfixes/master/2022_01_14_00_hotfixes.sql
Normal file
@@ -0,0 +1,37 @@
|
||||
--
|
||||
-- Table structure for table `unit_condition`
|
||||
--
|
||||
DROP TABLE IF EXISTS `unit_condition`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `unit_condition` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Flags` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable1` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable2` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable3` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable4` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable5` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable6` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable7` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Variable8` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Op1` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op2` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op3` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op4` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op5` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op6` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op7` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Op8` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`Value1` int(11) NOT NULL DEFAULT '0',
|
||||
`Value2` int(11) NOT NULL DEFAULT '0',
|
||||
`Value3` int(11) NOT NULL DEFAULT '0',
|
||||
`Value4` int(11) NOT NULL DEFAULT '0',
|
||||
`Value5` int(11) NOT NULL DEFAULT '0',
|
||||
`Value6` int(11) NOT NULL DEFAULT '0',
|
||||
`Value7` int(11) NOT NULL DEFAULT '0',
|
||||
`Value8` 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 */;
|
||||
@@ -1669,6 +1669,12 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"BottomLeftFeatureTitle_lang, BottomLeftFeatureDesc_lang, RightFeatureTitle_lang, RightFeatureDesc_lang FROM ui_splash_screen_locale"
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// UnitCondition.db2
|
||||
PrepareStatement(HOTFIX_SEL_UNIT_CONDITION, "SELECT ID, Flags, Variable1, Variable2, Variable3, Variable4, Variable5, Variable6, Variable7, "
|
||||
"Variable8, Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8 FROM unit_condition"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_UNIT_CONDITION, "SELECT MAX(ID) + 1 FROM unit_condition", CONNECTION_SYNCH);
|
||||
|
||||
// UnitPowerBar.db2
|
||||
PrepareStatement(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, Name, Cost, OutOfError, ToolTip, MinPower, MaxPower, StartPower, CenterPower, "
|
||||
"RegenerationPeace, RegenerationCombat, BarType, Flags, StartInset, EndInset, FileDataID1, FileDataID2, FileDataID3, FileDataID4, "
|
||||
|
||||
@@ -969,6 +969,9 @@ enum HotfixDatabaseStatements : uint32
|
||||
HOTFIX_SEL_UI_SPLASH_SCREEN_MAX_ID,
|
||||
HOTFIX_SEL_UI_SPLASH_SCREEN_LOCALE,
|
||||
|
||||
HOTFIX_SEL_UNIT_CONDITION,
|
||||
HOTFIX_SEL_UNIT_CONDITION_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_UNIT_POWER_BAR,
|
||||
HOTFIX_SEL_UNIT_POWER_BAR_MAX_ID,
|
||||
HOTFIX_SEL_UNIT_POWER_BAR_LOCALE,
|
||||
|
||||
@@ -6403,6 +6403,44 @@ struct UiSplashScreenLoadInfo
|
||||
}
|
||||
};
|
||||
|
||||
struct UnitConditionLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
{
|
||||
static DB2FieldMeta const fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_BYTE, "Flags" },
|
||||
{ false, FT_BYTE, "Variable1" },
|
||||
{ false, FT_BYTE, "Variable2" },
|
||||
{ false, FT_BYTE, "Variable3" },
|
||||
{ false, FT_BYTE, "Variable4" },
|
||||
{ false, FT_BYTE, "Variable5" },
|
||||
{ false, FT_BYTE, "Variable6" },
|
||||
{ false, FT_BYTE, "Variable7" },
|
||||
{ false, FT_BYTE, "Variable8" },
|
||||
{ true, FT_BYTE, "Op1" },
|
||||
{ true, FT_BYTE, "Op2" },
|
||||
{ true, FT_BYTE, "Op3" },
|
||||
{ true, FT_BYTE, "Op4" },
|
||||
{ true, FT_BYTE, "Op5" },
|
||||
{ true, FT_BYTE, "Op6" },
|
||||
{ true, FT_BYTE, "Op7" },
|
||||
{ true, FT_BYTE, "Op8" },
|
||||
{ true, FT_INT, "Value1" },
|
||||
{ true, FT_INT, "Value2" },
|
||||
{ true, FT_INT, "Value3" },
|
||||
{ true, FT_INT, "Value4" },
|
||||
{ true, FT_INT, "Value5" },
|
||||
{ true, FT_INT, "Value6" },
|
||||
{ true, FT_INT, "Value7" },
|
||||
{ true, FT_INT, "Value8" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, UnitConditionMeta::Instance(), HOTFIX_SEL_UNIT_CONDITION);
|
||||
return &loadInfo;
|
||||
}
|
||||
};
|
||||
|
||||
struct UnitPowerBarLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
|
||||
@@ -326,6 +326,7 @@ DB2Storage<UiMapAssignmentEntry> sUiMapAssignmentStore("UiMapAssi
|
||||
DB2Storage<UiMapLinkEntry> sUiMapLinkStore("UiMapLink.db2", UiMapLinkLoadInfo::Instance());
|
||||
DB2Storage<UiMapXMapArtEntry> sUiMapXMapArtStore("UiMapXMapArt.db2", UiMapXMapArtLoadInfo::Instance());
|
||||
DB2Storage<UISplashScreenEntry> sUISplashScreenStore("UISplashScreen.db2", UiSplashScreenLoadInfo::Instance());
|
||||
DB2Storage<UnitConditionEntry> sUnitConditionStore("UnitCondition.db2", UnitConditionLoadInfo::Instance());
|
||||
DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarLoadInfo::Instance());
|
||||
DB2Storage<VehicleEntry> sVehicleStore("Vehicle.db2", VehicleLoadInfo::Instance());
|
||||
DB2Storage<VehicleSeatEntry> sVehicleSeatStore("VehicleSeat.db2", VehicleSeatLoadInfo::Instance());
|
||||
@@ -898,6 +899,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
LOAD_DB2(sUiMapLinkStore);
|
||||
LOAD_DB2(sUiMapXMapArtStore);
|
||||
LOAD_DB2(sUISplashScreenStore);
|
||||
LOAD_DB2(sUnitConditionStore);
|
||||
LOAD_DB2(sUnitPowerBarStore);
|
||||
LOAD_DB2(sVehicleStore);
|
||||
LOAD_DB2(sVehicleSeatStore);
|
||||
|
||||
@@ -242,6 +242,7 @@ TC_GAME_API extern DB2Storage<TransportAnimationEntry> sTransportAn
|
||||
TC_GAME_API extern DB2Storage<TransportRotationEntry> sTransportRotationStore;
|
||||
TC_GAME_API extern DB2Storage<UiMapEntry> sUiMapStore;
|
||||
TC_GAME_API extern DB2Storage<UISplashScreenEntry> sUISplashScreenStore;
|
||||
TC_GAME_API extern DB2Storage<UnitConditionEntry> sUnitConditionStore;
|
||||
TC_GAME_API extern DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore;
|
||||
TC_GAME_API extern DB2Storage<VehicleEntry> sVehicleStore;
|
||||
TC_GAME_API extern DB2Storage<VehicleSeatEntry> sVehicleSeatStore;
|
||||
|
||||
@@ -3871,6 +3871,15 @@ struct UISplashScreenEntry
|
||||
int32 RequiredTimeEventPassed; // serverside TimeEvent table, see ModifierTreeType::HasTimeEventPassed
|
||||
};
|
||||
|
||||
struct UnitConditionEntry
|
||||
{
|
||||
uint32 ID;
|
||||
uint8 Flags;
|
||||
uint8 Variable[8];
|
||||
int8 Op[8];
|
||||
int32 Value[8];
|
||||
};
|
||||
|
||||
struct UnitPowerBarEntry
|
||||
{
|
||||
uint32 ID;
|
||||
|
||||
Reference in New Issue
Block a user