Scripts/BoT:
* fixed an issue that was causing Arion to mark three targets for Lightning Rod on 10 player difficulty * fixed Lightning Blast's visual effect targeting * use new predicates for victim and non-victim target selection
This commit is contained in:
1 parent
8b025a7dbd
commit
c14bacd370
2 files changed
+29
-29
No files matched your search
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_arion_lightning_blast_dummy';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(94731, 'spell_arion_lightning_blast_dummy');
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CommonPredicates.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -2312,7 +2313,7 @@ class spell_arion_lightning_rod : public SpellScript
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.size() < 3)
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
uint8 size = GetCaster()->GetMap()->Is25ManRaid() ? 3 : 1;
|
||||
@@ -2400,32 +2401,6 @@ class spell_arion_disperse : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
class AttackerVictimCheck
|
||||
{
|
||||
public:
|
||||
AttackerVictimCheck(Unit* _attacker) : attacker(_attacker) { }
|
||||
|
||||
bool operator()(WorldObject* object)
|
||||
{
|
||||
return (attacker->GetVictim() && attacker->GetVictim() == object->ToUnit());
|
||||
}
|
||||
private:
|
||||
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);
|
||||
@@ -2435,7 +2410,7 @@ class spell_arion_lightning_blast : public SpellScript
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.remove_if(AttackerNonVictimCheck(GetCaster()));
|
||||
targets.remove_if(Trinity::Predicates::Invert(Trinity::Predicates::IsVictimOf(GetCaster())));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -2445,6 +2420,24 @@ class spell_arion_lightning_blast : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_arion_lightning_blast_dummy : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_arion_lightning_blast_dummy);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.remove_if(Trinity::Predicates::Invert(Trinity::Predicates::IsVictimOf(GetCaster())));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_arion_lightning_blast_dummy::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_arion_static_overload : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_arion_static_overload);
|
||||
@@ -2798,7 +2791,10 @@ class spell_elementium_monstrosity_gravity_crush : public SpellScript
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.remove_if(AttackerVictimCheck(GetCaster()));
|
||||
targets.remove_if(Trinity::Predicates::IsVictimOf(GetCaster()));
|
||||
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
Trinity::Containers::RandomResize(targets, GetCaster()->GetMap()->Is25ManRaid() ? 3 : 1);
|
||||
}
|
||||
@@ -2859,6 +2855,7 @@ void AddSC_boss_ascendant_council()
|
||||
RegisterSpellScript(spell_arion_chain_lightning_targeting);
|
||||
RegisterSpellScript(spell_arion_disperse);
|
||||
RegisterSpellScript(spell_arion_lightning_blast);
|
||||
RegisterSpellScript(spell_arion_lightning_blast_dummy);
|
||||
RegisterSpellScript(spell_arion_static_overload);
|
||||
RegisterSpellScript(spell_arion_static_overload_triggered);
|
||||
RegisterSpellScript(spell_terrastra_gravity_well);
|
||||
|
||||
Reference in new issue
Block a user