diff --git a/src/game/AI/EventAI/CreatureEventAI.cpp b/src/game/AI/EventAI/CreatureEventAI.cpp index d00e8463afd..8e7fdc1f4c4 100644 --- a/src/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/game/AI/EventAI/CreatureEventAI.cpp @@ -1630,7 +1630,7 @@ void CreatureEventAI::OnVehicleRide(Unit* vehicle, bool boarded, uint8 seat) IncreaseDepthIfNecessary(); for (auto& i : m_CreatureEventAIList) if (i.event.event_type == EVENT_T_BOARD_VEHICLE) - if (i.event.boardVehicle.board == boarded || i.event.boardVehicle.board == 2) + if (bool(i.event.boardVehicle.board) == boarded || i.event.boardVehicle.board == 2) if (i.event.boardVehicle.seat == seat || i.event.boardVehicle.seat == -1) CheckAndReadyEventForExecution(i, vehicle); ProcessEvents(vehicle); @@ -1641,7 +1641,7 @@ void CreatureEventAI::OnPassengerRide(Unit* passenger, bool boarded, uint8 seat) IncreaseDepthIfNecessary(); for (auto& i : m_CreatureEventAIList) if (i.event.event_type == EVENT_T_PASSENGER_BOARDED) - if (i.event.passengerBoard.board == boarded || i.event.passengerBoard.board == 2) + if (bool(i.event.passengerBoard.board) == boarded || i.event.passengerBoard.board == 2) if (i.event.passengerBoard.seat == seat || i.event.passengerBoard.seat == -1) CheckAndReadyEventForExecution(i, passenger); ProcessEvents(passenger); diff --git a/src/game/AI/ScriptDevAI/base/TimerAI.cpp b/src/game/AI/ScriptDevAI/base/TimerAI.cpp index ac15aadbf86..2913ab63bbd 100644 --- a/src/game/AI/ScriptDevAI/base/TimerAI.cpp +++ b/src/game/AI/ScriptDevAI/base/TimerAI.cpp @@ -28,7 +28,7 @@ bool Timer::UpdateTimer(const uint32 diff, bool combat) if (disabled) return false; - if (combatSetting != TIMER_ALWAYS && combatSetting != combat) + if (combatSetting != TIMER_ALWAYS && bool(combatSetting) != combat) return false; if (timer <= diff) diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_patchwerk.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_patchwerk.cpp index 35009cde2a1..b425be220e3 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -112,7 +112,7 @@ struct HatefulStrikePrimer : public SpellScript auto const& threatList = spell->GetCaster()->getThreatManager().getThreatList(); uint32 i = 0; - for (auto itr = threatList.begin(); itr != threatList.end() && i < (spell->GetCaster()->GetMap()->IsRegularDifficulty() ? 2 : 3); ++itr, ++i) + for (auto itr = threatList.begin(); itr != threatList.end() && i < (spell->GetCaster()->GetMap()->IsRegularDifficulty() ? 2u : 3u); ++itr, ++i) if ((*itr)->getTarget() == target) return true; return false; diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_sapphiron.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_sapphiron.cpp index 9892fdb3030..f05d94a66ac 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -257,7 +257,7 @@ struct IceBolt : public SpellScript if (Unit* target = caster->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, SPELL_ICEBOLT, SELECT_FLAG_PLAYER | SELECT_FLAG_NOT_AURA)) caster->CastSpell(target, SPELL_ICEBOLT, TRIGGERED_NONE); - if (boss_ai->m_iceboltCount >= (boss_ai->m_isRegularMode ? 2 : 3)) + if (boss_ai->m_iceboltCount >= (boss_ai->m_isRegularMode ? 2u : 3u)) { caster->CastSpell(nullptr, SPELL_FROST_BREATH, TRIGGERED_IGNORE_COOLDOWNS | TRIGGERED_IGNORE_GCD); caster->CastSpell(nullptr, SPELL_FROST_BREATH_DUMMY, TRIGGERED_IGNORE_COOLDOWNS | TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_GCD); diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 3e566087839..3e50233fad1 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -1659,7 +1659,7 @@ struct HodirsProtectiveGaze : AuraScript Player* player = dynamic_cast(aura->GetTarget()); if (!player) return; - if (player->GetHealth() > remainingDamage) + if (player->GetHealth() > uint32(remainingDamage)) return; instance_ulduar* instance = dynamic_cast(player->GetMap()->GetInstanceData()); if (!instance) diff --git a/src/game/Entities/Creature.cpp b/src/game/Entities/Creature.cpp index f5aacf74adc..37373258a15 100644 --- a/src/game/Entities/Creature.cpp +++ b/src/game/Entities/Creature.cpp @@ -696,7 +696,7 @@ uint32 Creature::ChooseDisplayId(const CreatureInfo* cinfo, const CreatureData* { if (cinfo->DisplayId[i]) { - if (roll < cinfo->DisplayIdProbability[i]) + if (roll < int32(cinfo->DisplayIdProbability[i])) { display_id = cinfo->DisplayId[i]; break; diff --git a/src/game/Entities/StatSystem.cpp b/src/game/Entities/StatSystem.cpp index 6e9f1188983..26ce3f53ee6 100644 --- a/src/game/Entities/StatSystem.cpp +++ b/src/game/Entities/StatSystem.cpp @@ -1063,7 +1063,7 @@ bool Pet::UpdateStats(Stats stat) // value = ((base_value * base_pct) + total_value) * total_pct float value = GetTotalStatValue(stat); if (GetUInt32Value(UNIT_CREATED_BY_SPELL) == 697 && m_glyphedStat) - value *= 1.2; + value *= 1.2f; float oldValue = GetStat(stat); SetStat(stat, int32(value)); @@ -1156,7 +1156,7 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged) // float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE); float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f; if (GetUInt32Value(UNIT_CREATED_BY_SPELL) == 30146 && m_glyphedStat) - attPowerMultiplier *= 1.2; + attPowerMultiplier *= 1.2f; attPowerMultiplier -= 1.0f; // UNIT_FIELD_(RANGED)_ATTACK_POWER field