Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Scripts/Icecrown Citadel: Corrected flying animations for frostwyrms …

…in Sindragosa's Lair and prevent reentering combat with Deathbringer Saurfang after encounter is won
  • Loading branch information...
commit 4a96ae22a98b1e4b9865c53e9194fe9e133226a1 1 parent 7d60290
@Shauren Shauren authored
View
2  sql/updates/world/2012_03_14_00_world_creature_addon.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_addon` SET `bytes1`=0x3000000 WHERE `guid`=207210;
+UPDATE `creature_addon` SET `bytes1`=0x3000000 WHERE `guid`=207211;
View
9 src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -269,6 +269,9 @@ class boss_deathbringer_saurfang : public CreatureScript
void EnterCombat(Unit* who)
{
+ if (_dead)
+ return;
+
if (!instance->CheckRequiredBosses(DATA_DEATHBRINGER_SAURFANG, who->ToPlayer()))
{
EnterEvadeMode();
@@ -336,8 +339,11 @@ class boss_deathbringer_saurfang : public CreatureScript
Talk(SAY_KILL);
}
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
+ void DamageTaken(Unit* /*attacker*/, uint32& damage)
{
+ if (damage >= me->GetHealth())
+ damage = me->GetHealth() - 1;
+
if (!_frenzied && HealthBelowPct(31)) // AT 30%, not below
{
_frenzied = true;
@@ -350,6 +356,7 @@ class boss_deathbringer_saurfang : public CreatureScript
_dead = true;
_JustDied();
_EnterEvadeMode();
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
DoCastAOE(SPELL_REMOVE_MARKS_OF_THE_FALLEN_CHAMPION);
DoCast(me, SPELL_ACHIEVEMENT, true);
View
10 src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -250,6 +250,9 @@ class boss_sindragosa : public CreatureScript
return;
me->setActive(true);
+ me->SetCanFly(true);
+ me->SetDisableGravity(true);
+ me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetSpeed(MOVE_FLIGHT, 4.0f);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
float moveTime = me->GetExactDist(&SindragosaFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f);
@@ -277,9 +280,10 @@ class boss_sindragosa : public CreatureScript
me->setActive(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetHomePosition(SindragosaLandPos);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetSpeed(MOVE_FLIGHT, 2.0f);
+ me->SetSpeed(MOVE_FLIGHT, 2.5f);
// Sindragosa enters combat as soon as she lands
DoZoneInCombat();
@@ -294,6 +298,7 @@ class boss_sindragosa : public CreatureScript
case POINT_LAND:
me->SetCanFly(false);
me->SetDisableGravity(false);
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_DEFENSIVE);
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
me->GetMotionMaster()->MovementExpired();
@@ -427,6 +432,7 @@ class boss_sindragosa : public CreatureScript
Talk(SAY_AIR_PHASE);
me->SetCanFly(true);
me->SetDisableGravity(true);
+ me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetReactState(REACT_PASSIVE);
Position pos;
pos.Relocate(me);
@@ -662,6 +668,7 @@ class npc_spinestalker : public CreatureScript
me->setActive(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetHomePosition(SpinestalkerLandPos);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
@@ -787,6 +794,7 @@ class npc_rimefang : public CreatureScript
me->setActive(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
+ me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetHomePosition(RimefangLandPos);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
Please sign in to comment.
Something went wrong with that request. Please try again.