diff options
| author | Shauren <shauren.trinity@gmail.com> | 2011-10-08 17:39:03 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2011-10-08 17:39:03 +0200 |
| commit | 72fc756bff32e68ee02043a7d635cdee357781b1 (patch) | |
| tree | 88012bd9ac3a3f070c33dae5c1840f142e0881eb /src/server/scripts | |
| parent | 0b243dfd9b789437fcb9b1a39bcb385417548550 (diff) | |
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)
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp | 41 | ||||
| -rwxr-xr-x | src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp | 3 |
2 files changed, 30 insertions, 14 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 01fe08f31e2..ab3046806db 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -796,6 +796,7 @@ class boss_sister_svalna : public CreatureScript { _JustReachedHome(); me->SetReactState(REACT_PASSIVE); + me->SetFlying(false); } void DoAction(int32 const action) @@ -843,22 +844,13 @@ class boss_sister_svalna : public CreatureScript _isEventInProgress = false; me->setActive(false); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE); + me->SetFlying(false); } void SpellHitTarget(Unit* target, SpellInfo const* spell) { 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: me->Kill(target); break; @@ -866,8 +858,8 @@ class boss_sister_svalna : public CreatureScript if (TempSummon* summon = target->SummonCreature(NPC_IMPALING_SPEAR, *target)) { 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->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_UNK1 | UNIT_FLAG2_ALLOW_ENEMY_INTERACT); } break; default: @@ -902,7 +894,10 @@ class boss_sister_svalna : public CreatureScript break; case EVENT_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); + } events.ScheduleEvent(EVENT_IMPALING_SPEAR, urand(20000, 25000)); break; default: @@ -1913,13 +1908,29 @@ class spell_svalna_revive_champion : public SpellScriptLoader void RemoveAliveTarget(std::list<Unit*>& unitList) { - unitList.remove_if (AliveCheck()); + unitList.remove_if(AliveCheck()); 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() { 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); if (Creature* target = GetHitCreature()) - target->DespawnOrUnsummon(); + { + if (Unit* vehicle = target->GetVehicleBase()) + vehicle->RemoveAurasDueToSpell(SPELL_IMPALING_SPEAR); + target->DespawnOrUnsummon(1); + } } void Register() diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 90078e44d10..a7235e34f3a 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -21,6 +21,7 @@ #include "ScriptedCreature.h" #include "Map.h" #include "PoolMgr.h" +#include "AccountMgr.h" #include "icecrown_citadel.h" enum EventIds @@ -949,7 +950,7 @@ class instance_icecrown_citadel : public InstanceMapScript bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const { - if (player && player->isGameMaster()) + if (player && AccountMgr::IsGMAccount(player->GetSession()->GetSecurity())) return true; switch (bossId) |
