aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-10-08 17:39:03 +0200
committerShauren <shauren.trinity@gmail.com>2011-10-08 17:39:03 +0200
commit72fc756bff32e68ee02043a7d635cdee357781b1 (patch)
tree88012bd9ac3a3f070c33dae5c1840f142e0881eb
parent0b243dfd9b789437fcb9b1a39bcb385417548550 (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)
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp14
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h1
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp41
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp3
4 files changed, 31 insertions, 28 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 5ba470e13b1..6d02d943f63 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -8733,24 +8733,10 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
if (!victim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, procSpell, this))
return false;
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
case 72176:
basepoints0 = 3;
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 15338: // Improved Spirit Tap (Rank 2)
{
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 087a8a76324..8f052ab41ae 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -618,6 +618,7 @@ enum UnitFlags2
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080,
UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?)
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
};
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)