Pelf

Pelf blood council 1 (lich king)

May 2nd, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.73 KB | None | 0 0
  1. diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
  2. index 9e185eb..6f5fc8f 100644
  3. --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
  4. +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
  5. @@ -928,6 +884,9 @@ class boss_prince_valanar_icc : public CreatureScript
  6.                          break;
  7.                      case NPC_KINETIC_BOMB:
  8.                      {
  9. +                       summon->SetSpeed(MOVE_WALK, IsHeroic()? 0.3f: 0.15f, true);
  10. +                       summon->SetSpeed(MOVE_RUN, IsHeroic()? 0.3f: 0.15f, true);
  11. +                       summon->SetSpeed(MOVE_FLIGHT, IsHeroic()? 0.3f: 0.15f, true);
  12.                          float x, y, z;
  13.                          summon->GetPosition(x, y, z);
  14.                          float ground_Z = summon->GetMap()->GetHeight(summon->GetPhaseMask(), x, y, z, true, 500.0f);
  15. @@ -1288,7 +1247,7 @@ class npc_kinetic_bomb : public CreatureScript
  16.                  {
  17.                      if (!me->HasAura(SPELL_KINETIC_BOMB_KNOCKBACK))
  18.                          me->GetMotionMaster()->MoveCharge(_x, _y, me->GetPositionZ() + 100.0f, me->GetSpeed(MOVE_RUN), 0);
  19. -                    _events.RescheduleEvent(EVENT_CONTINUE_FALLING, 3000);
  20. +                    _events.RescheduleEvent(EVENT_CONTINUE_FALLING, 5000);
  21.                  }
  22.              }
  23.  
  24. @@ -1305,7 +1264,9 @@ class npc_kinetic_bomb : public CreatureScript
  25.                              me->DespawnOrUnsummon(5000);
  26.                              break;
  27.                          case EVENT_CONTINUE_FALLING:
  28. -                            me->GetMotionMaster()->MoveCharge(_x, _y, _groundZ, me->GetSpeed(MOVE_WALK), POINT_KINETIC_BOMB_IMPACT);
  29. +                           me->GetMotionMaster()->Clear();
  30. +                            me->GetMotionMaster()->MovePoint(POINT_KINETIC_BOMB_IMPACT, _x, _y, _groundZ);
  31. +                            //me->GetMotionMaster()->MoveCharge(_x, _y, _groundZ, me->GetSpeed(MOVE_WALK), POINT_KINETIC_BOMB_IMPACT);
  32.                              break;
  33.                          default:
  34.                              break;
  35. @@ -1335,8 +1296,8 @@ class npc_dark_nucleus : public CreatureScript
  36.          {
  37.              npc_dark_nucleusAI(Creature* creature) : ScriptedAI(creature)
  38.              {
  39. -                _lockedTarget = false;
  40. -                _targetAuraCheck = 0;
  41. +                lockedTarget = false;
  42. +                targetAuraCheck = 0;
  43.              }
  44.  
  45.              void Reset()
  46. @@ -1347,7 +1308,7 @@ class npc_dark_nucleus : public CreatureScript
  47.  
  48.              void EnterCombat(Unit* who)
  49.              {
  50. -                _targetAuraCheck = 1000;
  51. +                targetAuraCheck = 1000;
  52.                  if (me->GetDistance(who) >= 15.0f)
  53.                  {
  54.                      DoStartMovement(who);
  55. @@ -1368,21 +1329,22 @@ class npc_dark_nucleus : public CreatureScript
  56.  
  57.              void DamageTaken(Unit* attacker, uint32& /*damage*/)
  58.              {
  59. -                if (attacker == me || attacker == me->getVictim())
  60. -                   return;
  61. +                if (attacker == me)
  62. +                    return;
  63.  
  64. -               me->DeleteThreatList();
  65. -               me->AddThreat(attacker, 500000000.0f);
  66. +                if (!lockedTarget)
  67. +                    if (me->getVictim() == attacker)
  68. +                        lockedTarget = true;
  69.              }
  70.  
  71. -            void UpdateAI(uint32 const diff)
  72. +            void UpdateAI(const uint32 diff)
  73.              {
  74. -                if (!UpdateVictim())
  75. +                if (!me->isInCombat())
  76.                      return;
  77.  
  78. -                if (_targetAuraCheck <= diff)
  79. +                if (targetAuraCheck <= diff)
  80.                  {
  81. -                    _targetAuraCheck = 1000;
  82. +                    targetAuraCheck = 1000;
  83.                      if (Unit* victim = me->getVictim())
  84.                          if (me->GetDistance(victim) < 15.0f &&
  85.                              !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
  86. @@ -1392,17 +1354,34 @@ class npc_dark_nucleus : public CreatureScript
  87.                          }
  88.                  }
  89.                  else
  90. -                    _targetAuraCheck -= diff;
  91. +                    targetAuraCheck -= diff;
  92. +
  93. +                if (!lockedTarget)
  94. +                {
  95. +                    if (Unit* victim = me->SelectVictim())
  96. +                    {
  97. +                        if (me->getVictim() && me->getVictim() != victim)
  98. +                        {
  99. +                            me->getVictim()->RemoveAurasDueToSpell(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID());
  100. +                            lockedTarget = true;
  101. +                        }
  102. +
  103. +                        lockedTarget = true;
  104. +                        AttackStart(victim);
  105. +                        DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
  106. +                        me->ClearUnitState(UNIT_STATE_CASTING);
  107. +                    }
  108. +                }
  109.              }
  110.  
  111.          private:
  112. -            uint32 _targetAuraCheck;
  113. -            bool _lockedTarget;
  114. +            uint32 targetAuraCheck; // no point for EventMap with only one timer
  115. +            bool lockedTarget;
  116.          };
  117.  
  118.          CreatureAI* GetAI(Creature* creature) const
  119. @@ -1543,7 +1522,7 @@ class spell_valanar_kinetic_bomb : public SpellScriptLoader
  120.              void ChangeSummonPos(SpellEffIndex /*effIndex*/)
  121.              {
  122.                  WorldLocation summonPos = *GetExplTargetDest();
  123. -                Position offset = {0.0f, 0.0f, 20.0f, 0.0f};
  124. +                Position offset = {0.0f, 0.0f, 30.0f, 0.0f};
  125.                  summonPos.RelocateOffset(offset);
  126.                  SetExplTargetDest(summonPos);
  127.                  GetHitDest()->RelocateOffset(offset);
Advertisement
Add Comment
Please, Sign In to add comment