Core/Objects: Implemented vignettes

Port From (https://github.com/TrinityCore/TrinityCore/commit/fccf6fb72b60b08dfbe6d5fb17fba55239944fca)
This commit is contained in:
hondacrx
2024-03-13 21:09:46 -04:00
parent 2c008b2b70
commit 4b9b81c7e2
21 changed files with 573 additions and 10 deletions
+2
View File
@@ -377,6 +377,7 @@ namespace Game.DataStorage
UnitPowerBarStorage = ReadDB2<UnitPowerBarRecord>("UnitPowerBar.db2", HotfixStatements.SEL_UNIT_POWER_BAR, HotfixStatements.SEL_UNIT_POWER_BAR_LOCALE);
VehicleStorage = ReadDB2<VehicleRecord>("Vehicle.db2", HotfixStatements.SEL_VEHICLE);
VehicleSeatStorage = ReadDB2<VehicleSeatRecord>("VehicleSeat.db2", HotfixStatements.SEL_VEHICLE_SEAT);
VignetteStorage = ReadDB2<VignetteRecord>("Vignette.db2", HotfixStatements.SEL_VIGNETTE, HotfixStatements.SEL_VIGNETTE_LOCALE);
WMOAreaTableStorage = ReadDB2<WMOAreaTableRecord>("WMOAreaTable.db2", HotfixStatements.SEL_WMO_AREA_TABLE, HotfixStatements.SEL_WMO_AREA_TABLE_LOCALE);
WorldEffectStorage = ReadDB2<WorldEffectRecord>("WorldEffect.db2", HotfixStatements.SEL_WORLD_EFFECT);
WorldMapOverlayStorage = ReadDB2<WorldMapOverlayRecord>("WorldMapOverlay.db2", HotfixStatements.SEL_WORLD_MAP_OVERLAY);
@@ -813,6 +814,7 @@ namespace Game.DataStorage
public static DB6Storage<UnitPowerBarRecord> UnitPowerBarStorage;
public static DB6Storage<VehicleRecord> VehicleStorage;
public static DB6Storage<VehicleSeatRecord> VehicleSeatStorage;
public static DB6Storage<VignetteRecord> VignetteStorage;
public static DB6Storage<WMOAreaTableRecord> WMOAreaTableStorage;
public static DB6Storage<WorldEffectRecord> WorldEffectStorage;
public static DB6Storage<WorldMapOverlayRecord> WorldMapOverlayStorage;
@@ -120,4 +120,25 @@ namespace Game.DataStorage
}
public bool IsEjectable() { return HasFlag(VehicleSeatFlagsB.Ejectable); }
}
public sealed class VignetteRecord
{
public uint ID;
public LocalizedString Name;
public uint PlayerConditionID;
public uint VisibleTrackingQuestID;
public uint QuestFeedbackEffectID;
public int Flags;
public float MaxHeight;
public float MinHeight;
public sbyte VignetteType;
public int RewardQuestID;
public int UiWidgetSetID;
public VignetteFlags GetFlags() { return (VignetteFlags)Flags; }
public bool IsInfiniteAOI()
{
return GetFlags().HasFlag(VignetteFlags.InfiniteAOI | VignetteFlags.ZoneInfiniteAOI);
}
}
}