diff --git a/Source/Framework/Constants/AuctionConst.cs b/Source/Framework/Constants/AuctionConst.cs index 39664414f..3bca43b19 100644 --- a/Source/Framework/Constants/AuctionConst.cs +++ b/Source/Framework/Constants/AuctionConst.cs @@ -76,6 +76,7 @@ namespace Framework.Constants EpicQuality = 0x100, LegendaryQuality = 0x200, ArtifactQuality = 0x400, + LegendaryCraftedItemOnly = 0x800, } public enum AuctionHouseSortOrder diff --git a/Source/Framework/Constants/LFGConst.cs b/Source/Framework/Constants/LFGConst.cs index 842dd201d..ad6171ff0 100644 --- a/Source/Framework/Constants/LFGConst.cs +++ b/Source/Framework/Constants/LFGConst.cs @@ -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 diff --git a/Source/Framework/Constants/Spells/SpellAuraConst.cs b/Source/Framework/Constants/Spells/SpellAuraConst.cs index ecf353b62..f852167f3 100644 --- a/Source/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Source/Framework/Constants/Spells/SpellAuraConst.cs @@ -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 } diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 884995524..132a7e681 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -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 diff --git a/Source/Framework/Database/Databases/HotfixDatabase.cs b/Source/Framework/Database/Databases/HotfixDatabase.cs index 7a2dce966..c98aa51dc 100644 --- a/Source/Framework/Database/Databases/HotfixDatabase.cs +++ b/Source/Framework/Database/Databases/HotfixDatabase.cs @@ -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, " + diff --git a/Source/Game/DataStorage/CliDB.cs b/Source/Game/DataStorage/CliDB.cs index 6c0e242cd..b97efddda 100644 --- a/Source/Game/DataStorage/CliDB.cs +++ b/Source/Game/DataStorage/CliDB.cs @@ -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); diff --git a/Source/Game/DataStorage/Structs/A_Records.cs b/Source/Game/DataStorage/Structs/A_Records.cs index 34b123fb5..d5f42c627 100644 --- a/Source/Game/DataStorage/Structs/A_Records.cs +++ b/Source/Game/DataStorage/Structs/A_Records.cs @@ -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; diff --git a/Source/Game/DataStorage/Structs/C_Records.cs b/Source/Game/DataStorage/Structs/C_Records.cs index 24fa4883b..db3e95fa3 100644 --- a/Source/Game/DataStorage/Structs/C_Records.cs +++ b/Source/Game/DataStorage/Structs/C_Records.cs @@ -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; } diff --git a/Source/Game/DataStorage/Structs/I_Records.cs b/Source/Game/DataStorage/Structs/I_Records.cs index 7587f6153..69ed03f3d 100644 --- a/Source/Game/DataStorage/Structs/I_Records.cs +++ b/Source/Game/DataStorage/Structs/I_Records.cs @@ -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; } diff --git a/Source/Game/DataStorage/Structs/J_Records.cs b/Source/Game/DataStorage/Structs/J_Records.cs index e192ba22d..bf7ca9671 100644 --- a/Source/Game/DataStorage/Structs/J_Records.cs +++ b/Source/Game/DataStorage/Structs/J_Records.cs @@ -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; } diff --git a/Source/Game/DataStorage/Structs/L_Records.cs b/Source/Game/DataStorage/Structs/L_Records.cs index a17410899..bde17958f 100644 --- a/Source/Game/DataStorage/Structs/L_Records.cs +++ b/Source/Game/DataStorage/Structs/L_Records.cs @@ -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; diff --git a/Source/Game/DataStorage/Structs/M_Records.cs b/Source/Game/DataStorage/Structs/M_Records.cs index 89e9c9c64..be7e60a42 100644 --- a/Source/Game/DataStorage/Structs/M_Records.cs +++ b/Source/Game/DataStorage/Structs/M_Records.cs @@ -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; } diff --git a/Source/Game/DataStorage/Structs/S_Records.cs b/Source/Game/DataStorage/Structs/S_Records.cs index dd78127de..d92a784b8 100644 --- a/Source/Game/DataStorage/Structs/S_Records.cs +++ b/Source/Game/DataStorage/Structs/S_Records.cs @@ -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]; } } } diff --git a/Source/Game/DungeonFinding/LFGManager.cs b/Source/Game/DungeonFinding/LFGManager.cs index 4be551ae8..66f202c80 100644 --- a/Source/Game/DungeonFinding/LFGManager.cs +++ b/Source/Game/DungeonFinding/LFGManager.cs @@ -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 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) diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index 8111be4da..0d7a2978a 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -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 }; } diff --git a/sql/updates/hotfixes/master/2022_06_01_00_hotfixes.sql b/sql/updates/hotfixes/master/2022_06_01_00_hotfixes.sql new file mode 100644 index 000000000..d2351ed03 --- /dev/null +++ b/sql/updates/hotfixes/master/2022_06_01_00_hotfixes.sql @@ -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`;