Scripts/Misc: Some code optimisations
This commit is contained in:
1 parent
2c2fe7d464
commit
847cafc121
24 files changed
+96
-119
No files matched your search
@@ -101,10 +101,13 @@ public:
|
||||
|
||||
if (KnockBack_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_KNOCKBACK);
|
||||
//Drop 50% aggro
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -50);
|
||||
if (Unit* target = me->getVictim())
|
||||
{
|
||||
DoCast(target, SPELL_KNOCKBACK);
|
||||
// Drop 50% aggro
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -50);
|
||||
}
|
||||
|
||||
KnockBack_Timer = urand(15000, 30000);
|
||||
} else KnockBack_Timer -= diff;
|
||||
|
||||
@@ -68,24 +68,26 @@ public:
|
||||
//ShadowFlame_Timer
|
||||
if (ShadowFlame_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWFLAME);
|
||||
DoCastVictim(SPELL_SHADOWFLAME);
|
||||
ShadowFlame_Timer = urand(15000, 18000);
|
||||
} else ShadowFlame_Timer -= diff;
|
||||
|
||||
//WingBuffet_Timer
|
||||
if (WingBuffet_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WINGBUFFET);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -75);
|
||||
|
||||
if (Unit* target = me->getVictim())
|
||||
{
|
||||
DoCast(target, SPELL_WINGBUFFET);
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -75);
|
||||
}
|
||||
WingBuffet_Timer = 25000;
|
||||
} else WingBuffet_Timer -= diff;
|
||||
|
||||
//FlameBuffet_Timer
|
||||
if (FlameBuffet_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FLAMEBUFFET);
|
||||
DoCastVictim(SPELL_FLAMEBUFFET);
|
||||
FlameBuffet_Timer = 5000;
|
||||
} else FlameBuffet_Timer -= diff;
|
||||
|
||||
|
||||
@@ -76,17 +76,19 @@ public:
|
||||
//ShadowFlame_Timer
|
||||
if (ShadowFlame_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWFLAME);
|
||||
DoCastVictim(SPELL_SHADOWFLAME);
|
||||
ShadowFlame_Timer = urand(15000, 22000);
|
||||
} else ShadowFlame_Timer -= diff;
|
||||
|
||||
//WingBuffet_Timer
|
||||
if (WingBuffet_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WINGBUFFET);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -75);
|
||||
|
||||
if (Unit* target = me->getVictim())
|
||||
{
|
||||
DoCast(target, SPELL_WINGBUFFET);
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -75);
|
||||
}
|
||||
WingBuffet_Timer = 25000;
|
||||
} else WingBuffet_Timer -= diff;
|
||||
|
||||
|
||||
@@ -780,8 +780,9 @@ public:
|
||||
|
||||
if (AgonyCurseTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target) target = me->getVictim();
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!target)
|
||||
target = me->getVictim();
|
||||
DoCast(target, SPELL_AGONY_CURSE);
|
||||
AgonyCurseTimer = 20000;
|
||||
} else AgonyCurseTimer -= diff;
|
||||
|
||||
@@ -201,8 +201,11 @@ class boss_akilzon : public CreatureScript
|
||||
//dealdamege
|
||||
for (std::list<Unit*>::const_iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i)
|
||||
{
|
||||
if (!Cloud->IsWithinDist(*i, 6, false))
|
||||
Cloud->CastCustomSpell(*i, 43137, &bp0, NULL, NULL, true, 0, 0, me->GetGUID());
|
||||
if (Unit* target = (*i))
|
||||
{
|
||||
if (!Cloud->IsWithinDist(target, 6, false))
|
||||
Cloud->CastCustomSpell(target, 43137, &bp0, NULL, NULL, true, 0, 0, me->GetGUID());
|
||||
}
|
||||
}
|
||||
// visual
|
||||
float x, y, z;
|
||||
|
||||
@@ -80,8 +80,12 @@ class boss_grilek : public CreatureScript // grilek
|
||||
{
|
||||
case EVENT_AVATAR:
|
||||
DoCast(me, SPELL_AVATAR);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -50);
|
||||
if (Unit* victim = me->getVictim())
|
||||
{
|
||||
if (DoGetThreat(victim))
|
||||
DoModifyThreatPercent(victim, -50);
|
||||
}
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
AttackStart(target);
|
||||
events.ScheduleEvent(EVENT_AVATAR, urand(25000, 35000));
|
||||
|
||||
@@ -158,7 +158,7 @@ class boss_jeklik : public CreatureScript //jeklik
|
||||
{
|
||||
if (PhaseTwo)
|
||||
{
|
||||
if (PhaseTwo && ShadowWordPain_Timer <= diff)
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
@@ -189,13 +189,11 @@ class boss_jeklik : public CreatureScript //jeklik
|
||||
|
||||
if (SpawnFlyingBats_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
Creature* FlyingBat = me->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (FlyingBat)
|
||||
FlyingBat->AI()->AttackStart(target);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (Creature* FlyingBat = me->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
FlyingBat->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
SpawnFlyingBats_Timer = urand(10000, 15000);
|
||||
} else SpawnFlyingBats_Timer -=diff;
|
||||
|
||||
@@ -110,9 +110,12 @@ class boss_jindo : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_POWERFULLHEALINGWARD, urand(14000, 20000));
|
||||
break;
|
||||
case EVENT_HEX:
|
||||
DoCastVictim(SPELL_HEX, true);
|
||||
if (DoGetThreat(me->getVictim()))
|
||||
DoModifyThreatPercent(me->getVictim(), -80);
|
||||
if (Unit* target = me->getVictim())
|
||||
{
|
||||
DoCast(target, SPELL_HEX, true);
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -80);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_HEX, urand(12000, 20000));
|
||||
break;
|
||||
case EVENT_DELUSIONSOFJINDO: // HACK
|
||||
@@ -161,7 +164,7 @@ class boss_jindo : public CreatureScript
|
||||
SacrificedTroll = me->SummonCreature(NPC_SACRIFICED_TROLL, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (SacrificedTroll)
|
||||
SacrificedTroll->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_TELEPORT, urand(15000, 23000));
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1369,8 +1369,7 @@ public:
|
||||
forcemove = false;
|
||||
if (forcemove)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->Attack(target, false);
|
||||
}
|
||||
if (MoveTimer <= diff)
|
||||
|
||||
@@ -124,8 +124,8 @@ public:
|
||||
//Arcane Discharge
|
||||
if (ArcaneDischarge_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
DoCast(target, SPELL_ARCANE_DISCHARGE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_DISCHARGE);
|
||||
ArcaneDischarge_Timer = 20000+rand()%10000;
|
||||
} else ArcaneDischarge_Timer -= diff;
|
||||
|
||||
|
||||
@@ -274,10 +274,11 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Summoned = me->SummonCreature(15621, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
if (Summoned && target)
|
||||
Summoned->AI()->AttackStart(target);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (Creature* Summoned = me->SummonCreature(15621, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000))
|
||||
Summoned->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,9 +137,7 @@ public:
|
||||
{
|
||||
if (SpawnHatchlings_Timer <= diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_ROOT);
|
||||
|
||||
|
||||
@@ -105,8 +105,7 @@ public:
|
||||
|
||||
if (BerserkerChargeTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);)
|
||||
DoCast(target, SPELL_BERSERKER_CHARGE);
|
||||
BerserkerChargeTimer = 25000;
|
||||
} else BerserkerChargeTimer -= diff;
|
||||
|
||||
@@ -198,8 +198,7 @@ public:
|
||||
|
||||
summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SPARK_VISUAL_TRIGGER, H_SPELL_SPARK_VISUAL_TRIGGER), true);
|
||||
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
summoned->SetInCombatWith(target);
|
||||
summoned->GetMotionMaster()->Clear();
|
||||
|
||||
@@ -117,9 +117,7 @@ public:
|
||||
{
|
||||
if (PartingSorrowTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_PARTING_SORROW);
|
||||
|
||||
PartingSorrowTimer = urand(30000, 40000);
|
||||
|
||||
@@ -187,9 +187,7 @@ public:
|
||||
|
||||
void RevertThreatOnTarget(uint64 guid)
|
||||
{
|
||||
Unit* unit = NULL;
|
||||
unit = Unit::GetUnit(*me, guid);
|
||||
if (unit)
|
||||
if (Unit* unit = Unit::GetUnit(*me, guid))
|
||||
{
|
||||
if (DoGetThreat(unit))
|
||||
DoModifyThreatPercent(unit, -100);
|
||||
@@ -279,8 +277,7 @@ public:
|
||||
{
|
||||
if (Phase1)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && target->isAlive())
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Phase1 = false;
|
||||
|
||||
@@ -308,7 +305,8 @@ public:
|
||||
AcidGeyserTimer = 1000;
|
||||
PhaseChangeTimer = 30000;
|
||||
}
|
||||
} else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage
|
||||
}
|
||||
else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage
|
||||
{
|
||||
if (TargetGUID)
|
||||
RevertThreatOnTarget(TargetGUID);
|
||||
|
||||
@@ -422,8 +422,7 @@ public:
|
||||
Glaive->InterruptNonMeleeSpells(true);
|
||||
DoCast(me, SPELL_FLAME_ENRAGE, true);
|
||||
DoResetThreat();
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && target->isAlive())
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
me->AddThreat(me->getVictim(), 5000000.0f);
|
||||
AttackStart(me->getVictim());
|
||||
|
||||
@@ -468,8 +468,7 @@ public:
|
||||
|
||||
if (CrushingShadowsTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && target->isAlive())
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CRUSHING_SHADOWS);
|
||||
CrushingShadowsTimer = urand(10, 26) * 1000;
|
||||
} else CrushingShadowsTimer -= diff;
|
||||
|
||||
+17
-45
@@ -227,9 +227,7 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
|
||||
{
|
||||
AttackStart(target);
|
||||
GetAdvisors();
|
||||
@@ -360,12 +358,8 @@ public:
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if (!me->isAlive() && Karathress)
|
||||
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath();
|
||||
if (Creature* Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS))))
|
||||
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,12 +377,8 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
@@ -445,12 +435,13 @@ public:
|
||||
pet_id = CREATURE_FATHOM_SPOREBAT;
|
||||
}
|
||||
//DoCast(me, spell_id, true);
|
||||
Creature* Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (Pet && target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Pet->AI()->AttackStart(target);
|
||||
SummonedPet = Pet->GetGUID();
|
||||
if (Creature* Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
{
|
||||
Pet->AI()->AttackStart(target);
|
||||
SummonedPet = Pet->GetGUID();
|
||||
}
|
||||
}
|
||||
} else Pet_Timer -= diff;
|
||||
|
||||
@@ -500,12 +491,8 @@ public:
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if (!me->isAlive() && Karathress)
|
||||
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath();
|
||||
if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)))
|
||||
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -524,12 +511,8 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
@@ -627,12 +610,8 @@ public:
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if (!me->isAlive() && Karathress)
|
||||
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath();
|
||||
if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)))
|
||||
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,12 +629,8 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
if (Unit* target = Unit::GetUnit(*me, instance->GetData64(DATA_KARATHRESSEVENT_STARTER)))
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
@@ -697,11 +672,8 @@ public:
|
||||
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Cyclone->setFaction(me->getFaction());
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
Cyclone->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
} else Cyclone_Timer -= diff;
|
||||
|
||||
|
||||
+1
-2
@@ -272,8 +272,7 @@ public:
|
||||
//VileSludge_Timer
|
||||
if (VileSludge_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_VILE_SLUDGE);
|
||||
|
||||
VileSludge_Timer = 15000;
|
||||
|
||||
+3
-4
@@ -184,10 +184,9 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Murloc = me->SummonCreature(NPC_TIDEWALKER_LURKER, MurlocCords[i][0], MurlocCords[i][1], MurlocCords[i][2], MurlocCords[i][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
if (target && Murloc)
|
||||
Murloc->AI()->AttackStart(target);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Creature* Murloc = me->SummonCreature(NPC_TIDEWALKER_LURKER, MurlocCords[i][0], MurlocCords[i][1], MurlocCords[i][2], MurlocCords[i][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000))
|
||||
Murloc->AI()->AttackStart(target);
|
||||
}
|
||||
Talk(EMOTE_EARTHQUAKE);
|
||||
Earthquake = false;
|
||||
|
||||
@@ -519,8 +519,7 @@ public:
|
||||
//GreaterPolymorph_Timer
|
||||
if (GreaterPolymorph_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_GREATER_POLYMORPH);
|
||||
|
||||
GreaterPolymorph_Timer = urand(15000, 20000);
|
||||
|
||||
@@ -245,11 +245,13 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!me->HasInArc(2.5f, target))
|
||||
target = me->getVictim();
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (!me->HasInArc(2.5f, target))
|
||||
target = me->getVictim();
|
||||
|
||||
DoCast(target, SPELL_ARCANE_MISSILES);
|
||||
}
|
||||
}
|
||||
ArcaneMissiles_Timer = 3000;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user