* Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project * Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker. --HG-- branch : trunk rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
This commit is contained in:
@@ -52,365 +52,375 @@ EndScriptData */
|
||||
#define SPELL_ARCANE_BUFFET DUNGEON_MODE(33527, 38138)
|
||||
#define SPELL_FROST_BUFFET DUNGEON_MODE(33528, 38142)
|
||||
#define SPELL_SHADOW_BUFFET DUNGEON_MODE(33529, 38143)
|
||||
|
||||
struct boss_darkweaver_sythAI : public ScriptedAI
|
||||
␍class boss_darkweaver_syth : public CreatureScript
|
||||
{
|
||||
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c)
|
||||
public:
|
||||
boss_darkweaver_syth() : CreatureScript("boss_darkweaver_syth") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_darkweaver_sythAI (pCreature);
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 frostshock_timer;
|
||||
uint32 shadowshock_timer;
|
||||
uint32 chainlightning_timer;
|
||||
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
|
||||
void Reset()
|
||||
struct boss_darkweaver_sythAI : public ScriptedAI
|
||||
{
|
||||
flameshock_timer = 2000;
|
||||
arcaneshock_timer = 4000;
|
||||
frostshock_timer = 6000;
|
||||
shadowshock_timer = 8000;
|
||||
chainlightning_timer = 15000;
|
||||
|
||||
summon90 = false;
|
||||
summon50 = false;
|
||||
summon10 = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
if (rand()%2)
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
summoned->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
void SythSummoning()
|
||||
{
|
||||
DoScriptText(SAY_SUMMON, me);
|
||||
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
DoCast(me, SPELL_SUMMON_SYTH_ARCANE, true); //front
|
||||
DoCast(me, SPELL_SUMMON_SYTH_FIRE, true); //back
|
||||
DoCast(me, SPELL_SUMMON_SYTH_FROST, true); //left
|
||||
DoCast(me, SPELL_SUMMON_SYTH_SHADOW, true); //right
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (((me->GetHealth()*100) / me->GetMaxHealth() < 90) && !summon90)
|
||||
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SythSummoning();
|
||||
summon90 = true;
|
||||
}
|
||||
|
||||
if (((me->GetHealth()*100) / me->GetMaxHealth() < 50) && !summon50)
|
||||
uint32 flameshock_timer;
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 frostshock_timer;
|
||||
uint32 shadowshock_timer;
|
||||
uint32 chainlightning_timer;
|
||||
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SythSummoning();
|
||||
summon50 = true;
|
||||
flameshock_timer = 2000;
|
||||
arcaneshock_timer = 4000;
|
||||
frostshock_timer = 6000;
|
||||
shadowshock_timer = 8000;
|
||||
chainlightning_timer = 15000;
|
||||
|
||||
summon90 = false;
|
||||
summon50 = false;
|
||||
summon10 = false;
|
||||
}
|
||||
|
||||
if (((me->GetHealth()*100) / me->GetMaxHealth() < 10) && !summon10)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
SythSummoning();
|
||||
summon10 = true;
|
||||
DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
|
||||
}
|
||||
|
||||
if (flameshock_timer <= diff)
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
if (rand()%2)
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FLAME_SHOCK);
|
||||
summoned->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
flameshock_timer = 10000 + rand()%5000;
|
||||
} else flameshock_timer -= diff;
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
void SythSummoning()
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
DoScriptText(SAY_SUMMON, me);
|
||||
|
||||
arcaneshock_timer = 10000 + rand()%5000;
|
||||
} else arcaneshock_timer -= diff;
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
DoCast(me, SPELL_SUMMON_SYTH_ARCANE, true); //front
|
||||
DoCast(me, SPELL_SUMMON_SYTH_FIRE, true); //back
|
||||
DoCast(me, SPELL_SUMMON_SYTH_FROST, true); //left
|
||||
DoCast(me, SPELL_SUMMON_SYTH_SHADOW, true); //right
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FROST_SHOCK);
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
frostshock_timer = 10000 + rand()%5000;
|
||||
} else frostshock_timer -= diff;
|
||||
if (((me->GetHealth()*100) / me->GetMaxHealth() < 90) && !summon90)
|
||||
{
|
||||
SythSummoning();
|
||||
summon90 = true;
|
||||
}
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_SHADOW_SHOCK);
|
||||
if (((me->GetHealth()*100) / me->GetMaxHealth() < 50) && !summon50)
|
||||
{
|
||||
SythSummoning();
|
||||
summon50 = true;
|
||||
}
|
||||
|
||||
shadowshock_timer = 10000 + rand()%5000;
|
||||
} else shadowshock_timer -= diff;
|
||||
if (((me->GetHealth()*100) / me->GetMaxHealth() < 10) && !summon10)
|
||||
{
|
||||
SythSummoning();
|
||||
summon10 = true;
|
||||
}
|
||||
|
||||
if (chainlightning_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
|
||||
if (flameshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FLAME_SHOCK);
|
||||
|
||||
chainlightning_timer = 25000;
|
||||
} else chainlightning_timer -= diff;
|
||||
flameshock_timer = 10000 + rand()%5000;
|
||||
} else flameshock_timer -= diff;
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
|
||||
arcaneshock_timer = 10000 + rand()%5000;
|
||||
} else arcaneshock_timer -= diff;
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FROST_SHOCK);
|
||||
|
||||
frostshock_timer = 10000 + rand()%5000;
|
||||
} else frostshock_timer -= diff;
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_SHADOW_SHOCK);
|
||||
|
||||
shadowshock_timer = 10000 + rand()%5000;
|
||||
} else shadowshock_timer -= diff;
|
||||
|
||||
if (chainlightning_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
chainlightning_timer = 25000;
|
||||
} else chainlightning_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_darkweaver_syth(Creature* pCreature)
|
||||
{
|
||||
return new boss_darkweaver_sythAI (pCreature);
|
||||
}
|
||||
|
||||
/* ELEMENTALS */
|
||||
|
||||
struct mob_syth_fireAI : public ScriptedAI
|
||||
class mob_syth_fire : public CreatureScript
|
||||
{
|
||||
mob_syth_fireAI(Creature *c) : ScriptedAI(c)
|
||||
public:
|
||||
mob_syth_fire() : CreatureScript("mob_syth_fire") { }
|
||||
|
||||
struct mob_syth_fireAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 flamebuffet_timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
flameshock_timer = 2500;
|
||||
flamebuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (flameshock_timer <= diff)
|
||||
mob_syth_fireAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FLAME_SHOCK);
|
||||
}
|
||||
|
||||
flameshock_timer = 5000;
|
||||
} else flameshock_timer -= diff;
|
||||
uint32 flameshock_timer;
|
||||
uint32 flamebuffet_timer;
|
||||
|
||||
if (flamebuffet_timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FLAME_BUFFET);
|
||||
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
flameshock_timer = 2500;
|
||||
flamebuffet_timer = 5000;
|
||||
} else flamebuffet_timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
CreatureAI* GetAI_mob_syth_fire(Creature* pCreature)
|
||||
{
|
||||
return new mob_syth_fireAI (pCreature);
|
||||
}
|
||||
|
||||
struct mob_syth_arcaneAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 arcanebuffet_timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
|
||||
arcaneshock_timer = 2500;
|
||||
arcanebuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
arcaneshock_timer = 5000;
|
||||
} else arcaneshock_timer -= diff;
|
||||
if (flameshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FLAME_SHOCK);
|
||||
|
||||
if (arcanebuffet_timer <= diff)
|
||||
flameshock_timer = 5000;
|
||||
} else flameshock_timer -= diff;
|
||||
|
||||
if (flamebuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FLAME_BUFFET);
|
||||
|
||||
flamebuffet_timer = 5000;
|
||||
} else flamebuffet_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new mob_syth_fireAI (pCreature);
|
||||
}
|
||||
};␍␍class mob_syth_arcane : public CreatureScript
|
||||
{
|
||||
public:
|
||||
mob_syth_arcane() : CreatureScript("mob_syth_arcane") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new mob_syth_arcaneAI (pCreature);
|
||||
}
|
||||
|
||||
struct mob_syth_arcaneAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_ARCANE_BUFFET);
|
||||
}
|
||||
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 arcanebuffet_timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
|
||||
arcaneshock_timer = 2500;
|
||||
arcanebuffet_timer = 5000;
|
||||
} else arcanebuffet_timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_ARCANE_SHOCK);
|
||||
|
||||
arcaneshock_timer = 5000;
|
||||
} else arcaneshock_timer -= diff;
|
||||
|
||||
if (arcanebuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_ARCANE_BUFFET);
|
||||
|
||||
arcanebuffet_timer = 5000;
|
||||
} else arcanebuffet_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_syth_arcane(Creature* pCreature)
|
||||
␍class mob_syth_frost : public CreatureScript
|
||||
{
|
||||
return new mob_syth_arcaneAI (pCreature);
|
||||
}
|
||||
public:
|
||||
mob_syth_frost() : CreatureScript("mob_syth_frost") { }
|
||||
|
||||
struct mob_syth_frostAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_frostAI(Creature *c) : ScriptedAI(c)
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new mob_syth_frostAI (pCreature);
|
||||
}
|
||||
|
||||
uint32 frostshock_timer;
|
||||
uint32 frostbuffet_timer;
|
||||
|
||||
void Reset()
|
||||
struct mob_syth_frostAI : public ScriptedAI
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
frostshock_timer = 2500;
|
||||
frostbuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
mob_syth_frostAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FROST_SHOCK);
|
||||
}
|
||||
|
||||
frostshock_timer = 5000;
|
||||
} else frostshock_timer -= diff;
|
||||
uint32 frostshock_timer;
|
||||
uint32 frostbuffet_timer;
|
||||
|
||||
if (frostbuffet_timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FROST_BUFFET);
|
||||
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
frostshock_timer = 2500;
|
||||
frostbuffet_timer = 5000;
|
||||
} else frostbuffet_timer -= diff;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FROST_SHOCK);
|
||||
|
||||
frostshock_timer = 5000;
|
||||
} else frostshock_timer -= diff;
|
||||
|
||||
if (frostbuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_FROST_BUFFET);
|
||||
|
||||
frostbuffet_timer = 5000;
|
||||
} else frostbuffet_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_syth_frost(Creature* pCreature)
|
||||
␍class mob_syth_shadow : public CreatureScript
|
||||
{
|
||||
return new mob_syth_frostAI (pCreature);
|
||||
}
|
||||
public:
|
||||
mob_syth_shadow() : CreatureScript("mob_syth_shadow") { }
|
||||
|
||||
struct mob_syth_shadowAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_shadowAI(Creature *c) : ScriptedAI(c)
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new mob_syth_shadowAI (pCreature);
|
||||
}
|
||||
|
||||
uint32 shadowshock_timer;
|
||||
uint32 shadowbuffet_timer;
|
||||
|
||||
void Reset()
|
||||
struct mob_syth_shadowAI : public ScriptedAI
|
||||
{
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
|
||||
shadowshock_timer = 2500;
|
||||
shadowbuffet_timer = 5000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
mob_syth_shadowAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_SHADOW_SHOCK);
|
||||
}
|
||||
|
||||
shadowshock_timer = 5000;
|
||||
} else shadowshock_timer -= diff;
|
||||
uint32 shadowshock_timer;
|
||||
uint32 shadowbuffet_timer;
|
||||
|
||||
if (shadowbuffet_timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_SHADOW_BUFFET);
|
||||
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
|
||||
shadowshock_timer = 2500;
|
||||
shadowbuffet_timer = 5000;
|
||||
} else shadowbuffet_timer -= diff;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_SHADOW_SHOCK);
|
||||
|
||||
shadowshock_timer = 5000;
|
||||
} else shadowshock_timer -= diff;
|
||||
|
||||
if (shadowbuffet_timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_SHADOW_BUFFET);
|
||||
|
||||
shadowbuffet_timer = 5000;
|
||||
} else shadowbuffet_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_syth_shadow(Creature* pCreature)
|
||||
{
|
||||
return new mob_syth_shadowAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_darkweaver_syth()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_darkweaver_syth";
|
||||
newscript->GetAI = &GetAI_boss_darkweaver_syth;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_syth_fire";
|
||||
newscript->GetAI = &GetAI_mob_syth_arcane;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_syth_arcane";
|
||||
newscript->GetAI = &GetAI_mob_syth_arcane;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_syth_frost";
|
||||
newscript->GetAI = &GetAI_mob_syth_frost;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_syth_shadow";
|
||||
newscript->GetAI = &GetAI_mob_syth_shadow;
|
||||
newscript->RegisterSelf();
|
||||
new boss_darkweaver_syth();
|
||||
new mob_syth_fire();
|
||||
new mob_syth_arcane();
|
||||
new mob_syth_frost();
|
||||
new mob_syth_shadow();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,165 +51,167 @@ EndScriptData */
|
||||
|
||||
#define SPELL_ARCANE_EXPLOSION 38197
|
||||
#define H_SPELL_ARCANE_EXPLOSION 40425
|
||||
|
||||
struct boss_talon_king_ikissAI : public ScriptedAI
|
||||
␍class boss_talon_king_ikiss : public CreatureScript
|
||||
{
|
||||
boss_talon_king_ikissAI(Creature *c) : ScriptedAI(c)
|
||||
public:
|
||||
boss_talon_king_ikiss() : CreatureScript("boss_talon_king_ikiss") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
return new boss_talon_king_ikissAI (pCreature);
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 ArcaneVolley_Timer;
|
||||
uint32 Sheep_Timer;
|
||||
uint32 Blink_Timer;
|
||||
uint32 Slow_Timer;
|
||||
|
||||
bool ManaShield;
|
||||
bool Blink;
|
||||
bool Intro;
|
||||
|
||||
void Reset()
|
||||
struct boss_talon_king_ikissAI : public ScriptedAI
|
||||
{
|
||||
ArcaneVolley_Timer = 5000;
|
||||
Sheep_Timer = 8000;
|
||||
Blink_Timer = 35000;
|
||||
Slow_Timer = 15000+rand()%15000;
|
||||
Blink = false;
|
||||
Intro = false;
|
||||
ManaShield = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
|
||||
boss_talon_king_ikissAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
if (!Intro && me->IsWithinDistInMap(who, 100))
|
||||
{
|
||||
Intro = true;
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
}
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
InstanceScript* pInstance;
|
||||
|
||||
uint32 ArcaneVolley_Timer;
|
||||
uint32 Sheep_Timer;
|
||||
uint32 Blink_Timer;
|
||||
uint32 Slow_Timer;
|
||||
|
||||
bool ManaShield;
|
||||
bool Blink;
|
||||
bool Intro;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ArcaneVolley_Timer = 5000;
|
||||
Sheep_Timer = 8000;
|
||||
Blink_Timer = 35000;
|
||||
Slow_Timer = 15000+rand()%15000;
|
||||
Blink = false;
|
||||
Intro = false;
|
||||
ManaShield = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
|
||||
{
|
||||
if (!Intro && me->IsWithinDistInMap(who, 100))
|
||||
{
|
||||
Intro = true;
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
}
|
||||
|
||||
if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
|
||||
float attackRadius = me->GetAttackDistance(who);
|
||||
if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
|
||||
{
|
||||
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IKISSDOOREVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
float attackRadius = me->GetAttackDistance(who);
|
||||
if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
|
||||
if (Blink)
|
||||
{
|
||||
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
AttackStart(who);
|
||||
DoCast(me, SPELL_ARCANE_EXPLOSION);
|
||||
DoCast(me, SPELL_ARCANE_BUBBLE, true);
|
||||
Blink = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
|
||||
}
|
||||
if (ArcaneVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ARCANE_VOLLEY);
|
||||
ArcaneVolley_Timer = 7000+rand()%5000;
|
||||
} else ArcaneVolley_Timer -= diff;
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (Sheep_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_IKISSDOOREVENT, DONE);
|
||||
}
|
||||
//second top aggro target in normal, random target in heroic correct?
|
||||
if (IsHeroic())
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
else
|
||||
pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1);
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_POLYMORPH);
|
||||
Sheep_Timer = 15000+rand()%2500;
|
||||
} else Sheep_Timer -= diff;
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
//may not be correct time to cast
|
||||
if (!ManaShield && ((me->GetHealth()*100) / me->GetMaxHealth() < 20))
|
||||
{
|
||||
DoCast(me, SPELL_MANA_SHIELD);
|
||||
ManaShield = true;
|
||||
}
|
||||
|
||||
if (Blink)
|
||||
{
|
||||
DoCast(me, SPELL_ARCANE_EXPLOSION);
|
||||
DoCast(me, SPELL_ARCANE_BUBBLE, true);
|
||||
Blink = false;
|
||||
}
|
||||
|
||||
if (ArcaneVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ARCANE_VOLLEY);
|
||||
ArcaneVolley_Timer = 7000+rand()%5000;
|
||||
} else ArcaneVolley_Timer -= diff;
|
||||
|
||||
if (Sheep_Timer <= diff)
|
||||
{
|
||||
Unit *pTarget;
|
||||
|
||||
//second top aggro target in normal, random target in heroic correct?
|
||||
if (IsHeroic())
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
else
|
||||
pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1);
|
||||
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_POLYMORPH);
|
||||
Sheep_Timer = 15000+rand()%2500;
|
||||
} else Sheep_Timer -= diff;
|
||||
|
||||
//may not be correct time to cast
|
||||
if (!ManaShield && ((me->GetHealth()*100) / me->GetMaxHealth() < 20))
|
||||
{
|
||||
DoCast(me, SPELL_MANA_SHIELD);
|
||||
ManaShield = true;
|
||||
}
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (Slow_Timer <= diff)
|
||||
{
|
||||
DoCast(me, H_SPELL_SLOW);
|
||||
Slow_Timer = 15000+rand()%25000;
|
||||
} else Slow_Timer -= diff;
|
||||
}
|
||||
|
||||
if (Blink_Timer <= diff)
|
||||
{
|
||||
DoScriptText(EMOTE_ARCANE_EXP, me);
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
//Spell doesn't work, but we use for visual effect at least
|
||||
DoCast(pTarget, SPELL_BLINK);
|
||||
|
||||
float X = pTarget->GetPositionX();
|
||||
float Y = pTarget->GetPositionY();
|
||||
float Z = pTarget->GetPositionZ();
|
||||
|
||||
DoTeleportTo(X,Y,Z);
|
||||
|
||||
DoCast(pTarget, SPELL_BLINK_TELEPORT);
|
||||
Blink = true;
|
||||
if (Slow_Timer <= diff)
|
||||
{
|
||||
DoCast(me, H_SPELL_SLOW);
|
||||
Slow_Timer = 15000+rand()%25000;
|
||||
} else Slow_Timer -= diff;
|
||||
}
|
||||
Blink_Timer = 35000+rand()%5000;
|
||||
} else Blink_Timer -= diff;
|
||||
|
||||
if (!Blink)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
if (Blink_Timer <= diff)
|
||||
{
|
||||
DoScriptText(EMOTE_ARCANE_EXP, me);
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
//Spell doesn't work, but we use for visual effect at least
|
||||
DoCast(pTarget, SPELL_BLINK);
|
||||
|
||||
float X = pTarget->GetPositionX();
|
||||
float Y = pTarget->GetPositionY();
|
||||
float Z = pTarget->GetPositionZ();
|
||||
|
||||
DoTeleportTo(X,Y,Z);
|
||||
|
||||
DoCast(pTarget, SPELL_BLINK_TELEPORT);
|
||||
Blink = true;
|
||||
}
|
||||
Blink_Timer = 35000+rand()%5000;
|
||||
} else Blink_Timer -= diff;
|
||||
|
||||
if (!Blink)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_talon_king_ikiss(Creature* pCreature)
|
||||
{
|
||||
return new boss_talon_king_ikissAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_talon_king_ikiss()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_talon_king_ikiss";
|
||||
newscript->GetAI = &GetAI_boss_talon_king_ikiss;
|
||||
newscript->RegisterSelf();
|
||||
new boss_talon_king_ikiss();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,63 +31,65 @@ enum eEnums
|
||||
NPC_ANZU = 23035,
|
||||
IKISS_DOOR = 177203,
|
||||
};
|
||||
|
||||
struct instance_sethekk_halls : public ScriptedInstance
|
||||
␍class instance_sethekk_halls : public InstanceMapScript
|
||||
{
|
||||
instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
public:
|
||||
instance_sethekk_halls() : InstanceMapScript("instance_sethekk_halls") { }
|
||||
|
||||
uint32 AnzuEncounter;
|
||||
uint64 m_uiIkissDoorGUID;
|
||||
|
||||
void Initialize()
|
||||
InstanceScript* GetInstanceData_InstanceMapScript(Map* pMap)
|
||||
{
|
||||
AnzuEncounter = NOT_STARTED;
|
||||
m_uiIkissDoorGUID = 0;
|
||||
return new instance_sethekk_halls_InstanceMapScript(pMap);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
struct instance_sethekk_halls_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
if (pCreature->GetEntry() == NPC_ANZU)
|
||||
instance_sethekk_halls_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {Initialize();};
|
||||
|
||||
uint32 AnzuEncounter;
|
||||
uint64 m_uiIkissDoorGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
if (AnzuEncounter >= IN_PROGRESS)
|
||||
pCreature->DisappearAndDie();
|
||||
else
|
||||
AnzuEncounter = IN_PROGRESS;
|
||||
AnzuEncounter = NOT_STARTED;
|
||||
m_uiIkissDoorGUID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
if (pGo->GetEntry() == IKISS_DOOR)
|
||||
m_uiIkissDoorGUID = pGo->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
{
|
||||
case DATA_IKISSDOOREVENT:
|
||||
if (data == DONE)
|
||||
DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILLISECONDS);
|
||||
break;
|
||||
case TYPE_ANZU_ENCOUNTER:
|
||||
AnzuEncounter = data;
|
||||
break;
|
||||
if (pCreature->GetEntry() == NPC_ANZU)
|
||||
{
|
||||
if (AnzuEncounter >= IN_PROGRESS)
|
||||
pCreature->DisappearAndDie();
|
||||
else
|
||||
AnzuEncounter = IN_PROGRESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
if (pGo->GetEntry() == IKISS_DOOR)
|
||||
m_uiIkissDoorGUID = pGo->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case DATA_IKISSDOOREVENT:
|
||||
if (data == DONE)
|
||||
DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILLISECONDS);
|
||||
break;
|
||||
case TYPE_ANZU_ENCOUNTER:
|
||||
AnzuEncounter = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_sethekk_halls(Map* pMap)
|
||||
{
|
||||
return new instance_sethekk_halls(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_sethekk_halls()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_sethekk_halls";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_sethekk_halls;
|
||||
newscript->RegisterSelf();
|
||||
new instance_sethekk_halls();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user