Advertisement
kem008

boss_chimaeron.cpp,boss_bwd_nefarian.cpp

Mar 6th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. // Ici Script P2
  2. me->RemoveAllAuras();
  3.  
  4. Talk(SAY_EVENT_PROTOTYPE);
  5. instance->DoSendNotifyToInstance("INSTANCE MESSAGE: Nefarian Call Prototype");
  6. instance->DoSendNotifyToInstance("INSTANCE MESSAGE: Nefarian Phase 2");
  7.  
  8. SetCombatMovement(false);
  9. me->SetFlying(true);
  10. float x, y, z, o;
  11. me->GetMotionMaster()->MovePoint(x, y, 2, o);
  12.  
  13. me->SummonCreature(NPC_PROTOTYPE, aSpawnLocations[0].GetPositionX(), aSpawnLocations[0].GetPositionY(), aSpawnLocations[0].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN);
  14. me->SummonCreature(NPC_PROTOTYPE, aSpawnLocations[1].GetPositionX(), aSpawnLocations[1].GetPositionY(), aSpawnLocations[1].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN);
  15. me->SummonCreature(NPC_PROTOTYPE, aSpawnLocations[2].GetPositionX(), aSpawnLocations[2].GetPositionY(), aSpawnLocations[2].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN);
  16. return;
  17.  
  18. if (IsHeroic())
  19. {
  20. if (ExplosiveCindersTimer <= diff)
  21. {
  22. if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true))
  23. DoCast(pTarget, SPELL_EXPLOSIVE_CINDERS);
  24. ExplosiveCindersTimer = urand(18000, 23000);
  25. } else ExplosiveCindersTimer -= diff;
  26. }
  27.  
  28. if (ShadowCowardiceTimer <= diff)
  29. {
  30. if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true))
  31. DoCast(pTarget, SPELL_SHADOW_OF_COWARDICE);
  32. ShadowCowardiceTimer = urand(19000, 27000);
  33. } else ShadowCowardiceTimer -= diff;
  34.  
  35. if (ShadowflameBarrageTimer <= diff)
  36. {
  37. if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true))
  38. DoCast(pTarget, SPELL_SHADOWFLAME_BARRAGE);
  39. ShadowflameBarrageTimer = urand(14000, 26000);
  40. } else ShadowflameBarrageTimer -= diff;
  41. }
  42.  
  43. if (Phase == 3)
  44. {
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. //_DoAggroPulse(diff);
  55.  
  56. while (uint32 eventId = events.ExecuteEvent())
  57. {
  58. switch (eventId)
  59. {
  60.  
  61. case EVENT_MASSACRE:
  62. DoCast(SPELL_MASSACRE);
  63. DoCast(me,SPELL_FEUD);
  64. instance->DoSendNotifyToInstance("INSTANCE MESSAGE: Chimaeron's Massacre"); // Notification du Massacre
  65.  
  66. if(urand(0,2) == 0)
  67. if(Creature* bile_o_tron = ObjectAccessor::GetCreature(*me,instance->GetData64(NPC_BILE_O_TRON)))
  68. {
  69. bile_o_tron->AI()->DoAction(ACTION_BILE_O_TRON_SYSTEM_FAILURE);
  70. events.ScheduleEvent(EVENT_MASSACRE, 45000);
  71. }else
  72. events.ScheduleEvent(EVENT_MASSACRE, 27000);
  73.  
  74. DoCast(me,SPELL_FEUD);
  75. break;
  76.  
  77. case EVENT_DOUBLE_ATTACK:
  78. DoCastVictim(SPELL_DOUBLE_ATTACK);
  79. events.ScheduleEvent(EVENT_DOUBLE_ATTACK, urand(13000,15000));
  80. break;
  81.  
  82. case EVENT_CAUSTIC_SLIME:
  83. SelectTargetList(playerList, RAID_MODE(TARGETS_10,TARGETS_25,TARGETS_10,TARGETS_25), SELECT_TARGET_RANDOM,1,100,true);
  84. for (std::list<Unit*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
  85. {
  86. Unit *pTemp = (*itr);
  87. me->CastSpell(pTemp, SPELL_CAUSTIC_SLIME, true);
  88. }
  89. events.ScheduleEvent(EVENT_CAUSTIC_SLIME, urand(10000,12000));
  90. break;
  91.  
  92. case EVENT_BREAK:
  93. DoCastVictim(SPELL_BREAK);
  94. events.ScheduleEvent(EVENT_BREAK, 14000);
  95. break;
  96.  
  97. default:
  98. break;
  99. }
  100. }
  101.  
  102. DoMeleeAttackIfReady();
  103. }
  104.  
  105. private:
  106. std::list<Unit *> playerList;
  107.  
  108. void DamageTaken(Unit* who, uint32& damage)
  109. {
  110. if(me->HasReactState(REACT_PASSIVE))
  111. {
  112. me->SetReactState(REACT_AGGRESSIVE);
  113. DoZoneInCombat(me);
  114. }
  115. }
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. 12>..\..\..\..\src\server\scripts\EasternKingdoms\BlackwingDescent\boss_bwd_nefarian.cpp(310): warning C4101: 'z' : unreferenced local variable
  126. 12>..\..\..\..\src\server\scripts\EasternKingdoms\BlackwingDescent\boss_bwd_nefarian.cpp(350): warning C4101: 'z' : unreferenced local variable
  127. 12>..\..\..\..\src\server\scripts\EasternKingdoms\BlackwingDescent\boss_chimaeron.cpp(178): warning C4305: 'argument' : truncation from 'int' to 'bool'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement