Core/Scripting: Some updates to Zul'Grub

This commit is contained in:
Malcrom
2013-01-13 09:52:43 -03:30
parent fdd853366a
commit 7abdab74ef
3 changed files with 20 additions and 21 deletions

View File

@@ -29,14 +29,14 @@ EndScriptData */
enum Spells
{
SPELL_AVARTAR = 24646, // Enrage Spell
SPELL_GROUNDTREMOR = 6524
SPELL_AVATAR = 24646, // Enrage Spell
SPELL_GROUND_TREMOR = 6524
};
enum Events
{
EVENT_AVARTAR = 0,
EVENT_GROUNDTREMOR = 1
EVENT_AVATAR = 0,
EVENT_GROUND_TREMOR = 1
};
class boss_grilek : public CreatureScript // grilek
@@ -55,8 +55,8 @@ class boss_grilek : public CreatureScript // grilek
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
events.ScheduleEvent(EVENT_AVARTAR, urand(15000, 25000));
events.ScheduleEvent(EVENT_GROUNDTREMOR, urand(15000, 25000));
events.ScheduleEvent(EVENT_AVATAR, urand(15000, 25000));
events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(15000, 25000));
}
void UpdateAI(uint32 const diff)
@@ -73,17 +73,17 @@ class boss_grilek : public CreatureScript // grilek
{
switch (eventId)
{
case EVENT_AVARTAR:
DoCast(me, SPELL_AVARTAR);
case EVENT_AVATAR:
DoCast(me, SPELL_AVATAR);
if (DoGetThreat(me->getVictim()))
DoModifyThreatPercent(me->getVictim(), -50);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
AttackStart(target);
events.ScheduleEvent(EVENT_AVARTAR, urand(25000, 35000));
events.ScheduleEvent(EVENT_AVATAR, urand(25000, 35000));
break;
case EVENT_GROUNDTREMOR:
DoCastVictim(SPELL_GROUNDTREMOR, true);
events.ScheduleEvent(EVENT_GROUNDTREMOR, urand(12000, 16000));
case EVENT_GROUND_TREMOR:
DoCastVictim(SPELL_GROUND_TREMOR, true);
events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(12000, 16000));
break;
default:
break;

View File

@@ -88,13 +88,12 @@ class boss_hazzarah : public CreatureScript
// We will just use one model for the beginning
for (uint8 i = 0; i < 3; ++i)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!target)
return;
Creature* Illusion = me->SummonCreature(NPC_NIGHTMARE_ILLUSION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
if (Illusion)
Illusion->AI()->AttackStart(target);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
Creature* Illusion = me->SummonCreature(NPC_NIGHTMARE_ILLUSION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
if (Illusion)
Illusion->AI()->AttackStart(target);
}
}
events.ScheduleEvent(EVENT_ILLUSIONS, urand(15000, 25000));
break;

View File

@@ -119,7 +119,7 @@ class instance_zulgurub : public InstanceMapScript
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
saveStream << "M C " << GetBossSaveData();
saveStream << "Z G " << GetBossSaveData();
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
@@ -140,7 +140,7 @@ class instance_zulgurub : public InstanceMapScript
std::istringstream loadStream(str);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'M' && dataHead2 == 'C')
if (dataHead1 == 'Z' && dataHead2 == 'G')
{
for (uint32 i = 0; i < EncounterCount; ++i)
{