Scripts/BoT: Arion's Lightning Blast will now only hit his current victim
This commit is contained in:
1 parent
09fe7aafdf
commit
2f593819db
1 file changed
+14
-1
@@ -2369,6 +2369,19 @@ class AttackerVictimCheck
|
||||
Unit* attacker;
|
||||
};
|
||||
|
||||
class AttackerNonVictimCheck
|
||||
{
|
||||
public:
|
||||
AttackerNonVictimCheck(Unit* _attacker) : attacker(_attacker) { }
|
||||
|
||||
bool operator()(WorldObject* object)
|
||||
{
|
||||
return (attacker->GetVictim() && attacker->GetVictim() != object->ToUnit());
|
||||
}
|
||||
private:
|
||||
Unit* attacker;
|
||||
};
|
||||
|
||||
class spell_arion_lightning_blast : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_arion_lightning_blast);
|
||||
@@ -2378,7 +2391,7 @@ class spell_arion_lightning_blast : public SpellScript
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.remove_if(AttackerVictimCheck(GetCaster()));
|
||||
targets.remove_if(AttackerNonVictimCheck(GetCaster()));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in new issue
Block a user