Pelf

chimaeron&maloriak update

Nov 17th, 2011
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.55 KB | None | 0 0
  1. diff --git a/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_himeron.cpp b/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_himeron.cpp
  2. index b15f623..aa66323 100644
  3. --- a/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_himeron.cpp
  4. +++ b/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_himeron.cpp
  5. @@ -101,6 +101,7 @@ public:
  6.             events.ScheduleEvent(EVENT_CAUSTIC_SLIME, 10000);
  7.             events.ScheduleEvent(EVENT_MASSACRE, 31000);
  8.             pInstance->SetData(DATA_CHIMAERON, IN_PROGRESS);
  9. +           DoZoneInCombat();
  10.         }
  11.        
  12.         void DamageDealt(Unit* victim, uint32 &damage, DamageEffectType damageType)
  13. @@ -240,9 +241,6 @@ public:
  14.             return false;
  15.         if (pInstance->GetData(DATA_CHIMAERON) == IN_PROGRESS || pInstance->GetData(DATA_BILE_O_TRON_800) == 1)
  16.             return false;
  17. -       if (pPlayer->GetGroup())
  18. -           if (pPlayer->GetGUID() != pPlayer->GetGroup()->GetLeaderGUID())
  19. -               return false;
  20.         pPlayer->ADD_GOSSIP_ITEM(0, "Restrictions? What restrictions?", GOSSIP_SENDER_MAIN, 800005);
  21.          pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID());
  22.          return true;
  23. diff --git a/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_maloriak.cpp b/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_maloriak.cpp
  24. index adbc531..aad5222 100644
  25. --- a/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_maloriak.cpp
  26. +++ b/src/server/scripts/EasternKingdoms/BlackwingDescent/boss_maloriak.cpp
  27. @@ -48,10 +48,12 @@ enum Spells
  28.     //2 - frost phase
  29.     SPELL_FLASH_FREEZE          = 77699,
  30.     SPELL_BITING_CHILL          = 77760,
  31. +   SPELL_BITING_CHILL_DMG      = 77763,
  32.  
  33.     //3 - execute phase
  34.     SPELL_RELEASE_ALL_MINIONS   = 77991,
  35.     SPELL_ABSOLUTE_ZERO         = 78223,
  36. +   SPELL_ABSOLUTE_ZERO_AURA    = 78201,
  37.     SPELL_ABSOLUTE_ZERO_DMG     = 78208,
  38.     SPELL_SHATTER               = 77715,
  39.     SPELL_ACID_NOVA             = 78225,
  40. @@ -161,6 +163,13 @@ public:
  41.         void Reset()
  42.         {
  43.             //сделать в ядре для всех сложностей
  44. +           if (SpellEntry* spell = GET_SPELL(SPELL_FLASH_FREEZE))
  45. +           {
  46. +               spell->EffectRadiusIndex[0] = 8; // EFFECT_RADIUS_5_YARDS;
  47. +               spell->EffectRadiusIndex[1] = 8; // EFFECT_RADIUS_5_YARDS;
  48. +           }
  49. +           if (SpellEntry* spell = GET_SPELL(SPELL_BITING_CHILL_DMG))
  50. +               spell->EffectRadiusIndex[0] = 29; // EFFECT_RADIUS_6_YARDS
  51.             if (SpellEntry* spell = GET_SPELL(SPELL_DEBILITATING_SLIME))
  52.             {
  53.                 spell->EffectRadiusIndex[0] = 12; // EFFECT_RADIUS_100_YARDS
  54. @@ -183,6 +192,11 @@ public:
  55.                 spell->EffectRadiusIndex[2] = 13; // EFFECT_RADIUS_10_YARDS
  56.                 spell->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; // Аура должна стакаться от разных нпц
  57.             }
  58. +           if (SpellEntry* spell = GET_SPELL(SPELL_ABSOLUTE_ZERO_DMG))
  59. +           {
  60. +               spell->EffectRadiusIndex[0] = 8; // EFFECT_RADIUS_5_YARDS;
  61. +               spell->EffectRadiusIndex[1] = 8; // EFFECT_RADIUS_5_YARDS;
  62. +           }
  63.             stage = 0;
  64.             maloriakOrientation = 0;
  65.             if (pInstance)
  66. @@ -241,9 +255,9 @@ public:
  67.         {
  68.             events.CancelEvent(EVENT_REMEDY);
  69.             events.CancelEvent(EVENT_ARCANE_STORM);
  70. -           events.ScheduleEvent(EVENT_ABSOLUTE_ZERO, urand(10000, 15000));
  71. +           events.ScheduleEvent(EVENT_ABSOLUTE_ZERO, urand(4000, 5000));
  72.             events.ScheduleEvent(EVENT_MAGMA_JETS, 5000);
  73. -           events.ScheduleEvent(EVENT_ACID_NOVA, urand(15000, 20000));
  74. +           events.ScheduleEvent(EVENT_ACID_NOVA, urand(7000, 8000));
  75.         }
  76.  
  77.         void EnterCombat(Unit* attacker)
  78. @@ -262,6 +276,7 @@ public:
  79.         void JustDied(Unit* /*killer*/)
  80.         {
  81.             Talk(SAY_DEATH);
  82. +           summons.DespawnAll();
  83.             if (pInstance)
  84.                 pInstance->SetData(DATA_MALORIAK, DONE);
  85.         }
  86. @@ -280,11 +295,16 @@ public:
  87.         void SpellHit(Unit* caster, SpellEntry const* spell)
  88.         {
  89.             if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL))
  90. -               if ((me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_RELEASE_ABERRATIONS) ||
  91. -                   (me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_ARCANE_STORM))
  92. +               if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_RELEASE_ABERRATIONS)
  93. +                   for (uint8 i = 0; i < 3; ++i)
  94. +                       if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
  95. +                           me->InterruptSpell(CURRENT_GENERIC_SPELL);
  96. +
  97. +           if (me->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
  98. +               if (me->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_spellInfo->Id == SPELL_ARCANE_STORM)
  99.                     for (uint8 i = 0; i < 3; ++i)
  100.                         if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
  101. -                           me->InterruptSpell(CURRENT_GENERIC_SPELL, false);
  102. +                           me->InterruptSpell(CURRENT_CHANNELED_SPELL);
  103.         }
  104.  
  105.         void DamageTaken(Unit* attacker, uint32 &damage)
  106. @@ -447,22 +467,16 @@ public:
  107.                 case EVENT_FLASH_FREEZE:
  108.                     if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
  109.                         DoCast(target, SPELL_FLASH_FREEZE);
  110. -                   events.ScheduleEvent(EVENT_BITING_CHILL, 15000);
  111. +                   events.ScheduleEvent(EVENT_FLASH_FREEZE, 15000);
  112.                     break;
  113.                 case EVENT_ABSOLUTE_ZERO:
  114. -                   /*Пока нерабочий нпц, в будущем исправлю
  115. -                   Position pos;
  116. -                   if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
  117. -                   {
  118. -                       //DoCast(target, SPELL_ABSOLUTE_ZERO); //не срабатывает, todo: починить
  119. -                       target->GetPosition(&pos);
  120. -                       me->SummonCreature(NPC_ABSOLUTE_ZERO,
  121. -                           pos.GetPositionX() + urand(1, 4),
  122. -                           pos.GetPositionY() + urand(1,4),
  123. -                           pos.GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 8000);
  124. -                   }
  125. +                   Unit* target;
  126. +                   target = SelectTarget(SELECT_TARGET_RANDOM, 1, 15.0f);
  127. +                   if (!target)
  128. +                       target = SelectTarget(SELECT_TARGET_RANDOM);
  129. +                   DoCast(target, SPELL_ABSOLUTE_ZERO);
  130.                     events.ScheduleEvent(EVENT_ABSOLUTE_ZERO, urand(20000, 30000));
  131. -                   break;*/
  132. +                   break;
  133.                 case EVENT_MAGMA_JETS:
  134.                     maloriakOrientation = me->GetOrientation();
  135.                     DoCast(me, SPELL_MAGMA_JETS);
  136. @@ -519,6 +533,7 @@ class npc_flash_freeze : public CreatureScript
  137.                      trappedPlayer = 0;
  138.                      player->RemoveAurasDueToSpell(SPELL_FLASH_FREEZE);
  139.                  }
  140. +               me->DespawnOrUnsummon();
  141.              }
  142.  
  143.              void UpdateAI(const uint32 diff)
  144. @@ -547,7 +562,6 @@ class npc_flash_freeze : public CreatureScript
  145.          }
  146.  };
  147.  
  148. -//пока это не работает
  149.  class npc_absolute_zero : public CreatureScript
  150.  {
  151.      public:
  152. @@ -564,24 +578,43 @@ class npc_absolute_zero : public CreatureScript
  153.             }
  154.  
  155.             uint32 uiPauseTimer; //чтобы не срабатывало сразу при саммоне возле игрока
  156. +           uint32 uiDespawnTimer;
  157.             bool bCanExplode;
  158.  
  159.              void Reset()
  160.              {
  161. -               uiPauseTimer = 2000;
  162. +               uiPauseTimer = 3000;
  163. +               uiDespawnTimer = 15000;
  164.                 bCanExplode = false;
  165.              }
  166.  
  167. +           void IsSummonedBy(Unit* owner)
  168. +           {
  169. +               DoCast(SPELL_ABSOLUTE_ZERO_AURA);
  170. +           }
  171. +
  172.              void UpdateAI(const uint32 diff)
  173.              {
  174. -               if (uiPauseTimer <= diff)
  175. +               if ((uiPauseTimer <= diff) && !bCanExplode)
  176. +               {
  177.                     bCanExplode = true;
  178. +                   if (Unit* target = me->SelectNearestTarget())
  179. +                   {
  180. +                       me->AddThreat(target, 100000.0f);
  181. +                       me->GetMotionMaster()->MoveFollow(target, 0.1f, 0.0f);
  182. +                   }
  183. +               }
  184.                 else
  185.                     uiPauseTimer -= diff;
  186.  
  187. +               if (uiDespawnTimer <= diff)
  188. +                   me->DespawnOrUnsummon();
  189. +               else
  190. +                   uiDespawnTimer -= diff;
  191. +
  192.                 if (Unit* target = me->SelectNearestTarget())
  193.                 {
  194. -                   if ((me->GetDistance(target) <= 3.0f) && bCanExplode)
  195. +                   if ((me->GetDistance(target) <= 4.0f) && bCanExplode)
  196.                     {
  197.                         DoCast(SPELL_ABSOLUTE_ZERO_DMG);
  198.                         me->DespawnOrUnsummon();
  199.  
Advertisement
Add Comment
Please, Sign In to add comment