Core: Cleaning up hungarian notation - Phase3: pTarget -> target
This commit is contained in:
+23
-23
@@ -225,11 +225,11 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
if (target)
|
||||
{
|
||||
AttackStart(pTarget);
|
||||
AttackStart(target);
|
||||
GetAdvisors();
|
||||
}
|
||||
}
|
||||
@@ -249,14 +249,14 @@ public:
|
||||
if (CataclysmicBolt_Timer <= diff)
|
||||
{
|
||||
//select a random unit other than the main tank
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
//if there aren't other units, cast on the tank
|
||||
if (!pTarget)
|
||||
pTarget = me->getVictim();
|
||||
if (!target)
|
||||
target = me->getVictim();
|
||||
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_CATACLYSMIC_BOLT);
|
||||
if (target)
|
||||
DoCast(target, SPELL_CATACLYSMIC_BOLT);
|
||||
CataclysmicBolt_Timer = 10000;
|
||||
} else CataclysmicBolt_Timer -= diff;
|
||||
|
||||
@@ -381,11 +381,11 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
if (target)
|
||||
{
|
||||
AttackStart(pTarget);
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,10 +444,10 @@ public:
|
||||
}
|
||||
//DoCast(me, spell_id, true);
|
||||
Creature* Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (Pet && pTarget)
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (Pet && target)
|
||||
{
|
||||
Pet->AI()->AttackStart(pTarget);
|
||||
Pet->AI()->AttackStart(target);
|
||||
SummonedPet = Pet->GetGUID();
|
||||
}
|
||||
} else Pet_Timer -= diff;
|
||||
@@ -522,11 +522,11 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
if (target)
|
||||
{
|
||||
AttackStart(pTarget);
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -648,11 +648,11 @@ public:
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (pTarget)
|
||||
if (target)
|
||||
{
|
||||
AttackStart(pTarget);
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,10 +695,10 @@ public:
|
||||
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Cyclone->setFaction(me->getFaction());
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
{
|
||||
Cyclone->AI()->AttackStart(pTarget);
|
||||
Cyclone->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
} else Cyclone_Timer -= diff;
|
||||
|
||||
+6
-6
@@ -262,9 +262,9 @@ public:
|
||||
//VileSludge_Timer
|
||||
if (VileSludge_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_VILE_SLUDGE);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
DoCast(target, SPELL_VILE_SLUDGE);
|
||||
|
||||
VileSludge_Timer = 15000;
|
||||
} else VileSludge_Timer -= diff;
|
||||
@@ -329,9 +329,9 @@ public:
|
||||
//WaterTomb_Timer
|
||||
if (WaterTomb_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_WATER_TOMB);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (target)
|
||||
DoCast(target, SPELL_WATER_TOMB);
|
||||
|
||||
WaterTomb_Timer = 7000;
|
||||
} else WaterTomb_Timer -= diff;
|
||||
|
||||
@@ -363,12 +363,12 @@ public:
|
||||
{
|
||||
//Static Charge
|
||||
//Used on random people (only 1 person at any given time) in Phases 1 and 3, it's a debuff doing 2775 to 3225 Nature damage to the target and everybody in about 5 yards around it, every 1 seconds for 30 seconds. It can be removed by Cloak of Shadows, Iceblock, Divine Shield, etc, but not by Cleanse or Dispel Magic.
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true);
|
||||
|
||||
if (pTarget && !pTarget->HasAura(SPELL_STATIC_CHARGE_TRIGGER))
|
||||
if (target && !target->HasAura(SPELL_STATIC_CHARGE_TRIGGER))
|
||||
//cast Static Charge every 2 seconds for 20 seconds
|
||||
DoCast(pTarget, SPELL_STATIC_CHARGE_TRIGGER);
|
||||
DoCast(target, SPELL_STATIC_CHARGE_TRIGGER);
|
||||
|
||||
StaticCharge_Timer = 10000+rand()%20000; //blizzlike
|
||||
} else StaticCharge_Timer -= diff;
|
||||
@@ -425,10 +425,10 @@ public:
|
||||
|
||||
if (Sporebat)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Sporebat->AI()->AttackStart(pTarget);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
Sporebat->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
//summon sporebats faster and faster
|
||||
@@ -450,13 +450,13 @@ public:
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
bool InMeleeRange = false;
|
||||
Unit* pTarget;
|
||||
Unit* target;
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
//if in melee range
|
||||
if (pTarget && pTarget->IsWithinDistInMap(me, 5))
|
||||
if (target && target->IsWithinDistInMap(me, 5))
|
||||
{
|
||||
InMeleeRange = true;
|
||||
break;
|
||||
@@ -478,13 +478,13 @@ public:
|
||||
{
|
||||
//Forked Lightning
|
||||
//Used constantly in Phase 2, it shoots out completely randomly targeted bolts of lightning which hit everybody in a roughtly 60 degree cone in front of Vashj for 2313-2687 nature damage.
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (!pTarget)
|
||||
pTarget = me->getVictim();
|
||||
if (!target)
|
||||
target = me->getVictim();
|
||||
|
||||
DoCast(pTarget, SPELL_FORKED_LIGHTNING);
|
||||
DoCast(target, SPELL_FORKED_LIGHTNING);
|
||||
|
||||
ForkedLightning_Timer = 2000+rand()%6000; //blizzlike
|
||||
} else ForkedLightning_Timer -= diff;
|
||||
@@ -519,10 +519,10 @@ public:
|
||||
CoilfangElite = me->SummonCreature(COILFANG_ELITE, CoilfangElitePos[pos][0], CoilfangElitePos[pos][1], CoilfangElitePos[pos][2], CoilfangElitePos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if (CoilfangElite)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
CoilfangElite->AI()->AttackStart(pTarget);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
CoilfangElite->AI()->AttackStart(target);
|
||||
else if (me->getVictim())
|
||||
CoilfangElite->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
@@ -537,10 +537,10 @@ public:
|
||||
CoilfangStrider = me->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if (CoilfangStrider)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
CoilfangStrider->AI()->AttackStart(pTarget);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
CoilfangStrider->AI()->AttackStart(target);
|
||||
else if (me->getVictim())
|
||||
CoilfangStrider->AI()->AttackStart(me->getVictim());
|
||||
}
|
||||
@@ -727,11 +727,11 @@ public:
|
||||
//PoisonBolt_Timer
|
||||
if (PoisonBolt_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget && pTarget->IsWithinDistInMap(me, 30))
|
||||
DoCast(pTarget, SPELL_POISON_BOLT);
|
||||
if (target && target->IsWithinDistInMap(me, 30))
|
||||
DoCast(target, SPELL_POISON_BOLT);
|
||||
|
||||
PoisonBolt_Timer = 5000+rand()%5000;
|
||||
} else PoisonBolt_Timer -= diff;
|
||||
@@ -819,11 +819,11 @@ public:
|
||||
//toxic spores
|
||||
if (bolt_timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
{
|
||||
Creature* trig = me->SummonCreature(TOXIC_SPORES_TRIGGER, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
|
||||
Creature* trig = me->SummonCreature(TOXIC_SPORES_TRIGGER, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
|
||||
if (trig)
|
||||
{
|
||||
trig->setFaction(14);
|
||||
|
||||
+7
-7
@@ -356,11 +356,11 @@ public:
|
||||
Creature* pUnit = Unit::GetCreature((*me), InnderDemon[i]);
|
||||
if (pUnit && pUnit->isAlive())
|
||||
{
|
||||
Unit* pUnit_pTarget = Unit::GetUnit(*pUnit, CAST_AI(mob_inner_demon::mob_inner_demonAI, pUnit->AI())->victimGUID);
|
||||
if (pUnit_pTarget && pUnit_pTarget->isAlive())
|
||||
Unit* unit_target = Unit::GetUnit(*pUnit, CAST_AI(mob_inner_demon::mob_inner_demonAI, pUnit->AI())->victimGUID);
|
||||
if (unit_target && unit_target->isAlive())
|
||||
{
|
||||
pUnit->CastSpell(pUnit_pTarget, SPELL_CONSUMING_MADNESS, true);
|
||||
DoModifyThreatPercent(pUnit_pTarget, -100);
|
||||
pUnit->CastSpell(unit_target, SPELL_CONSUMING_MADNESS, true);
|
||||
DoModifyThreatPercent(unit_target, -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -759,10 +759,10 @@ public:
|
||||
|
||||
if (Mindblast_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget)DoCast(pTarget, SPELL_MINDBLAST);
|
||||
if (target)DoCast(target, SPELL_MINDBLAST);
|
||||
|
||||
Mindblast_Timer = 10000 + rand()%5000;
|
||||
} else Mindblast_Timer -= diff;
|
||||
|
||||
@@ -299,11 +299,11 @@ public:
|
||||
|
||||
if (GeyserTimer <= diff)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pTarget && me->getVictim())
|
||||
pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_GEYSER, true);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
if (!target && me->getVictim())
|
||||
target = me->getVictim();
|
||||
if (target)
|
||||
DoCast(target, SPELL_GEYSER, true);
|
||||
GeyserTimer = rand()%5000 + 15000;
|
||||
} else GeyserTimer -= diff;
|
||||
|
||||
@@ -311,11 +311,11 @@ public:
|
||||
{
|
||||
if (WaterboltTimer <= diff)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget && me->getVictim())
|
||||
pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_WATERBOLT, true);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target && me->getVictim())
|
||||
target = me->getVictim();
|
||||
if (target)
|
||||
DoCast(target, SPELL_WATERBOLT, true);
|
||||
WaterboltTimer = 3000;
|
||||
} else WaterboltTimer -= diff;
|
||||
}
|
||||
@@ -453,11 +453,11 @@ public:
|
||||
|
||||
if (ShootBowTimer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
int bp0 = 1100;
|
||||
if (pTarget)
|
||||
me->CastCustomSpell(pTarget, SPELL_SHOOT, &bp0, NULL, NULL, true);
|
||||
if (target)
|
||||
me->CastCustomSpell(target, SPELL_SHOOT, &bp0, NULL, NULL, true);
|
||||
ShootBowTimer = 4000+rand()%5000;
|
||||
MultiShotTimer += 1500;//add global cooldown
|
||||
} else ShootBowTimer -= diff;
|
||||
|
||||
+10
-10
@@ -187,10 +187,10 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
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 (pTarget && Murloc)
|
||||
Murloc->AI()->AttackStart(pTarget);
|
||||
if (target && Murloc)
|
||||
Murloc->AI()->AttackStart(target);
|
||||
}
|
||||
DoScriptText(EMOTE_EARTHQUAKE, me);
|
||||
Earthquake = false;
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
if (WateryGrave_Timer <= diff)
|
||||
{
|
||||
//Teleport 4 players under the waterfalls
|
||||
Unit* pTarget;
|
||||
Unit* target;
|
||||
std::set<uint64> list;
|
||||
std::set<uint64>::const_iterator itr;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
@@ -219,18 +219,18 @@ public:
|
||||
counter = 0;
|
||||
do
|
||||
{
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
||||
if (counter < Playercount)
|
||||
break;
|
||||
if (pTarget)
|
||||
itr = list.find(pTarget->GetGUID());
|
||||
if (target)
|
||||
itr = list.find(target->GetGUID());
|
||||
++counter;
|
||||
} while (itr != list.end());
|
||||
|
||||
if (pTarget)
|
||||
if (target)
|
||||
{
|
||||
list.insert(pTarget->GetGUID());
|
||||
ApplyWateryGrave(pTarget, i);
|
||||
list.insert(target->GetGUID());
|
||||
ApplyWateryGrave(target, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -108,13 +108,13 @@ public:
|
||||
//LightningCloud_Timer
|
||||
if (LightningCloud_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_LIGHTNING_CLOUD);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_LIGHTNING_CLOUD);
|
||||
|
||||
//cast twice in Heroic mode
|
||||
if (IsHeroic())
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_LIGHTNING_CLOUD);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_LIGHTNING_CLOUD);
|
||||
|
||||
LightningCloud_Timer = 15000+rand()%10000;
|
||||
} else LightningCloud_Timer -=diff;
|
||||
@@ -122,21 +122,21 @@ public:
|
||||
//LungBurst_Timer
|
||||
if (LungBurst_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_LUNG_BURST);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_LUNG_BURST);
|
||||
LungBurst_Timer = 7000+rand()%5000;
|
||||
} else LungBurst_Timer -=diff;
|
||||
|
||||
//EnvelopingWinds_Timer
|
||||
if (EnvelopingWinds_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ENVELOPING_WINDS);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ENVELOPING_WINDS);
|
||||
|
||||
//cast twice in Heroic mode
|
||||
if (IsHeroic())
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ENVELOPING_WINDS);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ENVELOPING_WINDS);
|
||||
EnvelopingWinds_Timer = 10000+rand()%5000;
|
||||
} else EnvelopingWinds_Timer -=diff;
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@
|
||||
/* ScriptData
|
||||
SDName: Boss_Mekgineer_Steamrigger
|
||||
SD%Complete: 60
|
||||
SDComment: Mechanics' interrrupt heal doesn't work very well, also a proper movement needs to be implemented -> summon further away and move towards pTarget to repair.
|
||||
SDComment: Mechanics' interrrupt heal doesn't work very well, also a proper movement needs to be implemented -> summon further away and move towards target to repair.
|
||||
SDCategory: Coilfang Resevoir, The Steamvault
|
||||
EndScriptData */
|
||||
|
||||
@@ -137,8 +137,8 @@ public:
|
||||
|
||||
if (Saw_Blade_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_SAW_BLADE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, SPELL_SAW_BLADE);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_SAW_BLADE);
|
||||
|
||||
|
||||
@@ -191,8 +191,8 @@ public:
|
||||
//Impale_Timer
|
||||
if (Impale_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_IMPALE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_IMPALE);
|
||||
|
||||
Impale_Timer = 7500+rand()%5000;
|
||||
} else Impale_Timer -= diff;
|
||||
|
||||
@@ -75,8 +75,8 @@ public:
|
||||
|
||||
if (Mushroom_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->SummonCreature(17990, target->GetPositionX()+(rand()%8), target->GetPositionY()+(rand()%8), target->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
else
|
||||
me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
|
||||
|
||||
@@ -85,8 +85,8 @@ public:
|
||||
|
||||
if (AcidGeyser_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_ACID_GEYSER);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ACID_GEYSER);
|
||||
AcidGeyser_Timer = 10000+rand()%7500;
|
||||
} else AcidGeyser_Timer -= diff;
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ public:
|
||||
if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER)
|
||||
{
|
||||
Striders.push_back(summon->GetGUID());
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
summon->AI()->AttackStart(target);
|
||||
else
|
||||
if (me->getVictim())
|
||||
summon->AI()->AttackStart(me->getVictim());
|
||||
@@ -125,21 +125,21 @@ public:
|
||||
{
|
||||
if (LevitatedTarget_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = Unit::GetUnit(*me, LevitatedTarget))
|
||||
if (Unit* target = Unit::GetUnit(*me, LevitatedTarget))
|
||||
{
|
||||
if (!pTarget->HasAura(SPELL_LEVITATE))
|
||||
if (!target->HasAura(SPELL_LEVITATE))
|
||||
{
|
||||
LevitatedTarget = 0;
|
||||
return;
|
||||
}
|
||||
if (InAir)
|
||||
{
|
||||
pTarget->AddAura(SPELL_SUSPENSION, pTarget);
|
||||
target->AddAura(SPELL_SUSPENSION, target);
|
||||
LevitatedTarget = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true);
|
||||
target->CastSpell(target, SPELL_MAGNETIC_PULL, true);
|
||||
InAir = true;
|
||||
LevitatedTarget_Timer = 1500;
|
||||
}
|
||||
@@ -150,10 +150,10 @@ public:
|
||||
}
|
||||
if (Levitate_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
DoCast(pTarget, SPELL_LEVITATE);
|
||||
LevitatedTarget = pTarget->GetGUID();
|
||||
DoCast(target, SPELL_LEVITATE);
|
||||
LevitatedTarget = target->GetGUID();
|
||||
LevitatedTarget_Timer = 2000;
|
||||
InAir = false;
|
||||
}
|
||||
@@ -163,16 +163,16 @@ public:
|
||||
// Chain Lightning
|
||||
if (ChainLightning_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
ChainLightning_Timer = 7000;
|
||||
} else ChainLightning_Timer -= diff;
|
||||
|
||||
// Static Charge
|
||||
if (StaticCharge_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true))
|
||||
DoCast(pTarget, SPELL_STATIC_CHARGE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true))
|
||||
DoCast(target, SPELL_STATIC_CHARGE);
|
||||
StaticCharge_Timer = 10000;
|
||||
} else StaticCharge_Timer -= diff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user