Scripts/Ulduar/Kologarn: Fix Stone Shout target selection
This commit is contained in:
@@ -2207,6 +2207,8 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
( 62166, 'spell_ulduar_stone_grip_cast_target'),
|
||||
( 63981, 'spell_ulduar_stone_grip_cast_target'),
|
||||
( 64702, 'spell_ulduar_squeezed_lifeless'),
|
||||
(63720, 'spell_kologarn_stone_shout'),
|
||||
(64004, 'spell_kologarn_stone_shout'),
|
||||
( 63027, 'spell_ulduar_proximity_mines'),
|
||||
( 63276, 'spell_mark_of_the_faceless'),
|
||||
( 63489, 'spell_shield_of_runes'),
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN(63720,64004);
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(63720,'spell_kologarn_stone_shout'),
|
||||
(64004,'spell_kologarn_stone_shout');
|
||||
@@ -330,8 +330,6 @@ class boss_kologarn : public CreatureScript
|
||||
if (!arm->isAlive())
|
||||
arm->Respawn();
|
||||
|
||||
// HACK: We should send spell SPELL_ARM_ENTER_VEHICLE here, but this will not work, because
|
||||
// the aura system will not allow it to stack from two different casters
|
||||
int32 seatId = arm->GetEntry() == NPC_LEFT_ARM ? 0 : 1;
|
||||
arm->CastCustomSpell(SPELL_ARM_ENTER_VEHICLE, SPELLVALUE_BASE_POINT0, seatId+1, me, true);
|
||||
arm->CastSpell(arm, SPELL_ARM_ENTER_VISUAL, true);
|
||||
@@ -625,13 +623,41 @@ class spell_ulduar_stone_grip : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_kologarn_stone_shout : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_kologarn_stone_shout() : SpellScriptLoader("spell_kologarn_stone_shout") { }
|
||||
|
||||
class spell_kologarn_stone_shout_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_kologarn_stone_shout_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove_if(PlayerOrPetCheck());
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_kologarn_stone_shout_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ENEMY_SRC);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_kologarn_stone_shout_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_kologarn()
|
||||
{
|
||||
new boss_kologarn();
|
||||
|
||||
new spell_ulduar_rubble_summon();
|
||||
new spell_ulduar_squeezed_lifeless();
|
||||
new spell_ulduar_cancel_stone_grip();
|
||||
new spell_ulduar_stone_grip_cast_target();
|
||||
new spell_ulduar_stone_grip_absorb();
|
||||
new spell_ulduar_stone_grip();
|
||||
new spell_kologarn_stone_shout();
|
||||
}
|
||||
|
||||
@@ -935,19 +935,6 @@ class spell_xt002_heart_overload_periodic : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class PlayerOrPetCheck
|
||||
{
|
||||
public:
|
||||
bool operator() (Unit* unit)
|
||||
{
|
||||
if (unit->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!unit->ToCreature()->isPet())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_xt002_tympanic_tantrum : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -186,4 +186,17 @@ CreatureAI* GetUlduarAI(Creature* creature)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class PlayerOrPetCheck
|
||||
{
|
||||
public:
|
||||
bool operator() (Unit* unit)
|
||||
{
|
||||
if (unit->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!unit->ToCreature()->isPet())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user