Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- //definice toho co bude boss rikat , nutne nahrat sql do DB
- #define SAY_AGGRO -8388608
- #define SAY_CLONE -8388609
- #define SAY_KILL_PLAYER -8388610
- // definice toho co boss bude castit
- #define SPELL_BLADE_TEMPEST 75125
- #define SPELL_CLEAVE 40504
- #define SPELL_SUMMON_CLONE 74511
- #define SPELL_REPEPELING_WAVE 74509
- #define SPELL_ENERVATING_BRAND 74502
- class boss_Baltharus : public CreatureScript
- {
- public:
- boss_Baltharus() : CreatureScript("boss_Baltharus") { }
- struct boss_BaltharusAI : public ScriptedAI
- {
- boss_BaltharusAI(Creature *c) : ScriptedAI(c) {}
- uint32 BladeTempest;
- uint32 Cleave;
- uint32 SummonClone;
- uint32 RepepelingWave;
- uint32 EnervatingBrand;
- bool Clone;
- void Reset()
- {
- BladeTempest = 15000; //timer 1
- Cleave = 40000; //zatim testovaci hodnota
- SummonClone = 0; // tady je nula protoze to probehne pri 50% hp
- RepepelingWave = 60000; //testovaci hodnota
- EnervatingBrand = 90000;
- }
- void EnterCombat(Unit* /*who*/)
- {
- Clone = false;
- me->MonsterYell("Ah, the entertainment has arrived.", LANG_UNIVERSAL, NULL);
- }
- void KilledUnit(Unit* /*victim*/)
- {
- me->MonsterYell("This world has enough heroes.", LANG_UNIVERSAL, NULL);
- }
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
- if (Cleave <= diff)
- {
- DoCast(me->getVictim(), SPELL_CLEAVE , true);
- Cleave = 40000;
- }
- else
- Cleave -= diff;
- if (BladeTempest <= diff)
- {
- DoCast(me->getVictim(), SPELL_BLADE_TEMPEST, true);
- BladeTempest = 15000;
- }
- else
- BladeTempest -= diff;
- if(HealthBelowPct(50) && !Clone)
- {
- Clone = true;
- DoCast(me->getVictim(), SPELL_SUMMON_CLONE, true);
- }
- if (RepepelingWave <= diff)
- {
- DoCast(me->getVictim(), SPELL_REPEPELING_WAVE, true);
- RepepelingWave = 60000;
- }
- else
- RepepelingWave -= diff;
- if (EnervatingBrand <= diff)
- {
- DoCast(me->getVictim(), SPELL_ENERVATING_BRAND, true);
- EnervatingBrand = 90000;
- }
- else
- EnervatingBrand -= diff;
- DoMeleeAttackIfReady(); //
- }
- };
- CreatureAI* GetAI(Creature* pCreature) const
- {
- return new boss_BaltharusAI (pCreature);
- }
- };
- void AddSC_boss_Baltharus()
- {
- new boss_Baltharus();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement