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
@@ -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