mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Scripts/Icecrown Citadel
* Sister Svalna will now fly and land properly * Fixed visuals in Blood Prince Council fight * Flying triggers will now fly properly
This commit is contained in:
12
sql/updates/world/2012_04_23_00_world_creatures.sql
Normal file
12
sql/updates/world/2012_04_23_00_world_creatures.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
UPDATE `creature_template` SET `flags_extra`=0x82,`ModelId1`=1126,`ModelId2`=16925 WHERE `entry` IN (38008,38641,38773,38774); -- Blood Orb Controller
|
||||
UPDATE `creature_template` SET `flags_extra`=0x80,`ModelId1`=19725,`ModelId2`=31095,`baseattacktime`=2000,`speed_walk`=0.8,`speed_run`=0.28571 WHERE `entry` IN (38454,38775,38776,38777); -- Kinetic Bomb
|
||||
UPDATE `creature_template` SET `exp`=2,`baseattacktime`=2000,`ModelId1`=19725,`ModelId2`=21342 WHERE `entry`=38458; -- Kinetic Bomb Target
|
||||
UPDATE `creature_template` SET `baseattacktime`=2000,`speed_walk`=4.4,`ModelId1`=19725,`ModelId2`=26767 WHERE `entry` IN (38332,38451); -- Ball of Flame
|
||||
UPDATE `creature_template` SET `flags_extra`=0x80 WHERE `entry`=37950; -- Valithria Dreamwalker
|
||||
UPDATE `creature_template` SET `InhabitType`=4 WHERE `InhabitType`&4 AND `flags_extra`&0x80; -- make flying triggers fly
|
||||
UPDATE `creature_template` SET `InhabitType`=4,`HoverHeight`=12 WHERE `entry`=37126; -- Sister Svalna
|
||||
UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=37950; -- Valithria Dreamwalker
|
||||
UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=0,`gender`=0 WHERE `modelid`=31095; -- Kinetic Bomb
|
||||
UPDATE `creature_model_info` SET `bounding_radius`=0.5,`combat_reach`=1,`gender`=0 WHERE `modelid`=21342; -- Kinetic Bomb Target
|
||||
UPDATE `creature_model_info` SET `bounding_radius`=0.5,`combat_reach`=1,`gender`=0 WHERE `modelid`=26767; -- Ball of Flame
|
||||
UPDATE `creature_template_addon` SET `bytes1`=50331648,`bytes2`=1,`mount`=0,`emote`=0,`auras`=NULL WHERE `entry`=38454; -- Kinetic Bomb
|
||||
@@ -103,6 +103,7 @@ enum Spells
|
||||
SPELL_UNSTABLE = 72059,
|
||||
SPELL_KINETIC_BOMB_VISUAL = 72054,
|
||||
SPELL_KINETIC_BOMB_EXPLOSION = 72052,
|
||||
SPELL_KINETIC_BOMB_KNOCKBACK = 72087,
|
||||
|
||||
// Shock Vortex
|
||||
SPELL_SHOCK_VORTEX_PERIODIC = 71945,
|
||||
@@ -443,20 +444,12 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
{
|
||||
summons.Summon(summon);
|
||||
Position pos;
|
||||
pos.Relocate(summon);
|
||||
me->GetPosition(&pos);
|
||||
float maxRange = me->GetDistance2d(summon);
|
||||
float angle = me->GetAngle(summon);
|
||||
// prevent spawning outside of room
|
||||
while (!me->IsWithinLOS(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ()))
|
||||
{
|
||||
maxRange -= 5.0f;
|
||||
if (maxRange < 5.0f)
|
||||
break;
|
||||
|
||||
summon->MovePosition(pos, float(rand_norm() * maxRange), angle);
|
||||
}
|
||||
|
||||
me->MovePositionToFirstCollision(pos, maxRange, angle);
|
||||
summon->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
|
||||
summon->ToTempSummon()->SetTempSummonType(TEMPSUMMON_CORPSE_DESPAWN);
|
||||
}
|
||||
|
||||
void DamageDealt(Unit* /*target*/, uint32& damage, DamageEffectType damageType)
|
||||
@@ -894,6 +887,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
summon->GetPosition(x, y, z);
|
||||
float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
|
||||
summon->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, x, y, ground_Z);
|
||||
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
}
|
||||
case NPC_SHOCK_VORTEX:
|
||||
@@ -1073,7 +1067,7 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
||||
if (_introDone)
|
||||
return;
|
||||
|
||||
if (!me->IsWithinDistInMap(who, 35.0f))
|
||||
if (!me->IsWithinDistInMap(who, 35.0f, false))
|
||||
return;
|
||||
|
||||
_introDone = true;
|
||||
@@ -1232,12 +1226,12 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetDisplayId(DISPLAY_KINETIC_BOMB);
|
||||
me->SetWalk(true);
|
||||
me->CastSpell(me, SPELL_UNSTABLE, true);
|
||||
me->CastSpell(me, SPELL_KINETIC_BOMB_VISUAL, true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetSpeed(MOVE_FLIGHT, IsHeroic() ? 0.3f : 0.15f, true);
|
||||
me->GetPosition(_x, _y, _groundZ);
|
||||
me->DespawnOrUnsummon(60000);
|
||||
_groundZ = me->GetMap()->GetHeight(me->GetPhaseMask(), _x, _y, _groundZ, true, 500.0f);
|
||||
}
|
||||
|
||||
@@ -1247,9 +1241,9 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_BOMB_DESPAWN, 1000);
|
||||
else if (action == ACTION_KINETIC_BOMB_JUMP)
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveJump(_x, _y, me->GetPositionZ() + 7.0f, 1.0f, 7.0f);
|
||||
_events.ScheduleEvent(EVENT_CONTINUE_FALLING, 700);
|
||||
if (!me->HasAura(SPELL_KINETIC_BOMB_KNOCKBACK))
|
||||
me->GetMotionMaster()->MoveCharge(_x, _y, me->GetPositionZ() + 100.0f, me->GetSpeed(MOVE_RUN), 0);
|
||||
_events.RescheduleEvent(EVENT_CONTINUE_FALLING, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1263,10 +1257,10 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
{
|
||||
case EVENT_BOMB_DESPAWN:
|
||||
me->SetVisible(false);
|
||||
me->DespawnOrUnsummon(5000);
|
||||
break;
|
||||
case EVENT_CONTINUE_FALLING:
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, _x, _y, _groundZ);
|
||||
me->GetMotionMaster()->MoveCharge(_x, _y, _groundZ, me->GetSpeed(MOVE_WALK), POINT_KINETIC_BOMB_IMPACT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1329,17 +1323,16 @@ class npc_dark_nucleus : public CreatureScript
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& /*damage*/)
|
||||
{
|
||||
if (attacker == me)
|
||||
if (attacker == me || attacker == me->getVictim())
|
||||
return;
|
||||
|
||||
if (!_lockedTarget)
|
||||
if (me->getVictim() == attacker)
|
||||
_lockedTarget = true;
|
||||
me->DeleteThreatList();
|
||||
me->AddThreat(attacker, 500000000.0f);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (!me->isInCombat())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (_targetAuraCheck <= diff)
|
||||
@@ -1355,23 +1348,6 @@ class npc_dark_nucleus : public CreatureScript
|
||||
}
|
||||
else
|
||||
_targetAuraCheck -= diff;
|
||||
|
||||
if (!_lockedTarget)
|
||||
{
|
||||
if (Unit* victim = me->SelectVictim())
|
||||
{
|
||||
if (me->getVictim() && me->getVictim() != victim)
|
||||
{
|
||||
me->getVictim()->RemoveAurasDueToSpell(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID());
|
||||
_lockedTarget = true;
|
||||
}
|
||||
|
||||
_lockedTarget = true;
|
||||
AttackStart(victim);
|
||||
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1525,6 +1501,7 @@ class spell_valanar_kinetic_bomb : public SpellScriptLoader
|
||||
Position offset = {0.0f, 0.0f, 20.0f, 0.0f};
|
||||
summonPos.RelocateOffset(offset);
|
||||
SetTargetDest(summonPos);
|
||||
GetHitDest()->RelocateOffset(offset);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -1586,7 +1563,7 @@ class spell_valanar_kinetic_bomb_knockback : public SpellScriptLoader
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_valanar_kinetic_bomb_knockback_SpellScript::KnockIntoAir);
|
||||
BeforeHit += SpellHitFn(spell_valanar_kinetic_bomb_knockback_SpellScript::KnockIntoAir);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1663,7 +1640,7 @@ class spell_blood_council_shadow_prison_damage : public SpellScriptLoader
|
||||
void AddExtraDamage()
|
||||
{
|
||||
if (Aura* aur = GetHitUnit()->GetAura(GetSpellInfo()->Id))
|
||||
if (AuraEffect const* eff = aur->GetEffect(1))
|
||||
if (AuraEffect const* eff = aur->GetEffect(EFFECT_1))
|
||||
SetHitDamage(GetHitDamage() + eff->GetAmount());
|
||||
}
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if ((!UpdateVictim() && !(events.GetPhaseMask() & PHASE_MASK_NOT_SELF)) || !CheckInRoom())
|
||||
if ((!(events.GetPhaseMask() & PHASE_MASK_NOT_SELF) && !UpdateVictim()) || !CheckInRoom())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
@@ -713,6 +713,7 @@ class npc_spinestalker : public CreatureScript
|
||||
me->SetDisableGravity(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
me->SetHomePosition(SpinestalkerLandPos);
|
||||
me->SetFacingTo(SpinestalkerLandPos.GetOrientation());
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
@@ -839,6 +840,7 @@ class npc_rimefang : public CreatureScript
|
||||
me->SetDisableGravity(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
me->SetHomePosition(RimefangLandPos);
|
||||
me->SetFacingTo(RimefangLandPos.GetOrientation());
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
|
||||
@@ -796,7 +796,8 @@ class boss_sister_svalna : public CreatureScript
|
||||
{
|
||||
_JustReachedHome();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHover(false);
|
||||
}
|
||||
|
||||
void DoAction(int32 const action)
|
||||
@@ -838,13 +839,14 @@ class boss_sister_svalna : public CreatureScript
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE || id != POINT_LAND)
|
||||
if (type != EFFECT_MOTION_TYPE || id != POINT_LAND)
|
||||
return;
|
||||
|
||||
_isEventInProgress = false;
|
||||
me->setActive(false);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHover(false);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
@@ -1921,10 +1923,10 @@ class spell_svalna_revive_champion : public SpellScriptLoader
|
||||
Position pos;
|
||||
caster->GetPosition(&pos);
|
||||
caster->GetNearPosition(pos, 5.0f, 0.0f);
|
||||
pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 20.0f);
|
||||
pos.m_positionZ += 0.05f;
|
||||
//pos.m_positionZ = caster->GetBaseMap()->GetHeight(caster->GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), caster->GetPositionZ(), true, 50.0f);
|
||||
//pos.m_positionZ += 0.05f;
|
||||
caster->SetHomePosition(pos);
|
||||
caster->GetMotionMaster()->MovePoint(POINT_LAND, pos);
|
||||
caster->GetMotionMaster()->MoveLand(POINT_LAND, pos, caster->GetSpeed(MOVE_FLIGHT));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
Reference in New Issue
Block a user