Scripts/Westfall: scripted Overloarded Harvest Golem visuals
* removed somple duplicate spawns and event related spawns that are already spawnt
This commit is contained in:
1 parent
5a86f475d9
commit
7f6e63f850
3 files changed
+68
No files matched your search
@@ -241,6 +241,7 @@ void AddSC_tirisfal_glades();
|
||||
void AddSC_tol_barad();
|
||||
void AddSC_undercity();
|
||||
void AddSC_western_plaguelands();
|
||||
void AddSC_westfall();
|
||||
void AddSC_wetlands();
|
||||
|
||||
// The name of this function should match:
|
||||
@@ -472,5 +473,6 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_tol_barad();
|
||||
AddSC_undercity();
|
||||
AddSC_western_plaguelands();
|
||||
AddSC_westfall();
|
||||
AddSC_wetlands();
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
class spell_westfall_unbound_energy : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_westfall_unbound_energy);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
targets.remove_if([caster](WorldObject const* target)->bool
|
||||
{
|
||||
return caster == target;
|
||||
});
|
||||
|
||||
if (targets.size() > 1)
|
||||
Trinity::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_westfall_unbound_energy::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_westfall()
|
||||
{
|
||||
RegisterSpellScript(spell_westfall_unbound_energy);
|
||||
}
|
||||
Reference in new issue
Block a user