Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ici Script P2
- me->RemoveAllAuras();
- Talk(SAY_EVENT_PROTOTYPE);
- instance->DoSendNotifyToInstance("INSTANCE MESSAGE: Nefarian Call Prototype");
- instance->DoSendNotifyToInstance("INSTANCE MESSAGE: Nefarian Phase 2");
- SetCombatMovement(false);
- me->SetFlying(true);
- float x, y, z, o;
- me->GetMotionMaster()->MovePoint(x, y, 2, o);
- me->SummonCreature(NPC_PROTOTYPE, aSpawnLocations[0].GetPositionX(), aSpawnLocations[0].GetPositionY(), aSpawnLocations[0].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN);
- me->SummonCreature(NPC_PROTOTYPE, aSpawnLocations[1].GetPositionX(), aSpawnLocations[1].GetPositionY(), aSpawnLocations[1].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN);
- me->SummonCreature(NPC_PROTOTYPE, aSpawnLocations[2].GetPositionX(), aSpawnLocations[2].GetPositionY(), aSpawnLocations[2].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN);
- return;
- if (IsHeroic())
- {
- if (ExplosiveCindersTimer <= diff)
- {
- if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true))
- DoCast(pTarget, SPELL_EXPLOSIVE_CINDERS);
- ExplosiveCindersTimer = urand(18000, 23000);
- } else ExplosiveCindersTimer -= diff;
- }
- if (ShadowCowardiceTimer <= diff)
- {
- if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true))
- DoCast(pTarget, SPELL_SHADOW_OF_COWARDICE);
- ShadowCowardiceTimer = urand(19000, 27000);
- } else ShadowCowardiceTimer -= diff;
- if (ShadowflameBarrageTimer <= diff)
- {
- if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true))
- DoCast(pTarget, SPELL_SHADOWFLAME_BARRAGE);
- ShadowflameBarrageTimer = urand(14000, 26000);
- } else ShadowflameBarrageTimer -= diff;
- }
- if (Phase == 3)
- {
- //_DoAggroPulse(diff);
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_MASSACRE:
- DoCast(SPELL_MASSACRE);
- DoCast(me,SPELL_FEUD);
- instance->DoSendNotifyToInstance("INSTANCE MESSAGE: Chimaeron's Massacre"); // Notification du Massacre
- if(urand(0,2) == 0)
- if(Creature* bile_o_tron = ObjectAccessor::GetCreature(*me,instance->GetData64(NPC_BILE_O_TRON)))
- {
- bile_o_tron->AI()->DoAction(ACTION_BILE_O_TRON_SYSTEM_FAILURE);
- events.ScheduleEvent(EVENT_MASSACRE, 45000);
- }else
- events.ScheduleEvent(EVENT_MASSACRE, 27000);
- DoCast(me,SPELL_FEUD);
- break;
- case EVENT_DOUBLE_ATTACK:
- DoCastVictim(SPELL_DOUBLE_ATTACK);
- events.ScheduleEvent(EVENT_DOUBLE_ATTACK, urand(13000,15000));
- break;
- case EVENT_CAUSTIC_SLIME:
- SelectTargetList(playerList, RAID_MODE(TARGETS_10,TARGETS_25,TARGETS_10,TARGETS_25), SELECT_TARGET_RANDOM,1,100,true);
- for (std::list<Unit*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
- {
- Unit *pTemp = (*itr);
- me->CastSpell(pTemp, SPELL_CAUSTIC_SLIME, true);
- }
- events.ScheduleEvent(EVENT_CAUSTIC_SLIME, urand(10000,12000));
- break;
- case EVENT_BREAK:
- DoCastVictim(SPELL_BREAK);
- events.ScheduleEvent(EVENT_BREAK, 14000);
- break;
- default:
- break;
- }
- }
- DoMeleeAttackIfReady();
- }
- private:
- std::list<Unit *> playerList;
- void DamageTaken(Unit* who, uint32& damage)
- {
- if(me->HasReactState(REACT_PASSIVE))
- {
- me->SetReactState(REACT_AGGRESSIVE);
- DoZoneInCombat(me);
- }
- }
- 12>..\..\..\..\src\server\scripts\EasternKingdoms\BlackwingDescent\boss_bwd_nefarian.cpp(310): warning C4101: 'z' : unreferenced local variable
- 12>..\..\..\..\src\server\scripts\EasternKingdoms\BlackwingDescent\boss_bwd_nefarian.cpp(350): warning C4101: 'z' : unreferenced local variable
- 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