Core/DataStores: Updated to 12.1.0
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
ALTER TABLE `criteria`
|
||||
MODIFY COLUMN `ModifierTreeId` int NOT NULL DEFAULT 0 AFTER `Asset`,
|
||||
MODIFY COLUMN `StartTimer` int NOT NULL DEFAULT 0 AFTER `StartAsset`,
|
||||
MODIFY COLUMN `EligibilityWorldStateID` int NOT NULL DEFAULT 0 AFTER `Flags`,
|
||||
MODIFY COLUMN `EligibilityWorldStateValue` int NOT NULL DEFAULT 0 AFTER `EligibilityWorldStateID`;
|
||||
|
||||
ALTER TABLE `gameobjects` ADD COLUMN `Flags` int NOT NULL DEFAULT 0 AFTER `DisplayID`;
|
||||
|
||||
ALTER TABLE `garr_ability` MODIFY COLUMN `GarrFollowerTypeID` tinyint UNSIGNED NOT NULL DEFAULT 0 AFTER `GarrAbilityCategoryID`;
|
||||
|
||||
ALTER TABLE `garr_follower` MODIFY COLUMN `GarrFollowerTypeID` tinyint UNSIGNED NOT NULL DEFAULT 0 AFTER `GarrTypeID`;
|
||||
|
||||
ALTER TABLE `garr_mission` MODIFY COLUMN `GarrFollowerTypeID` tinyint UNSIGNED NOT NULL DEFAULT 0 AFTER `GarrMissionTypeID`;
|
||||
|
||||
ALTER TABLE `gossip_npc_option` MODIFY COLUMN `GarrFollowerTypeID` tinyint UNSIGNED NOT NULL DEFAULT 0 AFTER `TrainerID`;
|
||||
|
||||
ALTER TABLE `player_condition`
|
||||
CHANGE COLUMN `MovementFlags1` `MovementFlags` int NOT NULL DEFAULT 0 AFTER `PowerTypeValue`,
|
||||
DROP COLUMN `MovementFlags2`;
|
||||
|
||||
ALTER TABLE `spell_class_options` MODIFY COLUMN `SpellClassSet` int NOT NULL DEFAULT 0 AFTER `ModalNextSpell`;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0xC68BE365 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0xC68BE365); -- CooldownSet
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x4BF2FC04 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x4BF2FC04); -- CooldownSetSpell
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x284224BE AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x284224BE); -- CraftingQualityAtlasSet
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x803704B6 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x803704B6); -- EdgeGlowEffect
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x6FF1C5BA AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x6FF1C5BA); -- ExteriorComponent
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x137145D0 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x137145D0); -- HouseDecor
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0xBBA2E8F8 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0xBBA2E8F8); -- HouseRoom
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0xF5D19E56 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0xF5D19E56); -- ItemConversion
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x192B936F AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x192B936F); -- PlayerCompanionInfo
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0xB33F3964 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0xB33F3964); -- ScreenEffect
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0x1EF95B83 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0x1EF95B83); -- SeamlessSite
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash`=0xF8685781 AND `RecordId` IN (SELECT `RecordId` FROM `hotfix_blob` WHERE `TableHash`=0xF8685781); -- SpellActivationOverlay
|
||||
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0xC68BE365; -- CooldownSet
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x4BF2FC04; -- CooldownSetSpell
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x284224BE; -- CraftingQualityAtlasSet
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x803704B6; -- EdgeGlowEffect
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x6FF1C5BA; -- ExteriorComponent
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x137145D0; -- HouseDecor
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0xBBA2E8F8; -- HouseRoom
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0xF5D19E56; -- ItemConversion
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x192B936F; -- PlayerCompanionInfo
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0xB33F3964; -- ScreenEffect
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0x1EF95B83; -- SeamlessSite
|
||||
DELETE FROM `hotfix_blob` WHERE `TableHash`=0xF8685781; -- SpellActivationOverlay
|
||||
@@ -697,7 +697,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GAMEOBJECT_LABEL, "SELECT MAX(ID) + 1 FROM gameobject_label", CONNECTION_SYNCH);
|
||||
|
||||
// Gameobjects.db2
|
||||
PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT Name, PosX, PosY, PosZ, Rot1, Rot2, Rot3, Rot4, ID, OwnerID, DisplayID, Scale, TypeID, "
|
||||
PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT Name, PosX, PosY, PosZ, Rot1, Rot2, Rot3, Rot4, ID, OwnerID, DisplayID, Flags, Scale, TypeID, "
|
||||
"PhaseUseFlags, PhaseID, PhaseGroupID, Unknown1100, PropValue1, PropValue2, PropValue3, PropValue4, PropValue5, PropValue6, PropValue7, "
|
||||
"PropValue8 FROM gameobjects WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GAMEOBJECTS, "SELECT MAX(ID) + 1 FROM gameobjects", CONNECTION_SYNCH);
|
||||
|
||||
@@ -1614,15 +1614,15 @@ struct CriteriaLoadInfo
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "ID" },
|
||||
{ .IsSigned = true, .Type = FT_SHORT, .Name = "Type" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Asset" },
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "ModifierTreeId" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "ModifierTreeId" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "StartEvent" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "StartAsset" },
|
||||
{ .IsSigned = false, .Type = FT_SHORT, .Name = "StartTimer" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "StartTimer" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "FailEvent" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "FailAsset" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Flags" },
|
||||
{ .IsSigned = true, .Type = FT_SHORT, .Name = "EligibilityWorldStateID" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "EligibilityWorldStateValue" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "EligibilityWorldStateID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "EligibilityWorldStateValue" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 12, &CriteriaMeta::Instance, HOTFIX_SEL_CRITERIA };
|
||||
@@ -2134,7 +2134,7 @@ struct GameobjectLabelLoadInfo
|
||||
|
||||
struct GameobjectsLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[25] =
|
||||
static constexpr DB2FieldMeta Fields[26] =
|
||||
{
|
||||
{ .IsSigned = false, .Type = FT_STRING, .Name = "Name" },
|
||||
{ .IsSigned = false, .Type = FT_FLOAT, .Name = "PosX" },
|
||||
@@ -2147,6 +2147,7 @@ struct GameobjectsLoadInfo
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "ID" },
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "OwnerID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "DisplayID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Flags" },
|
||||
{ .IsSigned = false, .Type = FT_FLOAT, .Name = "Scale" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "TypeID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "PhaseUseFlags" },
|
||||
@@ -2163,7 +2164,7 @@ struct GameobjectsLoadInfo
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "PropValue8" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 25, &GameObjectsMeta::Instance, HOTFIX_SEL_GAMEOBJECTS };
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 26, &GameObjectsMeta::Instance, HOTFIX_SEL_GAMEOBJECTS };
|
||||
};
|
||||
|
||||
struct GarrAbilityLoadInfo
|
||||
@@ -2174,7 +2175,7 @@ struct GarrAbilityLoadInfo
|
||||
{ .IsSigned = false, .Type = FT_STRING, .Name = "Name" },
|
||||
{ .IsSigned = false, .Type = FT_STRING, .Name = "Description" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "GarrAbilityCategoryID" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "IconFileDataID" },
|
||||
{ .IsSigned = false, .Type = FT_SHORT, .Name = "FactionChangeGarrAbilityID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Flags" },
|
||||
@@ -2258,7 +2259,7 @@ struct GarrFollowerLoadInfo
|
||||
{ .IsSigned = false, .Type = FT_STRING, .Name = "AllianceSourceText" },
|
||||
{ .IsSigned = false, .Type = FT_STRING, .Name = "TitleName" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "GarrTypeID" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "HordeCreatureID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "AllianceCreatureID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "HordeGarrFollRaceID" },
|
||||
@@ -2320,7 +2321,7 @@ struct GarrMissionLoadInfo
|
||||
{ .IsSigned = false, .Type = FT_FLOAT, .Name = "WorldPosY" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "GarrTypeID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "GarrMissionTypeID" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "MaxFollowers" },
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "MissionCost" },
|
||||
{ .IsSigned = false, .Type = FT_SHORT, .Name = "MissionCostCurrencyTypesID" },
|
||||
@@ -2517,7 +2518,7 @@ struct GossipNpcOptionLoadInfo
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "GossipNpcOption" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "LFGDungeonsID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "TrainerID" },
|
||||
{ .IsSigned = true, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "GarrFollowerTypeID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "CharShipmentID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "GarrTalentTreeID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "UiMapID" },
|
||||
@@ -5313,7 +5314,7 @@ struct SpellClassOptionsLoadInfo
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "ID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "SpellID" },
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "ModalNextSpell" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "SpellClassSet" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "SpellClassSet" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "SpellClassMask1" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "SpellClassMask2" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "SpellClassMask3" },
|
||||
|
||||
@@ -5254,11 +5254,12 @@ struct ConversationLineMeta
|
||||
|
||||
struct CooldownSetMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[3] =
|
||||
static constexpr DB2MetaField Fields[4] =
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -5266,9 +5267,9 @@ struct CooldownSetMeta
|
||||
.FileDataId = 6405756,
|
||||
.IndexField = 0,
|
||||
.ParentIndexField = 1,
|
||||
.FieldCount = 3,
|
||||
.FileFieldCount = 3,
|
||||
.LayoutHash = 0x833402CE,
|
||||
.FieldCount = 4,
|
||||
.FileFieldCount = 4,
|
||||
.LayoutHash = 0xAA6C140C,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -5296,7 +5297,7 @@ struct CooldownSetLinkedSpellMeta
|
||||
|
||||
struct CooldownSetSpellMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[7] =
|
||||
static constexpr DB2MetaField Fields[10] =
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -5305,6 +5306,9 @@ struct CooldownSetSpellMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -5312,9 +5316,31 @@ struct CooldownSetSpellMeta
|
||||
.FileDataId = 6405757,
|
||||
.IndexField = 0,
|
||||
.ParentIndexField = 1,
|
||||
.FieldCount = 7,
|
||||
.FileFieldCount = 7,
|
||||
.LayoutHash = 0xB5A471F2,
|
||||
.FieldCount = 10,
|
||||
.FileFieldCount = 10,
|
||||
.LayoutHash = 0x0AC7B8F5,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
|
||||
struct CooldownViewerItemSpellMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[4] =
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
{
|
||||
.FileDataId = 7939216,
|
||||
.IndexField = -1,
|
||||
.ParentIndexField = 3,
|
||||
.FieldCount = 4,
|
||||
.FileFieldCount = 3,
|
||||
.LayoutHash = 0x671AF576,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -5578,7 +5604,7 @@ struct CraftingQualityMeta
|
||||
|
||||
struct CraftingQualityAtlasSetMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[11] =
|
||||
static constexpr DB2MetaField Fields[12] =
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -5591,6 +5617,7 @@ struct CraftingQualityAtlasSetMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -5598,9 +5625,9 @@ struct CraftingQualityAtlasSetMeta
|
||||
.FileDataId = 7012110,
|
||||
.IndexField = -1,
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 11,
|
||||
.FileFieldCount = 11,
|
||||
.LayoutHash = 0x9BD23E0F,
|
||||
.FieldCount = 12,
|
||||
.FileFieldCount = 12,
|
||||
.LayoutHash = 0x4FC8E439,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -6327,15 +6354,15 @@ struct CriteriaMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -6345,7 +6372,7 @@ struct CriteriaMeta
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 12,
|
||||
.FileFieldCount = 12,
|
||||
.LayoutHash = 0xB06E4073,
|
||||
.LayoutHash = 0x53D03513,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -7226,7 +7253,7 @@ struct DyeColorCategoryMeta
|
||||
|
||||
struct EdgeGlowEffectMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[13] =
|
||||
static constexpr DB2MetaField Fields[14] =
|
||||
{
|
||||
{ .Type = FT_FLOAT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_FLOAT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -7241,6 +7268,7 @@ struct EdgeGlowEffectMeta
|
||||
{ .Type = FT_FLOAT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -7248,9 +7276,9 @@ struct EdgeGlowEffectMeta
|
||||
.FileDataId = 1387381,
|
||||
.IndexField = -1,
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 13,
|
||||
.FileFieldCount = 13,
|
||||
.LayoutHash = 0xEBFB39E3,
|
||||
.FieldCount = 14,
|
||||
.FileFieldCount = 14,
|
||||
.LayoutHash = 0xED9B01C2,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -7574,9 +7602,9 @@ struct ExteriorComponentMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -7587,10 +7615,10 @@ struct ExteriorComponentMeta
|
||||
{
|
||||
.FileDataId = 6931305,
|
||||
.IndexField = 2,
|
||||
.ParentIndexField = 13,
|
||||
.ParentIndexField = 4,
|
||||
.FieldCount = 14,
|
||||
.FileFieldCount = 13,
|
||||
.LayoutHash = 0x53EA0925,
|
||||
.FileFieldCount = 14,
|
||||
.LayoutHash = 0xDC257C27,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -8318,7 +8346,7 @@ struct GameObjectLabelMeta
|
||||
|
||||
struct GameObjectsMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[13] =
|
||||
static constexpr DB2MetaField Fields[14] =
|
||||
{
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_FLOAT, .ArraySize = 3, .IsSigned = true },
|
||||
@@ -8326,6 +8354,7 @@ struct GameObjectsMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_FLOAT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -8340,9 +8369,9 @@ struct GameObjectsMeta
|
||||
.FileDataId = 841620,
|
||||
.IndexField = 3,
|
||||
.ParentIndexField = 4,
|
||||
.FieldCount = 13,
|
||||
.FileFieldCount = 13,
|
||||
.LayoutHash = 0xD2E7A9E4,
|
||||
.FieldCount = 14,
|
||||
.FileFieldCount = 14,
|
||||
.LayoutHash = 0x44BD453C,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -8400,7 +8429,7 @@ struct GarrAbilityMeta
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -8802,7 +8831,7 @@ struct GarrFollowerMeta
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
@@ -8849,7 +8878,7 @@ struct GarrFollowerLevelXPMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[4] =
|
||||
{
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
@@ -8873,7 +8902,7 @@ struct GarrFollowerQualityMeta
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
@@ -8990,7 +9019,7 @@ struct GarrItemLevelUpgradeDataMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -9080,7 +9109,7 @@ struct GarrMissionMeta
|
||||
{ .Type = FT_FLOAT, .ArraySize = 2, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
@@ -10046,7 +10075,7 @@ struct GossipNPCOptionMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -10812,14 +10841,13 @@ struct HouseMeta
|
||||
|
||||
struct HouseDecorMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[18] =
|
||||
static constexpr DB2MetaField Fields[17] =
|
||||
{
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_FLOAT, .ArraySize = 3, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -10839,9 +10867,9 @@ struct HouseDecorMeta
|
||||
.FileDataId = 5149691,
|
||||
.IndexField = 2,
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 18,
|
||||
.FileFieldCount = 18,
|
||||
.LayoutHash = 0xEAA015F9,
|
||||
.FieldCount = 17,
|
||||
.FileFieldCount = 17,
|
||||
.LayoutHash = 0x6A051268,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -10961,9 +10989,10 @@ struct HouseLevelRewardInfoMeta
|
||||
|
||||
struct HouseRoomMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[8] =
|
||||
static constexpr DB2MetaField Fields[10] =
|
||||
{
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -10971,16 +11000,17 @@ struct HouseRoomMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
{
|
||||
.FileDataId = 5163003,
|
||||
.IndexField = -1,
|
||||
.IndexField = 1,
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 8,
|
||||
.FileFieldCount = 8,
|
||||
.LayoutHash = 0xFC6C2118,
|
||||
.FieldCount = 10,
|
||||
.FileFieldCount = 10,
|
||||
.LayoutHash = 0xF04DC279,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -11814,13 +11844,14 @@ struct ItemContextPickerEntryMeta
|
||||
|
||||
struct ItemConversionMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[5] =
|
||||
static constexpr DB2MetaField Fields[6] =
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -11828,9 +11859,9 @@ struct ItemConversionMeta
|
||||
.FileDataId = 4337196,
|
||||
.IndexField = -1,
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 5,
|
||||
.FileFieldCount = 5,
|
||||
.LayoutHash = 0xB01EC8EF,
|
||||
.FieldCount = 6,
|
||||
.FileFieldCount = 6,
|
||||
.LayoutHash = 0x538B2B37,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -17038,8 +17069,9 @@ struct PingTypeMeta
|
||||
|
||||
struct PlayerCompanionInfoMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[15] =
|
||||
static constexpr DB2MetaField Fields[17] =
|
||||
{
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_STRING, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -17055,16 +17087,17 @@ struct PlayerCompanionInfoMeta
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
{
|
||||
.FileDataId = 5922429,
|
||||
.IndexField = 1,
|
||||
.ParentIndexField = 14,
|
||||
.FieldCount = 15,
|
||||
.FileFieldCount = 14,
|
||||
.LayoutHash = 0xF61B5AA1,
|
||||
.IndexField = 2,
|
||||
.ParentIndexField = 16,
|
||||
.FieldCount = 17,
|
||||
.FileFieldCount = 16,
|
||||
.LayoutHash = 0x55DA5E60,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -19404,8 +19437,8 @@ struct ScreenEffectMeta
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_SHORT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -19420,7 +19453,7 @@ struct ScreenEffectMeta
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 12,
|
||||
.FileFieldCount = 12,
|
||||
.LayoutHash = 0x014DC3B4,
|
||||
.LayoutHash = 0x35A3B574,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -19466,9 +19499,10 @@ struct ScreenLocationMeta
|
||||
|
||||
struct SeamlessSiteMeta
|
||||
{
|
||||
static constexpr DB2MetaField Fields[1] =
|
||||
static constexpr DB2MetaField Fields[2] =
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
};
|
||||
|
||||
static constexpr DB2Meta Instance =
|
||||
@@ -19476,9 +19510,9 @@ struct SeamlessSiteMeta
|
||||
.FileDataId = 1328719,
|
||||
.IndexField = -1,
|
||||
.ParentIndexField = 0,
|
||||
.FieldCount = 1,
|
||||
.FileFieldCount = 1,
|
||||
.LayoutHash = 0x5F662944,
|
||||
.FieldCount = 2,
|
||||
.FileFieldCount = 2,
|
||||
.LayoutHash = 0x3E1473D6,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -20535,8 +20569,8 @@ struct SpellActivationOverlayMeta
|
||||
{ .Type = FT_INT, .ArraySize = 4, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_FLOAT, .ArraySize = 1, .IsSigned = true },
|
||||
@@ -20551,7 +20585,7 @@ struct SpellActivationOverlayMeta
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 10,
|
||||
.FileFieldCount = 10,
|
||||
.LayoutHash = 0x3741E674,
|
||||
.LayoutHash = 0x68416164,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
@@ -20838,7 +20872,7 @@ struct SpellClassOptionsMeta
|
||||
{
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_BYTE, .ArraySize = 1, .IsSigned = false },
|
||||
{ .Type = FT_INT, .ArraySize = 1, .IsSigned = true },
|
||||
{ .Type = FT_INT, .ArraySize = 4, .IsSigned = true },
|
||||
};
|
||||
|
||||
@@ -20849,7 +20883,7 @@ struct SpellClassOptionsMeta
|
||||
.ParentIndexField = -1,
|
||||
.FieldCount = 4,
|
||||
.FileFieldCount = 4,
|
||||
.LayoutHash = 0xDFE6B427,
|
||||
.LayoutHash = 0x1F8E4FD7,
|
||||
.Fields = Fields
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2302,10 +2302,8 @@ static CurveInterpolationMode DetermineCurveType(CurveEntry const* curve, std::v
|
||||
{
|
||||
switch (points.size())
|
||||
{
|
||||
case 1:
|
||||
return CurveInterpolationMode::Constant;
|
||||
case 2:
|
||||
return CurveInterpolationMode::Linear;
|
||||
return CurveInterpolationMode::Cosine;
|
||||
case 3:
|
||||
return CurveInterpolationMode::Bezier3;
|
||||
case 4:
|
||||
@@ -2317,11 +2315,15 @@ static CurveInterpolationMode DetermineCurveType(CurveEntry const* curve, std::v
|
||||
}
|
||||
case 3:
|
||||
return CurveInterpolationMode::Cosine;
|
||||
case 4:
|
||||
return CurveInterpolationMode::Constant;
|
||||
case 5:
|
||||
return CurveInterpolationMode::Step;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return points.size() != 1 ? CurveInterpolationMode::Linear : CurveInterpolationMode::Constant;
|
||||
return CurveInterpolationMode::Linear;
|
||||
}
|
||||
|
||||
float DB2Manager::GetCurveValueAt(uint32 curveId, float x) const
|
||||
@@ -2335,18 +2337,26 @@ float DB2Manager::GetCurveValueAt(uint32 curveId, float x) const
|
||||
if (points.empty())
|
||||
return 0.0f;
|
||||
|
||||
if (points.size() == 1)
|
||||
return points[0].Y;
|
||||
|
||||
return GetCurveValueAt(DetermineCurveType(curve, points), points, x);
|
||||
}
|
||||
|
||||
float DB2Manager::GetCurveValueAt(CurveInterpolationMode mode, std::span<DBCPosition2D const> points, float x) const
|
||||
{
|
||||
auto findPointIndex = [&](std::size_t pointIndex)
|
||||
{
|
||||
while (pointIndex < points.size() && points[pointIndex].X <= x)
|
||||
++pointIndex;
|
||||
return pointIndex;
|
||||
};
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case CurveInterpolationMode::Linear:
|
||||
{
|
||||
std::size_t pointIndex = 0;
|
||||
while (pointIndex < points.size() && points[pointIndex].X <= x)
|
||||
++pointIndex;
|
||||
std::size_t pointIndex = findPointIndex(0);
|
||||
if (!pointIndex)
|
||||
return points[0].Y;
|
||||
if (pointIndex >= points.size())
|
||||
@@ -2358,9 +2368,7 @@ float DB2Manager::GetCurveValueAt(CurveInterpolationMode mode, std::span<DBCPosi
|
||||
}
|
||||
case CurveInterpolationMode::Cosine:
|
||||
{
|
||||
std::size_t pointIndex = 0;
|
||||
while (pointIndex < points.size() && points[pointIndex].X <= x)
|
||||
++pointIndex;
|
||||
std::size_t pointIndex = findPointIndex(0);
|
||||
if (!pointIndex)
|
||||
return points[0].Y;
|
||||
if (pointIndex >= points.size())
|
||||
@@ -2372,9 +2380,7 @@ float DB2Manager::GetCurveValueAt(CurveInterpolationMode mode, std::span<DBCPosi
|
||||
}
|
||||
case CurveInterpolationMode::CatmullRom:
|
||||
{
|
||||
std::size_t pointIndex = 1;
|
||||
while (pointIndex < points.size() && points[pointIndex].X <= x)
|
||||
++pointIndex;
|
||||
std::size_t pointIndex = findPointIndex(1);
|
||||
if (pointIndex == 1)
|
||||
return points[1].Y;
|
||||
if (pointIndex >= points.size() - 1)
|
||||
@@ -2434,7 +2440,23 @@ float DB2Manager::GetCurveValueAt(CurveInterpolationMode mode, std::span<DBCPosi
|
||||
return tmp[0];
|
||||
}
|
||||
case CurveInterpolationMode::Constant:
|
||||
return points[0].Y;
|
||||
{
|
||||
std::size_t pointIndex = findPointIndex(0);
|
||||
if (pointIndex == 0)
|
||||
return points[0].Y;
|
||||
if (pointIndex >= points.size())
|
||||
return points.back().Y;
|
||||
return 0.0f;
|
||||
}
|
||||
case CurveInterpolationMode::Step:
|
||||
{
|
||||
std::size_t pointIndex = findPointIndex(0);
|
||||
if (pointIndex == 0)
|
||||
return points[0].Y;
|
||||
if (pointIndex >= points.size())
|
||||
return points.back().Y;
|
||||
return points[pointIndex - 1].Y;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1397,15 +1397,15 @@ struct CriteriaEntry
|
||||
// CriteriaType::LearnTaxiNode = 262
|
||||
int32 TaxiNodesID;
|
||||
} Asset;
|
||||
uint32 ModifierTreeId;
|
||||
int32 ModifierTreeId;
|
||||
int32 StartEvent;
|
||||
int32 StartAsset;
|
||||
uint16 StartTimer;
|
||||
int32 StartTimer;
|
||||
int32 FailEvent;
|
||||
int32 FailAsset;
|
||||
int32 Flags;
|
||||
int16 EligibilityWorldStateID;
|
||||
int8 EligibilityWorldStateValue;
|
||||
int32 EligibilityWorldStateID;
|
||||
int32 EligibilityWorldStateValue;
|
||||
|
||||
EnumFlag<CriteriaFlags> GetFlags() const { return static_cast<CriteriaFlags>(Flags); }
|
||||
};
|
||||
@@ -1847,6 +1847,7 @@ struct GameObjectsEntry
|
||||
uint32 ID;
|
||||
uint32 OwnerID;
|
||||
int32 DisplayID;
|
||||
int32 Flags;
|
||||
float Scale;
|
||||
int32 TypeID;
|
||||
int32 PhaseUseFlags;
|
||||
@@ -1862,7 +1863,7 @@ struct GarrAbilityEntry
|
||||
LocalizedString Name;
|
||||
LocalizedString Description;
|
||||
uint8 GarrAbilityCategoryID;
|
||||
int8 GarrFollowerTypeID;
|
||||
uint8 GarrFollowerTypeID;
|
||||
int32 IconFileDataID;
|
||||
uint16 FactionChangeGarrAbilityID;
|
||||
int32 Flags;
|
||||
@@ -1925,7 +1926,7 @@ struct GarrFollowerEntry
|
||||
LocalizedString AllianceSourceText;
|
||||
LocalizedString TitleName;
|
||||
int8 GarrTypeID;
|
||||
int8 GarrFollowerTypeID;
|
||||
uint8 GarrFollowerTypeID;
|
||||
int32 HordeCreatureID;
|
||||
int32 AllianceCreatureID;
|
||||
uint8 HordeGarrFollRaceID;
|
||||
@@ -1975,7 +1976,7 @@ struct GarrMissionEntry
|
||||
DBCPosition2D WorldPos;
|
||||
int8 GarrTypeID;
|
||||
uint8 GarrMissionTypeID;
|
||||
int8 GarrFollowerTypeID;
|
||||
uint8 GarrFollowerTypeID;
|
||||
uint8 MaxFollowers;
|
||||
uint32 MissionCost;
|
||||
uint16 MissionCostCurrencyTypesID;
|
||||
@@ -2109,7 +2110,7 @@ struct GossipNPCOptionEntry
|
||||
int32 GossipNpcOption;
|
||||
int32 LFGDungeonsID;
|
||||
int32 TrainerID;
|
||||
int8 GarrFollowerTypeID;
|
||||
uint8 GarrFollowerTypeID;
|
||||
int32 CharShipmentID;
|
||||
int32 GarrTalentTreeID;
|
||||
int32 UiMapID;
|
||||
@@ -3868,7 +3869,7 @@ struct SpellClassOptionsEntry
|
||||
uint32 ID;
|
||||
int32 SpellID;
|
||||
uint32 ModalNextSpell;
|
||||
uint8 SpellClassSet;
|
||||
int32 SpellClassSet;
|
||||
flag128 SpellClassMask;
|
||||
};
|
||||
|
||||
|
||||
@@ -926,6 +926,7 @@ enum class CurveInterpolationMode : uint8
|
||||
Bezier4 = 4,
|
||||
Bezier = 5,
|
||||
Constant = 6,
|
||||
Step = 7,
|
||||
};
|
||||
|
||||
enum Difficulty : int16
|
||||
|
||||
@@ -540,7 +540,7 @@ float AreaTrigger::GetScaleCurveValueAtProgress(UF::ScaleCurve const& scaleCurve
|
||||
for (std::size_t i = 0; i < scaleCurve.Points.size(); ++i)
|
||||
points[i] = { .X = scaleCurve.Points[i].Pos.GetPositionX(), .Y = scaleCurve.Points[i].Pos.GetPositionY() };
|
||||
|
||||
CurveInterpolationMode mode = CurveInterpolationMode(*scaleCurve.ParameterCurve >> 1 & 0x7);
|
||||
CurveInterpolationMode mode = CurveInterpolationMode(*scaleCurve.ParameterCurve >> 1 & 0xF);
|
||||
std::size_t pointCount = *scaleCurve.ParameterCurve >> 24 & 0xFF;
|
||||
|
||||
return sDB2Manager.GetCurveValueAt(mode, std::span(points.begin(), pointCount), x);
|
||||
@@ -585,9 +585,9 @@ void AreaTrigger::SetScaleCurve(UF::MutableFieldReference<UF::ScaleCurve, false>
|
||||
SetUpdateFieldValue(scaleCurveMutator.ModifyValue(&UF::ScaleCurve::OverrideActive), true);
|
||||
SetUpdateFieldValue(scaleCurveMutator.ModifyValue(&UF::ScaleCurve::StartTimeOffset), curve->StartTimeOffset);
|
||||
|
||||
Position point;
|
||||
TaggedPosition<Position::XY> point;
|
||||
// ParameterCurve packing information
|
||||
// (not_using_points & 1) | ((interpolation_mode & 0x7) << 1) | ((first_point_offset & 0xFFFFF) << 4) | ((point_count & 0xFF) << 24)
|
||||
// (not_using_points & 1) | ((interpolation_mode & 0xF) << 1) | ((first_point_offset & 0x7FFFF) << 5) | ((point_count & 0xFF) << 24)
|
||||
// if not_using_points is set then the entire field is simply read as a float (ignoring that lowest bit)
|
||||
|
||||
if (float const* simpleFloat = std::get_if<float>(&curve->Curve))
|
||||
@@ -632,7 +632,7 @@ void AreaTrigger::SetScaleCurve(UF::MutableFieldReference<UF::ScaleCurve, false>
|
||||
|
||||
for (std::size_t i = 0; i < curvePoints->size(); ++i)
|
||||
{
|
||||
point.Relocate((*curvePoints)[i].X, (*curvePoints)[i].Y);
|
||||
point.Pos.Relocate((*curvePoints)[i].X, (*curvePoints)[i].Y);
|
||||
SetUpdateFieldValue(scaleCurveMutator.ModifyValue(&UF::ScaleCurve::Points, i), point);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user