core fix warnings

This commit is contained in:
luis
2026-05-27 16:38:24 -03:00
parent 59b1fc37c5
commit 631d7b7b3b
13 changed files with 49 additions and 34 deletions
-1
View File
@@ -39,7 +39,6 @@ void ThreatReference::AddThreat(float amount)
{
if (amount == 0.0f)
return;
float oldThreat = _baseAmount;
_baseAmount = std::max<float>(_baseAmount + amount, 0.0f);
if (amount > 0.0f)
HeapNotifyIncreased();
@@ -1562,7 +1562,7 @@ void AreaTrigger::ClearValuesChangesMask()
}
//WowCommunity
AreaTrigger* AreaTrigger::CreateStaticAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration /*= -1*/, bool addToMap /*= true*/)
AreaTrigger* AreaTrigger::CreateStaticAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration /*= -1*/)
{
AreaTrigger* at = new AreaTrigger();
if (!at->Create(areaTriggerCreatePropertiesId, map, pos, duration, nullptr, nullptr, nullptr, { 0, 0 }, nullptr, nullptr, nullptr))
@@ -122,7 +122,7 @@ class TC_GAME_API AreaTrigger final : public WorldObject, public GridObject<Area
public:
static AreaTrigger* CreateAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Position const& pos, int32 duration, Unit* caster, Unit* target, SpellCastVisual spellVisual = { 0, 0 }, SpellInfo const* spellInfo = nullptr, Spell* spell = nullptr, AuraEffect const* aurEff = nullptr);
static AreaTrigger* CreateStaticAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration = -1, bool addToMap = true);
static AreaTrigger* CreateStaticAreaTrigger(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration = -1);
static ObjectGuid CreateNewMovementForceId(Map* map, uint32 areaTriggerId);
bool LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap, bool allowDuplicate);
+3 -3
View File
@@ -253,7 +253,7 @@ void HouseInteriorMap::SpawnRoomMeshObjectsFromList(std::vector<Housing::Room co
// GridX/GridY = yard offsets. FloorIndex = floor NUMBER (0=ground, 1=floor2, ?).
// Sniff-verified: retail HousingRoomEntity.FloorIndex is a small integer
// used by the client's floor selector UI, while world Z is computed as
// FloorIndex × 12 yards (confirmed by positions at Z=0.1, 12.1, 24.1).
// FloorIndex × 12 yards (confirmed by positions at Z=0.1, 12.1, 24.1).
static constexpr float FLOOR_HEIGHT_Y = 12.0f;
float roomX = _originX + static_cast<float>(room->GridX);
float roomY = _originY + static_cast<float>(room->GridY);
@@ -310,7 +310,7 @@ void HouseInteriorMap::SpawnRoomMeshObjectsFromList(std::vector<Housing::Room co
// Stairwells come in stacked pairs at the same XY ? the stairs-bearing
// room and its upper partner (12 yards above). HAS_STAIRS flag is set
// on BOTH rooms in the pair (incl. "Stairwell Room (Empty)"), so we
// classify by checking for a partner at Z±12 at the same XY.
// classify by checking for a partner at Z±12 at the same XY.
// Base = has another stairwell 12 yards ABOVE ? skip ceiling
// (partner above provides it at world Z=24)
// Partner = has another stairwell 12 yards BELOW ? skip floor
@@ -1750,7 +1750,7 @@ bool HouseInteriorMap::AddPlayerToMap(Player* player, bool initPlayer /*= true*/
Position atPos(atX, atY, atZ, 0.0f);
AreaTrigger* plotAt = AreaTrigger::CreateStaticAreaTrigger(
{ .Id = 37358, .IsCustom = false }, this, atPos, -1, /*addToMap*/ false);
{ .Id = 37358, .IsCustom = false }, this, atPos, -1);
if (plotAt)
{
+4 -4
View File
@@ -166,7 +166,7 @@ HousingMap::~HousingMap()
void HousingMap::InitVisibilityDistance()
{
// Audit 2026-04-21 measured ~20× over-emission vs retail when this map used
// Audit 2026-04-21 measured ~20× over-emission vs retail when this map used
// MAX_VISIBILITY_DISTANCE (533y) ? every player received CREATE_OBJECT for
// every decor / mesh / fixture on the map regardless of where they stood.
// Retail uses a bounded distance and relies on the client's entity registry
@@ -323,7 +323,7 @@ void HousingMap::SpawnPlotGameObjects()
// fragment, SpellForVisuals, SpellXSpellVisualID) BEFORE the CREATE_OBJECT
// packet is sent. The client needs FHousingPlotAreaTrigger_C and
// DecalPropertiesId=621 in the initial create to render the plot border decal.
AreaTrigger* plotAt = AreaTrigger::CreateStaticAreaTrigger({ .Id = 37358, .IsCustom = false }, this, atPos, -1, false);
AreaTrigger* plotAt = AreaTrigger::CreateStaticAreaTrigger({ .Id = 37358, .IsCustom = false }, this, atPos, -1);
if (plotAt)
{
PhasingHandler::InitDbPhaseShift(plotAt->GetPhaseShift(), PHASE_USE_FLAGS_ALWAYS_VISIBLE, 0, 0);
@@ -1488,7 +1488,7 @@ void HousingMap::SendNeighborhoodMapEntryAuras(Player* player)
//
// 431539 (Morning Star) and 1266699 (Sound Squisher) appeared in the
// same retail burst but are character/ambient auras pre-existing before
// map entry (first seen at idx 5762/5786, 127× + 8× before map entry).
// map entry (first seen at idx 5762/5786, 127× + 8× before map entry).
// Core TC aura re-sync on map change already handles those; we emit
// only the four truly-new housing-specific auras here.
@@ -2841,7 +2841,7 @@ uint32 HousingMap::SpawnExtCompTree(uint8 plotIndex, uint32 extCompID,
float wz = parentWorldPos.GetPositionZ() + pos.GetPositionZ();
// Extract the Z-axis rotation contribution of the hook quaternion so
// that grand-children of this mesh apply the correct cumulative yaw.
// yaw = atan2(2*(w*z + x*y), 1 - 2*(y² + z²))
// yaw = atan2(2*(w*z + x*y), 1 - 2*(y² + z²))
float thisZRot = std::atan2(
2.0f * (rot.w * rot.z + rot.x * rot.y),
1.0f - 2.0f * (rot.y * rot.y + rot.z * rot.z));
+2 -2
View File
@@ -792,7 +792,7 @@ class TC_GAME_API PlayerScript : public ScriptObject
// Called when a player completes a movie
virtual void OnMovieComplete(Player* player, uint32 movieId);
virtual void OnQuestAbandon(Player* player, Quest const* quest) {}
virtual void OnQuestAbandon(Player* /*player*/, Quest const* /*quest*/) {}
};
class TC_GAME_API AccountScript : public ScriptObject
@@ -964,7 +964,7 @@ class TC_GAME_API QuestScript : public ScriptObject
virtual void OnQuestObjectiveChange(Player* player, Quest const* quest, QuestObjective const& objective, int32 oldAmount, int32 newAmount);
// Called when a quest is abandoned
virtual void OnQuestAbandon(Player* player, Quest const* quest) {}
virtual void OnQuestAbandon(Player* /*player*/, Quest const* /*quest*/) {}
};
class TC_GAME_API WorldStateScript : public ScriptObject
@@ -41,7 +41,7 @@ struct Boss_Overgrown_ancient : public BossAI
BossAI::JustEngagedWith(who);
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
events.ScheduleEvent(EVENT_SPLINTERBARKS, 4s);
events.ScheduleEvent(SPELL_HEALING_TOUCH, 25s);
events.ScheduleEvent(EVENT_HEALING_TOUCH, 25s);
events.ScheduleEvent(EVENT_BARK_BREAKER, 9s);
events.ScheduleEvent(EVENT_GERMINATE, 11s);
}
@@ -27,7 +27,7 @@ enum decatriarchevents
EVENT_DECAYING_STRENGHT = 1, //40s
EVENT_ROBUST_TOTEM, //16s
EVENT_COOKING_ROOTCLOUD, //5s
EVENT_DECAY_STRIKE = 373917, //11s
EVENT_DECAY_STRIKE, //11s
};
//186121
@@ -64,7 +64,7 @@ public:
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 1);
events.ScheduleEvent(EVENT_CONSUME, 6s);
events.ScheduleEvent(EVENT_DECAY_SPRAY, 10s);
events.ScheduleEvent(SPELL_VINE_WHIP, 15s);
events.ScheduleEvent(EVENT_VINE_WHIP, 15s);
events.ScheduleEvent(EVENT_DECAY_SPRAY_SUMMON, 13s);
}
@@ -109,11 +109,11 @@ public:
break;
case SPELL_VINE_WHIP:
DoCastVictim(SPELL_VINE_WHIP);
events.ScheduleEvent(SPELL_VINE_WHIP, 15s);
events.ScheduleEvent(EVENT_VINE_WHIP, 15s);
break;
case EVENT_DECAY_SPRAY_SUMMON:
DoCastVictim(SPELL_DECAY_SPRAY_SUMMON);
events.ScheduleEvent(SPELL_DECAY_SPRAY_SUMMON, 13s);
events.ScheduleEvent(EVENT_DECAY_SPRAY_SUMMON, 13s);
break;
}
}
@@ -70,6 +70,12 @@ enum CommanderKrolukSpellVisualKits
SPELL_VISUAL_KIT_RAMPAGE_ATTACK = 214011,
};
enum events
{
EVENT_RALLYING_BELLOW = 1,
EVENT_RAMPAGE,
};
constexpr Position SpectralAxethrowerSpawnPositions = Position{ 5199.316f, -3106.986f, 100.17826f, 2.16934f };
constexpr Position PhantasmalMysticSpawnPositions = Position{ 5231.8403f, -3097.4895f, 100.16755f, 1.17132f };
@@ -93,15 +99,15 @@ struct boss_commander_kroluk : public BossAI
{
InitNormalPhaseEvents();
damageEvents.ScheduleEvent(SPELL_RALLYING_BELLOW, 66);
damageEvents.ScheduleEvent(SPELL_RALLYING_BELLOW, 33);
damageEvents.ScheduleEvent(EVENT_RALLYING_BELLOW, 66);
damageEvents.ScheduleEvent(EVENT_RAMPAGE, 33);
}
void ExecuteEvent(uint32 eventId) override
{
switch (eventId)
{
case SPELL_RAMPAGE:
case EVENT_RAMPAGE:
DoCastVictim(SPELL_RAMPAGE);
scheduler.Schedule(2s,[this](TaskContext& context)
@@ -62,6 +62,16 @@ enum DerelictDuoMovements
POINT_POST_INTRO_POSITION = 1,
};
enum events
{
EVENT_KALIS_SHADOW_BOLT = 1,
EVENT_KALIS_CURSE_OF_DARKNESS,
EVENT_KALIS_DEBILITATING_SHRIEK,
EVENT_LATCH_SPLATTERING_SPEW,
EVENT_LATCH_BONE_HACK,
EVENT_LATCH_HEAVY_YANK
};
constexpr Position LatchFightPosition = { 5043.6562f, -3170.3074f,101.1875f, 0.99163055419921875f };
constexpr Position KalisFightPosition = { 5052.2f, -3175.05f, 100.999f, 0.99163055419921875f };
@@ -122,24 +132,24 @@ struct boss_wrs_kalis : public boss_wrs_derelict_duo_generic
void ScheduleTasks() override
{
events.ScheduleEvent(SPELL_KALIS_SHADOW_BOLT, 3s);
events.ScheduleEvent(SPELL_KALIS_CURSE_OF_DARKNESS, 22s);
events.ScheduleEvent(SPELL_KALIS_DEBILITATING_SHRIEK, 60s);
events.ScheduleEvent(EVENT_KALIS_SHADOW_BOLT, 3s);
events.ScheduleEvent(EVENT_KALIS_CURSE_OF_DARKNESS, 22s);
events.ScheduleEvent(EVENT_KALIS_DEBILITATING_SHRIEK, 60s);
}
void ExecuteEvent(uint32 eventId) override
{
switch (eventId)
{
case SPELL_KALIS_SHADOW_BOLT:
case EVENT_KALIS_SHADOW_BOLT:
DoCastRandom(SPELL_KALIS_SHADOW_BOLT);
events.Repeat(5s);
break;
case SPELL_KALIS_CURSE_OF_DARKNESS:
case EVENT_KALIS_CURSE_OF_DARKNESS:
DoCastAOE(SPELL_KALIS_CURSE_OF_DARKNESS);
DoCastAOE(SPELL_KALIS_CURSE_OF_DARKNESS_SELECT_TARGET);
break;
case SPELL_KALIS_DEBILITATING_SHRIEK:
case EVENT_KALIS_DEBILITATING_SHRIEK:
{
events.Reset();
Position randomPos = me->GetRandomNearPosition(20.f);
@@ -202,25 +212,25 @@ struct boss_wrs_latch : public boss_wrs_derelict_duo_generic
void ScheduleTasks() override
{
events.ScheduleEvent(SPELL_LATCH_SPLATTERING_SPEW, 10s);
events.ScheduleEvent(SPELL_LATCH_BONE_HACK, 15s);
events.ScheduleEvent(SPELL_LATCH_HEAVY_YANK, 60s);
events.ScheduleEvent(EVENT_LATCH_SPLATTERING_SPEW, 10s);
events.ScheduleEvent(EVENT_LATCH_BONE_HACK, 15s);
events.ScheduleEvent(EVENT_LATCH_HEAVY_YANK, 60s);
}
void ExecuteEvent(uint32 eventId) override
{
switch (eventId)
{
case SPELL_LATCH_SPLATTERING_SPEW:
case EVENT_LATCH_SPLATTERING_SPEW:
DoCastAOE(SPELL_LATCH_SPLATTERING_SPEW);
DoCastAOE(SPELL_LATCH_SPLATTERING_SPEW_VISUAL, true);
events.Repeat(30s);
break;
case SPELL_LATCH_BONE_HACK:
case EVENT_LATCH_BONE_HACK:
DoCastVictim(SPELL_LATCH_BONE_HACK);
events.Repeat(20s);
break;
case SPELL_LATCH_HEAVY_YANK:
case EVENT_LATCH_HEAVY_YANK:
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.f, true))
{
+1 -1
View File
@@ -2172,7 +2172,7 @@ class aura_mage_clearcasting_proc : public AuraScript
return false;
}
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
+1 -1
View File
@@ -2694,7 +2694,7 @@ class spell_warr_indomitable : public AuraScript
return _rageAccumulator >= GetEffect(EFFECT_1)->GetAmount();
}
void HandleProc(ProcEventInfo const& eventInfo)
void HandleProc(ProcEventInfo const& /*eventInfo*/)
{
Unit* target = GetTarget();