Core/Players: Reenable transmog

Port From (https://github.com/TrinityCore/TrinityCore/commit/d27d0e0e3c004e7562c63b9527035095efd30974)
This commit is contained in:
Hondacrx
2025-08-25 21:00:34 -04:00
parent de9f0f9a7e
commit 2852828008
5 changed files with 142 additions and 3 deletions
+101
View File
@@ -2888,6 +2888,107 @@ namespace Framework.Constants
NoRepGainModifiers = 0x10
}
public enum GameRule
{
NoDebuffLimit = 1,
CharNameReservationEnabled = 2,
MaxCharReservationsPerRealm = 3,
MaxAccountCharReservationsPerContentset = 4,
EtaRealmLaunchTime = 5,
TrivialGroupXPPercent = 7,
CharReservationsPerRealmReopenThreshold = 8,
DisablePct = 9,
HardcoreRuleset = 10,
ReplaceAbsentGmSeconds = 11,
ReplaceGmRankLastOnlineSeconds = 12,
GameMode = 13,
CharacterlessLogin = 14,
NoMultiboxing = 15,
VanillaNpcKnockback = 16,
Runecarving = 17,
TalentRespecCostMin = 18,
TalentRespecCostMax = 19,
TalentRespecCostStep = 20,
VanillaRageGenerationModifier = 21,
SelfFoundAllowed = 22,
DisableHonorDecay = 23,
MaxLootDropLevel = 25,
MicrobarScale = 26,
MaxUnitNameDistance = 27,
MaxNameplateDistance = 28,
UserAddonsDisabled = 29,
UserScriptsDisabled = 30,
NonPlayerNameplateScale = 31,
ForcedPartyFrameScale = 32,
CustomActionbarOverlayHeightOffset = 33,
ForcedChatLanguage = 34,
LandingPageFactionID = 35,
CollectionsPanelDisabled = 36,
CharacterPanelDisabled = 37,
SpellbookPanelDisabled = 38,
TalentsPanelDisabled = 39,
AchievementsPanelDisabled = 40,
CommunitiesPanelDisabled = 41,
EncounterJournalDisabled = 42,
FinderPanelDisabled = 43,
StoreDisabled = 44,
HelpPanelDisabled = 45,
GuildsDisabled = 46,
QuestLogMicrobuttonDisabled = 47,
MapPlunderstormCircle = 48,
AfterDeathSpectatingUI = 49,
FrontEndChat = 50,
UniversalNameplateOcclusion = 51,
FastAreaTriggerTick = 52,
AllPlayersAreFastMovers = 53,
IgnoreChrclassDisabledFlag = 54,
CharacterCreateUseFixedBackgroundModel = 55,
ForceAlteredFormsOn = 56,
PlayerNameplateDifficultyIcon = 57,
PlayerNameplateAlternateHealthColor = 58,
AlwaysAllowAlliedRaces = 59,
ActionbarIconIntroDisabled = 60,
ReleaseSpiritGhostDisabled = 61,
DeleteItemConfirmationDisabled = 62,
ChatLinkLevelToastsDisabled = 63,
BagsUIDisabled = 64,
PetBattlesDisabled = 65,
PerksProgramActivityTrackingDisabled = 66,
MaximizeWorldMapDisabled = 67,
WorldMapTrackingOptionsDisabled = 68,
WorldMapTrackingPinDisabled = 69,
WorldMapHelpPlateDisabled = 70,
QuestLogPanelDisabled = 71,
QuestLogSuperTrackingDisabled = 72,
TutorialFrameDisabled = 73,
IngameMailNotificationDisabled = 74,
IngameCalendarDisabled = 75,
IngameTrackingDisabled = 76,
IngameWhoListDisabled = 77,
RaceAlteredFormsDisabled = 78,
IngameFriendsListDisabled = 79,
MacrosDisabled = 80,
CompactRaidFrameManagerDisabled = 81,
EditModeDisabled = 82,
InstanceDifficultyBannerDisabled = 83,
FullCharacterCreateDisabled = 84,
TargetFrameBuffsDisabled = 85,
UnitFramePvPContextualDisabled = 86,
BlockWhileSheathedAllowed = 88,
VanillaAccountMailInstant = 91,
ClearMailOnRealmTransfer = 92,
PremadeGroupFinderStyle = 93,
PlunderstormAreaSelection = 94,
GroupFinderCapabilities = 98,
WorldMapLegendDisabled = 99,
WorldMapFrameStrata = 100,
MerchantFilterDisabled = 101,
SummoningStones = 108,
TransmogEnabled = 109,
MailGameRule = 132,
LootMethodStyle = 157,
}
public enum GlobalCurve
{
CritDiminishing = 0,
@@ -193,7 +193,7 @@ namespace Game.Entities
fieldFlags |= AreaTriggerFieldFlags.AlwaysExterior;
return fieldFlags;
}
;
ReplaceAllAreaTriggerFlags(fieldFlags());
SetUpdateFieldValue(areaTriggerData.ModifyValue(m_areaTriggerData.MovementStartTime), GameTime.GetGameTimeMS());
@@ -235,7 +235,7 @@ namespace Game.Entities
InitSplineOffsets(GetCreateProperties().SplinePoints);
}
else
SetUpdateFieldValue(areaTriggerData.ModifyValue(m_areaTriggerData.ShapeType), (byte)AreaTriggerPathType.None);
SetUpdateFieldValue(areaTriggerData.ModifyValue(m_areaTriggerData.PathType), (byte)AreaTriggerPathType.None);
SetUpdateFieldValue(areaTriggerData.ModifyValue(m_areaTriggerData.Facing), _stationaryPosition.GetOrientation());
+14 -1
View File
@@ -26,7 +26,7 @@ namespace Game
// Send current home realm. Also there is no need to send it later in realm queries.
var currentRealm = Global.RealmMgr.GetCurrentRealm();
if(currentRealm != null)
if (currentRealm != null)
{
response.SuccessInfo.VirtualRealmAddress = currentRealm.Id.GetAddress();
response.SuccessInfo.VirtualRealms.Add(new VirtualRealmInfo(currentRealm.Id.GetAddress(), true, false, currentRealm.Name, currentRealm.NormalizedName));
@@ -104,6 +104,19 @@ namespace Game
europaTicketConfig.ComplaintsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportComplaintsEnabled);
europaTicketConfig.SuggestionsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportSuggestionsEnabled);
foreach (var (gameRule, value) in Global.WorldMgr.GetGameRules())
{
GameRuleValuePair rule = new();
rule.Rule = (int)gameRule;
if (value is float)
rule.ValueF = (float)value;
else
rule.Value = Convert.ToInt32(value);
features.GameRules.Add(rule);
}
features.EuropaTicketSystemStatus = europaTicketConfig;
SendPacket(features);
+13
View File
@@ -1167,6 +1167,19 @@ namespace Game
features.SpeakForMeAllowed = false;
foreach (var (gameRule, value) in Global.WorldMgr.GetGameRules())
{
GameRuleValuePair rule = new();
rule.Rule = (int)gameRule;
if (value is float)
rule.ValueF = (float)value;
else
rule.Value = Convert.ToInt32(value);
features.GameRules.Add(rule);
}
SendPacket(features);
}
+12
View File
@@ -1179,6 +1179,11 @@ namespace Game
SetPlayerAmountLimit((uint)ConfigMgr.GetDefaultValue("PlayerLimit", 100));
SetMotd(ConfigMgr.GetDefaultValue("Motd", "Welcome to a Cypher Core Server."));
_gameRules =
[
new() { Item1 = GameRule.TransmogEnabled, Item2 = true }
];
if (reload)
{
Global.SupportMgr.SetSupportSystemStatus(WorldConfig.GetBoolValue(WorldCfg.SupportEnabled));
@@ -2556,6 +2561,11 @@ namespace Game
public WorldUpdateTime GetWorldUpdateTime() { return _worldUpdateTime; }
public List<(GameRule, object)> GetGameRules()
{
return _gameRules;
}
#region Fields
uint m_ShutdownTimer;
ShutdownMask m_ShutdownMask;
@@ -2628,6 +2638,8 @@ namespace Game
bool _guidAlert;
uint _warnDiff;
long _warnShutdownTime;
List<(GameRule, object)> _gameRules = new();
#endregion
}