Core/DataStores: Updated structures to 9.2.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/6c8ef045a52723618b91c565ae6c3efc711e7581)
This commit is contained in:
hondacrx
2022-06-03 20:12:36 -04:00
parent 4efe624af1
commit 5ead95eb9f
16 changed files with 74 additions and 36 deletions
@@ -76,6 +76,7 @@ namespace Framework.Constants
EpicQuality = 0x100,
LegendaryQuality = 0x200,
ArtifactQuality = 0x400,
LegendaryCraftedItemOnly = 0x800,
}
public enum AuctionHouseSortOrder
+5 -3
View File
@@ -74,7 +74,8 @@ namespace Framework.Constants
LRF = 2,
Scenario = 3,
Flex = 4,
WorldPvP = 5
WorldPvP = 5,
ScheduledPvp = 6, // pvp brawl
}
public enum LfgLockStatusType
@@ -114,9 +115,10 @@ namespace Framework.Constants
None = 0,
Dungeon = 1,
Raid = 2,
Quest = 3,
Zone = 4,
Quest = 5,
RandomDungeon = 6
Heroic = 5,
Random = 6
}
public enum LfgProposalState
@@ -528,6 +528,10 @@ namespace Framework.Constants
ModHealingTakenFromCaster = 504,
ModPlayerChoiceRerolls = 505, // NYI
DisableInertia = 506, // NYI
Unk507 = 507,
Unk508 = 508,
Unk509 = 509,
ModifiedRaidInstance = 510, // Related to "Fated" raid affixes
Total
}
@@ -2757,6 +2757,7 @@ namespace Framework.Constants
Unk149 = 149,
UnitOwnCritter = 150, // own battle pet from UNIT_FIELD_CRITTER
Unk151 = 151,
Unk152 = 152,
TotalSpellTargets
}
public enum SpellTargetSelectionCategories
@@ -355,7 +355,7 @@ namespace Framework.Database
PrepareStatement(HotfixStatements.SEL_CURVE, "SELECT ID, Type, Flags FROM curve");
// CurvePoint.db2
PrepareStatement(HotfixStatements.SEL_CURVE_POINT, "SELECT ID, PosX, PosY, PosPreSquishX, PosPreSquishY, CurveID, OrderIndex FROM curve_point");
PrepareStatement(HotfixStatements.SEL_CURVE_POINT, "SELECT ID, PosX, PosY, PreSLSquishPosX, PreSLSquishPosY, CurveID, OrderIndex FROM curve_point");
// DestructibleModelData.db2
PrepareStatement(HotfixStatements.SEL_DESTRUCTIBLE_MODEL_DATA, "SELECT ID, State0ImpactEffectDoodadSet, State0AmbientDoodadSet, State1Wmo, " +
@@ -579,7 +579,7 @@ namespace Framework.Database
// ItemBonusTreeNode.db2
PrepareStatement(HotfixStatements.SEL_ITEM_BONUS_TREE_NODE, "SELECT ID, ItemContext, ChildItemBonusTreeID, ChildItemBonusListID, ChildItemLevelSelectorID, " +
"ItemBonusListGroupID, ParentItemBonusTreeNodeID, ParentItemBonusTreeID FROM item_bonus_tree_node");
"ChildItemBonusListGroupID, IblGroupPointsModSetID, ParentItemBonusTreeID FROM item_bonus_tree_node");
// ItemChildEquipment.db2
PrepareStatement(HotfixStatements.SEL_ITEM_CHILD_EQUIPMENT, "SELECT ID, ParentItemID, ChildItemID, ChildItemEquipSlot FROM item_child_equipment");
@@ -769,7 +769,7 @@ namespace Framework.Database
// Map.db2
PrepareStatement(HotfixStatements.SEL_MAP, "SELECT ID, Directory, MapName, MapDescription0, MapDescription1, PvpShortDescription, PvpLongDescription, " +
"CorpseX, CorpseY, MapType, InstanceType, ExpansionID, AreaTableID, LoadingScreenID, TimeOfDayOverride, ParentMapID, CosmeticParentMapID, " +
"TimeOffset, MinimapIconScale, CorpseMapID, MaxPlayers, WindSettingsID, ZmpFileDataID, WdtFileDataID, Flags1, Flags2 FROM map");
"TimeOffset, MinimapIconScale, CorpseMapID, MaxPlayers, WindSettingsID, ZmpFileDataID, WdtFileDataID, Flags1, Flags2, Flags3 FROM map");
PrepareStatement(HotfixStatements.SEL_MAP_LOCALE, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang, PvpShortDescription_lang, " +
"PvpLongDescription_lang FROM map_locale WHERE locale = ?");
@@ -1150,7 +1150,7 @@ namespace Framework.Database
" FROM spell_x_spell_visual");
// SummonProperties.db2
PrepareStatement(HotfixStatements.SEL_SUMMON_PROPERTIES, "SELECT ID, Control, Faction, Title, Slot, Flags FROM summon_properties");
PrepareStatement(HotfixStatements.SEL_SUMMON_PROPERTIES, "SELECT ID, Control, Faction, Title, Slot, Flags1, Flags2 FROM summon_properties");
// TactKey.db2
PrepareStatement(HotfixStatements.SEL_TACT_KEY, "SELECT ID, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, " +
+7 -7
View File
@@ -400,13 +400,13 @@ namespace Game.DataStorage
}
// Check loaded DB2 files proper version
if (!CliDB.AreaTableStorage.ContainsKey(13574) || // last area added in 9.0.2 (37176)
!CliDB.CharTitlesStorage.ContainsKey(694) || // last char title added in 9.0.2 (37176)
!CliDB.GemPropertiesStorage.ContainsKey(3825) || // last gem property added in 9.0.2 (37176)
!CliDB.ItemStorage.ContainsKey(184869) || // last item added in 9.0.2 (37176)
!CliDB.ItemExtendedCostStorage.ContainsKey(7048) || // last item extended cost added in 9.0.2 (37176)
!CliDB.MapStorage.ContainsKey(2453) || // last map added in 9.0.2 (37176)
!CliDB.SpellNameStorage.ContainsKey(349043)) // last spell added in 9.0.2 (37176)
if (!CliDB.AreaTableStorage.ContainsKey(14083) || // last area added in 9.0.2 (37176)
!CliDB.CharTitlesStorage.ContainsKey(727) || // last char title added in 9.0.2 (37176)
!CliDB.GemPropertiesStorage.ContainsKey(3922) || // last gem property added in 9.0.2 (37176)
!CliDB.ItemStorage.ContainsKey(193265) || // last item added in 9.0.2 (37176)
!CliDB.ItemExtendedCostStorage.ContainsKey(7302) || // last item extended cost added in 9.0.2 (37176)
!CliDB.MapStorage.ContainsKey(2559) || // last map added in 9.0.2 (37176)
!CliDB.SpellNameStorage.ContainsKey(375051)) // last spell added in 9.0.2 (37176)
{
Log.outError(LogFilter.Misc, "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
Global.WorldMgr.ShutdownServ(10, ShutdownMask.Force, ShutdownExitCode.Error);
+1 -1
View File
@@ -60,7 +60,7 @@ namespace Game.DataStorage
public string ContinueDescription;
public byte Type;
public uint PlayerConditionID;
public byte Flags;
public int Flags;
public byte ButtonActionType;
public int TextureFileDataID;
public ushort LfgDungeonID;
+3 -3
View File
@@ -92,7 +92,7 @@ namespace Game.DataStorage
public uint SelectScreenFileDataID;
public uint IconFileDataID;
public uint LowResScreenFileDataID;
public uint Flags;
public int Flags;
public uint SpellTextureBlobFileDataID;
public uint RolesMask;
public uint ArmorTypeMask;
@@ -202,7 +202,7 @@ namespace Game.DataStorage
public float[] FaceCustomizationOffset = new float[3];
public float[] CustomizeOffset = new float[3];
public uint Id;
public int Sex;
public sbyte Sex;
public uint DisplayID;
public int CharComponentTextureLayoutID;
public int Flags;
@@ -556,7 +556,7 @@ namespace Game.DataStorage
{
public uint Id;
public Vector2 Pos;
public Vector2 PosPreSquish;
public Vector2 PreSLSquishPos;
public ushort CurveID;
public byte OrderIndex;
}
+2 -2
View File
@@ -140,8 +140,8 @@ namespace Game.DataStorage
public ushort ChildItemBonusTreeID;
public ushort ChildItemBonusListID;
public ushort ChildItemLevelSelectorID;
public uint ItemBonusListGroupID;
public uint ParentItemBonusTreeNodeID;
public uint ChildItemBonusListGroupID;
public uint IblGroupPointsModSetID;
public uint ParentItemBonusTreeID;
}
+4 -4
View File
@@ -31,7 +31,7 @@ namespace Game.DataStorage
public ushort FirstSectionID;
public ushort UiMapID;
public uint MapDisplayConditionID;
public byte Flags;
public int Flags;
public sbyte DifficultyMask;
}
@@ -50,8 +50,8 @@ namespace Game.DataStorage
public int UiModelSceneID;
public int SpellID;
public int IconFileDataID;
public ushort Flags;
public ushort IconFlags;
public int Flags;
public int IconFlags;
public sbyte DifficultyMask;
}
@@ -66,7 +66,7 @@ namespace Game.DataStorage
public int ButtonSmallFileDataID;
public int LoreFileDataID;
public byte OrderIndex;
public byte Flags;
public int Flags;
public ushort AreaID;
}
+1 -1
View File
@@ -42,7 +42,7 @@ namespace Game.DataStorage
public LocalizedString Name;
public string Description;
public LfgType TypeID;
public byte Subtype;
public sbyte Subtype;
public sbyte Faction;
public int IconTextureFileID;
public int RewardsBgTextureFileID;
+1 -1
View File
@@ -51,7 +51,7 @@ namespace Game.DataStorage
public short WindSettingsID;
public int ZmpFileDataID;
public int WdtFileDataID;
public MapFlags[] Flags = new MapFlags[2];
public MapFlags[] Flags = new MapFlags[3];
// Helpers
public Expansion Expansion() { return (Expansion)ExpansionID; }
+2 -2
View File
@@ -655,8 +655,8 @@ namespace Game.DataStorage
public uint Faction;
public SummonTitle Title;
public int Slot;
public uint Flags;
public uint[] Flags = new uint[2];
public SummonPropertiesFlags GetFlags() { return (SummonPropertiesFlags)Flags; }
public SummonPropertiesFlags GetFlags() { return (SummonPropertiesFlags)Flags[0]; }
}
}
+8 -8
View File
@@ -180,7 +180,7 @@ namespace Game.DungeonFinding
{
case LfgType.Dungeon:
case LfgType.Raid:
case LfgType.RandomDungeon:
case LfgType.Random:
case LfgType.Zone:
LfgDungeonStore[dungeon.Id] = new LFGDungeonData(dungeon);
break;
@@ -225,7 +225,7 @@ namespace Game.DungeonFinding
LFGDungeonData dungeon = pair.Value;
// No teleport coords in database, load from areatriggers
if (dungeon.type != LfgType.RandomDungeon && dungeon.x == 0.0f && dungeon.y == 0.0f && dungeon.z == 0.0f)
if (dungeon.type != LfgType.Random && dungeon.x == 0.0f && dungeon.y == 0.0f && dungeon.z == 0.0f)
{
AreaTriggerStruct at = Global.ObjectMgr.GetMapEntranceTrigger(dungeon.map);
if (at == null)
@@ -241,7 +241,7 @@ namespace Game.DungeonFinding
dungeon.o = at.target_Orientation;
}
if (dungeon.type != LfgType.RandomDungeon)
if (dungeon.type != LfgType.Random)
CachedDungeonMapStore.Add((byte)dungeon.group, dungeon.id);
CachedDungeonMapStore.Add(0, dungeon.id);
}
@@ -451,7 +451,7 @@ namespace Game.DungeonFinding
LfgType type = GetDungeonType(it);
switch (type)
{
case LfgType.RandomDungeon:
case LfgType.Random:
if (dungeons.Count > 1) // Only allow 1 random dungeon
joinData.result = LfgJoinResult.InvalidSlot;
else
@@ -968,7 +968,7 @@ namespace Game.DungeonFinding
{
uint rDungeonId = dungeons[0];
LFGDungeonData rDungeon = GetLFGDungeon(rDungeonId);
if (rDungeon != null && rDungeon.type == LfgType.RandomDungeon)
if (rDungeon != null && rDungeon.type == LfgType.Random)
player.CastSpell(player, SharedConst.LFGSpellDungeonCooldown, false);
}
}
@@ -1386,7 +1386,7 @@ namespace Game.DungeonFinding
// Give rewards only if its a random dungeon
LFGDungeonData dungeon = GetLFGDungeon(rDungeonId);
if (dungeon == null || (dungeon.type != LfgType.RandomDungeon && !dungeon.seasonal))
if (dungeon == null || (dungeon.type != LfgType.Random && !dungeon.seasonal))
{
Log.outDebug(LogFilter.Lfg, $"Group: {gguid}, Player: {guid} dungeon {rDungeonId} is not random or seasonal");
continue;
@@ -2055,7 +2055,7 @@ namespace Game.DungeonFinding
if (!dungeons.Empty())
{
LFGDungeonData dungeon = GetLFGDungeon(dungeons.First());
if (dungeon != null && (dungeon.type == LfgType.RandomDungeon || dungeon.seasonal))
if (dungeon != null && (dungeon.type == LfgType.Random || dungeon.seasonal))
return true;
}
}
@@ -2097,7 +2097,7 @@ namespace Game.DungeonFinding
List<uint> randomDungeons = new();
foreach (var dungeon in LfgDungeonStore.Values)
{
if (!(dungeon.type == LfgType.RandomDungeon || (dungeon.seasonal && Global.LFGMgr.IsSeasonActive(dungeon.id))))
if (!(dungeon.type == LfgType.Random || (dungeon.seasonal && Global.LFGMgr.IsSeasonActive(dungeon.id))))
continue;
if (dungeon.expansion > expansion)
+1
View File
@@ -5132,6 +5132,7 @@ namespace Game.Spells
new StaticData(SpellTargetObjectTypes.Dest, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Default, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.Random), // 149
new StaticData(SpellTargetObjectTypes.Unit, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Default, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 150 TARGET_UNIT_OWN_CRITTER
new StaticData(SpellTargetObjectTypes.Unit, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Area, SpellTargetCheckTypes.Enemy, SpellTargetDirectionTypes.None), // 151
new StaticData(SpellTargetObjectTypes.None, SpellTargetReferenceTypes.None, SpellTargetSelectionCategories.Nyi, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 152
};
}
@@ -0,0 +1,29 @@
ALTER TABLE `adventure_journal` MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `PlayerConditionID`;
ALTER TABLE `chr_classes` MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `LowResScreenFileDataID`;
ALTER TABLE `chr_model` MODIFY `Sex` tinyint NOT NULL DEFAULT 0 AFTER `ID`;
ALTER TABLE `curve_point` CHANGE `PosPreSquishX` `PreSLSquishPosX` float NOT NULL DEFAULT 0 AFTER `PosY`;
ALTER TABLE `curve_point` CHANGE `PosPreSquishY` `PreSLSquishPosY` float NOT NULL DEFAULT 0 AFTER `PreSLSquishPosX`;
ALTER TABLE `item_bonus_tree_node` CHANGE `ItemBonusListGroupID` `ChildItemBonusListGroupID` int NOT NULL DEFAULT 0 AFTER `ChildItemLevelSelectorID`;
ALTER TABLE `item_bonus_tree_node` CHANGE `ParentItemBonusTreeNodeID` `IblGroupPointsModSetID` int NOT NULL DEFAULT 0 AFTER `ChildItemBonusListGroupID`;
ALTER TABLE `item_sparse` MODIFY `StartQuestID` int NOT NULL DEFAULT 0 AFTER `BagFamily`;
ALTER TABLE `item_sparse` MODIFY `LanguageID` int NOT NULL DEFAULT 0 AFTER `StartQuestID`;
ALTER TABLE `item_sparse` MODIFY `ItemRange` float NOT NULL DEFAULT 0 AFTER `LanguageID`;
ALTER TABLE `journal_encounter` MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `MapDisplayConditionID`;
ALTER TABLE `journal_encounter_section` MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `IconFileDataID`;
ALTER TABLE `journal_encounter_section` MODIFY `IconFlags` int NOT NULL DEFAULT 0 AFTER `Flags`;
ALTER TABLE `journal_instance` MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `OrderIndex`;
ALTER TABLE `lfg_dungeons` MODIFY `Subtype` tinyint NOT NULL DEFAULT 0 AFTER `TypeID`;
ALTER TABLE `map` ADD `Flags3` int NOT NULL DEFAULT 0 AFTER `Flags2`;
ALTER TABLE `summon_properties` CHANGE `Flags` `Flags1` int NOT NULL DEFAULT 0 AFTER `Slot`;
ALTER TABLE `summon_properties` ADD `Flags2` int NOT NULL DEFAULT 0 AFTER `Flags1`;