Core/Misc: fixed a bunch of GCC warnings
This commit is contained in:
1 parent
9c88c6ea91
commit
ca9f34574d
10 files changed
+24
-26
No files matched your search
@@ -1589,7 +1589,7 @@ public:
|
||||
if (!name)
|
||||
name = "Unknown item";
|
||||
handler->PSendSysMessage(alternateString ? LANG_COMMAND_NPC_SHOWLOOT_ENTRY_2 : LANG_COMMAND_NPC_SHOWLOOT_ENTRY,
|
||||
itemCount, ItemQualityColors[itemTemplate ? itemTemplate->GetQuality() : ITEM_QUALITY_POOR], itemId, name, itemId);
|
||||
itemCount, ItemQualityColors[itemTemplate ? itemTemplate->GetQuality() : static_cast<uint8>(ITEM_QUALITY_POOR)], itemId, name, itemId);
|
||||
}
|
||||
static void _IterateNotNormalLootMap(ChatHandler* handler, NotNormalLootItemMap const& map, std::vector<LootItem> const& items)
|
||||
{
|
||||
|
||||
@@ -490,8 +490,8 @@ struct npc_brazie_the_bonatist_vehicle : public VehicleAI
|
||||
case EVENT_CREATE_GHOUL:
|
||||
{
|
||||
// The tutorial quest only spawns zombies in the center lane
|
||||
uint8 index = _currentLevel == LEVEL_TUTORIAL ? CENTER_ZOMBIE_LANE_INDEX : urand(0, MAX_TARGET_POSITIONS - 1);
|
||||
Position pos = SpitterTargetPositions[index];
|
||||
uint8 index = _currentLevel == LEVEL_TUTORIAL ? static_cast<uint8>(CENTER_ZOMBIE_LANE_INDEX) : static_cast<uint8>(urand(0, MAX_TARGET_POSITIONS - 1));
|
||||
Position const& pos = SpitterTargetPositions[index];
|
||||
float angle = pos.GetAngle(GoalStalkerPositions[index]);
|
||||
|
||||
uint32 spellId = 0;
|
||||
|
||||
@@ -744,7 +744,7 @@ struct boss_ragnaros_firelands : public BossAI
|
||||
events.Repeat(1min);
|
||||
break;
|
||||
case EVENT_ENGULFING_FLAMES:
|
||||
DoCastAOE(IsHeroic() ? SPELL_WORLD_IN_FLAMES : SPELL_ENGULFING_FLAMES, CastSpellExtraArgs().AddSpellBP0(urand(0, 2)));
|
||||
DoCastAOE(IsHeroic() ? SPELL_WORLD_IN_FLAMES : static_cast<uint32>(SPELL_ENGULFING_FLAMES), CastSpellExtraArgs().AddSpellBP0(urand(0, 2)));
|
||||
Talk(IsHeroic() ? SAY_ANNOUNCE_WORLD_IN_FLAMES : SAY_ANNOUNCE_ENGULFING_FLAMES);
|
||||
events.Repeat(events.IsInPhase(PHASE_TWO) ? 1min : 30s);
|
||||
break;
|
||||
|
||||
@@ -340,7 +340,7 @@ class spell_dru_eclipse_mastery_driver_passive : public AuraScript
|
||||
target->CastSpell(target, SPELL_DRUID_EUPHORIA_MANA_ENERGIZE, CastSpellExtraArgs().AddSpellBP0(euphoria->GetAmount()));
|
||||
|
||||
// T11 Bonus
|
||||
if (AuraEffect const* t11Bonus = target->GetAuraEffect(SPELL_DRUID_ITEM_T11_BALANCE_4P_BONUS, EFFECT_0))
|
||||
if (target->GetAuraEffect(SPELL_DRUID_ITEM_T11_BALANCE_4P_BONUS, EFFECT_0))
|
||||
target->CastSpell(target, SPELL_DRUID_ASTRAL_ALIGNMENT, CastSpellExtraArgs().AddSpellMod(SPELLVALUE_AURA_STACK, 3));
|
||||
}
|
||||
|
||||
|
||||
@@ -4522,19 +4522,18 @@ class spell_gen_blink : public SpellScriptLoader
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || !caster->IsCreature())
|
||||
return;
|
||||
|
||||
Creature* creature = caster->ToCreature();
|
||||
if (Unit* target = creature->GetThreatManager().GetCurrentVictim())
|
||||
{
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
creature->GetThreatManager().ResetThreat(target);
|
||||
if (creature->IsAIEnabled())
|
||||
{
|
||||
if (Unit* target = caster->GetThreatManager().GetCurrentVictim())
|
||||
{
|
||||
caster->GetThreatManager().ResetThreat(target);
|
||||
if (caster->IsAIEnabled())
|
||||
{
|
||||
caster->CastSpell(target, SPELL_BLINK_TARGET, true);
|
||||
caster->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
creature->CastSpell(target, SPELL_BLINK_TARGET, true);
|
||||
creature->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user