From a2078393378447a726da0db296829825de3f3045 Mon Sep 17 00:00:00 2001 From: Ovahlord <18347559+ovahlord@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:16:45 +0200 Subject: [PATCH] Core/Misc: correct some include orders and comments --- src/server/game/Entities/Unit/Unit.h | 12 ++++++------ src/server/game/Spells/Auras/SpellAuraEffects.cpp | 13 ++++++------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 17bcf22e98..9051744742 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -18,12 +18,6 @@ #ifndef __UNIT_H #define __UNIT_H -#include -#include -#include -#include -#include - #include "CombatManager.h" #include "Object.h" #include "SpellAuraDefines.h" @@ -34,6 +28,12 @@ #include "UnitDefines.h" #include "Util.h" +#include +#include +#include +#include +#include + constexpr uint32 WORLD_TRIGGER = 12999; constexpr uint8 MAX_SPELL_CHARM = 4; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index deb920ac2f..422b082833 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -16,11 +16,6 @@ */ #include "SpellAuraEffects.h" - -#include - -#include - #include "Battlefield.h" #include "BattlefieldMgr.h" #include "Battleground.h" @@ -54,6 +49,9 @@ #include "Weather.h" #include "WorldPacket.h" +#include +#include + class Aura; // // EFFECT HANDLER NOTES @@ -3586,10 +3584,11 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode, { if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_STAT))) return; + StatType stat = static_cast(GetMiscValue()); if (stat < StatType::PrimaryStat || stat >= StatType::Max) { - TC_LOG_ERROR("spells", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue()); + TC_LOG_ERROR("spells", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_PERCENT_STAT ", GetId(), GetEffIndex(), GetMiscValue()); return; } @@ -3679,7 +3678,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 StatType stat = static_cast(GetMiscValue()); if (stat < StatType::PrimaryStat || stat >= StatType::Max) { - TC_LOG_ERROR("spells", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue()); + TC_LOG_ERROR("spells", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE ", GetId(), GetEffIndex(), GetMiscValue()); return; }