Scripts/Icecrown Citadel
* Minor corrections to Sister Svalna event * Removed unneeded workarounds for Deathbringer Saurfang procs * Changed GM check to use account level (makes no sense to check isGameMaster as that does not allow entering combat at all)
This commit is contained in:
@@ -8733,24 +8733,10 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
if (!victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, procSpell, this))
|
if (!victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, procSpell, this))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
// Deathbringer Saurfang - Rune of Blood
|
|
||||||
case 72408:
|
|
||||||
// can proc only if target is marked with rune
|
|
||||||
// this should be handled by targetAuraSpell, but because 72408 is not passive
|
|
||||||
// one failed proc will remove the entire aura
|
|
||||||
if (!victim->HasAura(72410))
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
// Deathbringer Saurfang - Blood Beast's Blood Link
|
// Deathbringer Saurfang - Blood Beast's Blood Link
|
||||||
case 72176:
|
case 72176:
|
||||||
basepoints0 = 3;
|
basepoints0 = 3;
|
||||||
break;
|
break;
|
||||||
// Deathbringer Saurfang - Mark of the Fallen Champion
|
|
||||||
case 72256:
|
|
||||||
// this should be handled by targetAuraSpell, but because 72408 is not passive
|
|
||||||
// one failed proc will remove the entire aura
|
|
||||||
CastSpell((Unit*)NULL, trigger_spell_id, true, NULL, triggeredByAura);
|
|
||||||
return true;
|
|
||||||
case 15337: // Improved Spirit Tap (Rank 1)
|
case 15337: // Improved Spirit Tap (Rank 1)
|
||||||
case 15338: // Improved Spirit Tap (Rank 2)
|
case 15338: // Improved Spirit Tap (Rank 2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -618,6 +618,7 @@ enum UnitFlags2
|
|||||||
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
|
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
|
||||||
UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?)
|
UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?)
|
||||||
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
|
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
|
||||||
|
UNIT_FLAG2_ALLOW_ENEMY_INTERACT = 0x00004000,
|
||||||
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL
|
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -796,6 +796,7 @@ class boss_sister_svalna : public CreatureScript
|
|||||||
{
|
{
|
||||||
_JustReachedHome();
|
_JustReachedHome();
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
|
me->SetFlying(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 const action)
|
void DoAction(int32 const action)
|
||||||
@@ -843,22 +844,13 @@ class boss_sister_svalna : public CreatureScript
|
|||||||
_isEventInProgress = false;
|
_isEventInProgress = false;
|
||||||
me->setActive(false);
|
me->setActive(false);
|
||||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
||||||
|
me->SetFlying(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||||
{
|
{
|
||||||
switch (spell->Id)
|
switch (spell->Id)
|
||||||
{
|
{
|
||||||
case SPELL_REVIVE_CHAMPION:
|
|
||||||
{
|
|
||||||
if (!_isEventInProgress)
|
|
||||||
break;
|
|
||||||
Position pos;
|
|
||||||
me->GetPosition(&pos);
|
|
||||||
me->UpdateGroundPositionZ(pos.GetPositionX(), pos.GetPositionY(), pos.m_positionZ);
|
|
||||||
me->GetMotionMaster()->MovePoint(POINT_LAND, pos);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SPELL_IMPALING_SPEAR_KILL:
|
case SPELL_IMPALING_SPEAR_KILL:
|
||||||
me->Kill(target);
|
me->Kill(target);
|
||||||
break;
|
break;
|
||||||
@@ -866,8 +858,8 @@ class boss_sister_svalna : public CreatureScript
|
|||||||
if (TempSummon* summon = target->SummonCreature(NPC_IMPALING_SPEAR, *target))
|
if (TempSummon* summon = target->SummonCreature(NPC_IMPALING_SPEAR, *target))
|
||||||
{
|
{
|
||||||
Talk(EMOTE_SVALNA_IMPALE, target->GetGUID());
|
Talk(EMOTE_SVALNA_IMPALE, target->GetGUID());
|
||||||
summon->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_UNK1 | 0x4000);
|
|
||||||
summon->CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, 1, target, false);
|
summon->CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, 1, target, false);
|
||||||
|
summon->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_UNK1 | UNIT_FLAG2_ALLOW_ENEMY_INTERACT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -902,7 +894,10 @@ class boss_sister_svalna : public CreatureScript
|
|||||||
break;
|
break;
|
||||||
case EVENT_IMPALING_SPEAR:
|
case EVENT_IMPALING_SPEAR:
|
||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_IMPALING_SPEAR))
|
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_IMPALING_SPEAR))
|
||||||
|
{
|
||||||
|
DoCast(me, SPELL_AETHER_SHIELD);
|
||||||
DoCast(target, SPELL_IMPALING_SPEAR);
|
DoCast(target, SPELL_IMPALING_SPEAR);
|
||||||
|
}
|
||||||
events.ScheduleEvent(EVENT_IMPALING_SPEAR, urand(20000, 25000));
|
events.ScheduleEvent(EVENT_IMPALING_SPEAR, urand(20000, 25000));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1917,9 +1912,25 @@ class spell_svalna_revive_champion : public SpellScriptLoader
|
|||||||
Trinity::RandomResizeList(unitList, 2);
|
Trinity::RandomResizeList(unitList, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Land(SpellEffIndex /*effIndex*/)
|
||||||
|
{
|
||||||
|
Creature* caster = GetCaster()->ToCreature();
|
||||||
|
if (!caster)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Position pos;
|
||||||
|
caster->GetPosition(&pos);
|
||||||
|
caster->GetNearPosition(pos, 5.0f, 0.0f);
|
||||||
|
pos.m_positionZ = caster->GetBaseMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 20.0f);
|
||||||
|
pos.m_positionZ += 0.05f;
|
||||||
|
caster->SetHomePosition(pos);
|
||||||
|
caster->GetMotionMaster()->MovePoint(POINT_LAND, pos);
|
||||||
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
{
|
{
|
||||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_svalna_revive_champion_SpellScript::RemoveAliveTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY);
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_svalna_revive_champion_SpellScript::RemoveAliveTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY);
|
||||||
|
OnEffectHit += SpellEffectFn(spell_svalna_revive_champion_SpellScript::Land, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1942,7 +1953,11 @@ class spell_svalna_remove_spear : public SpellScriptLoader
|
|||||||
{
|
{
|
||||||
PreventHitDefaultEffect(effIndex);
|
PreventHitDefaultEffect(effIndex);
|
||||||
if (Creature* target = GetHitCreature())
|
if (Creature* target = GetHitCreature())
|
||||||
target->DespawnOrUnsummon();
|
{
|
||||||
|
if (Unit* vehicle = target->GetVehicleBase())
|
||||||
|
vehicle->RemoveAurasDueToSpell(SPELL_IMPALING_SPEAR);
|
||||||
|
target->DespawnOrUnsummon(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
#include "PoolMgr.h"
|
#include "PoolMgr.h"
|
||||||
|
#include "AccountMgr.h"
|
||||||
#include "icecrown_citadel.h"
|
#include "icecrown_citadel.h"
|
||||||
|
|
||||||
enum EventIds
|
enum EventIds
|
||||||
@@ -949,7 +950,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
|
|
||||||
bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const
|
bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const
|
||||||
{
|
{
|
||||||
if (player && player->isGameMaster())
|
if (player && AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
switch (bossId)
|
switch (bossId)
|
||||||
|
|||||||
Reference in New Issue
Block a user