Core: Cleaning up hungarian notation - Phase3: pTarget -> target
This commit is contained in:
@@ -193,13 +193,13 @@ public:
|
||||
//Charge_Timer
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
{
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
//me->SendMonsterMove(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, true, 1);
|
||||
AttackStart(pTarget);
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
//me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
Charge_Timer = 8000 + rand()%8000;
|
||||
@@ -273,10 +273,10 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
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 && pTarget)
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
if (Summoned && target)
|
||||
Summoned->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,9 +241,9 @@ public:
|
||||
void SpawnEyeTentacle(float x, float y)
|
||||
{
|
||||
if (Creature* Spawned = DoSpawnCreature(MOB_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Spawned->AI())
|
||||
Spawned->AI()->AttackStart(pTarget);
|
||||
Spawned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -284,13 +284,13 @@ public:
|
||||
if (BeamTimer <= diff)
|
||||
{
|
||||
//SPELL_GREEN_BEAM
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(pTarget, SPELL_GREEN_BEAM);
|
||||
DoCast(target, SPELL_GREEN_BEAM);
|
||||
|
||||
//Correctly update our target
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, pTarget->GetGUID());
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID());
|
||||
}
|
||||
|
||||
//Beam every 3 seconds
|
||||
@@ -300,15 +300,15 @@ public:
|
||||
//ClawTentacleTimer
|
||||
if (ClawTentacleTimer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Creature* Spawned = NULL;
|
||||
|
||||
//Spawn claw tentacle on the random target
|
||||
Spawned = me->SummonCreature(MOB_CLAW_TENTACLE, *pTarget, TEMPSUMMON_CORPSE_DESPAWN, 500);
|
||||
Spawned = me->SummonCreature(MOB_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500);
|
||||
|
||||
if (Spawned && Spawned->AI())
|
||||
Spawned->AI()->AttackStart(pTarget);
|
||||
Spawned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
//One claw tentacle every 12.5 seconds
|
||||
@@ -328,10 +328,10 @@ public:
|
||||
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
|
||||
//Select random target for dark beam to start on
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
//Face our target
|
||||
DarkGlareAngle = me->GetAngle(pTarget);
|
||||
DarkGlareAngle = me->GetAngle(target);
|
||||
DarkGlareTickTimer = 1000;
|
||||
DarkGlareTick = 0;
|
||||
ClockWise = RAND(true, false);
|
||||
@@ -558,8 +558,8 @@ public:
|
||||
Creature* Spawned;
|
||||
Spawned = DoSpawnCreature(MOB_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500);
|
||||
if (Spawned && Spawned->AI())
|
||||
if (Unit* pTarget = SelectRandomNotStomach())
|
||||
Spawned->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectRandomNotStomach())
|
||||
Spawned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
Unit* SelectRandomNotStomach()
|
||||
@@ -787,13 +787,13 @@ public:
|
||||
//Stomach Enter Timer
|
||||
if (StomachEnterTimer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectRandomNotStomach())
|
||||
if (Unit* target = SelectRandomNotStomach())
|
||||
{
|
||||
//Set target in stomach
|
||||
Stomach_Map[pTarget->GetGUID()] = true;
|
||||
pTarget->InterruptNonMeleeSpells(false);
|
||||
pTarget->CastSpell(pTarget, SPELL_MOUTH_TENTACLE, true, NULL, NULL, me->GetGUID());
|
||||
StomachEnterTarget = pTarget->GetGUID();
|
||||
Stomach_Map[target->GetGUID()] = true;
|
||||
target->InterruptNonMeleeSpells(false);
|
||||
target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, me->GetGUID());
|
||||
StomachEnterTarget = target->GetGUID();
|
||||
StomachEnterVisTimer = 3800;
|
||||
}
|
||||
|
||||
@@ -820,12 +820,12 @@ public:
|
||||
//GientClawTentacleTimer
|
||||
if (GiantClawTentacleTimer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectRandomNotStomach())
|
||||
if (Unit* target = SelectRandomNotStomach())
|
||||
{
|
||||
//Spawn claw tentacle on the random target
|
||||
if (Creature* spawned = me->SummonCreature(MOB_GIANT_CLAW_TENTACLE, *pTarget, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||
if (Creature* spawned = me->SummonCreature(MOB_GIANT_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||
if (spawned->AI())
|
||||
spawned->AI()->AttackStart(pTarget);
|
||||
spawned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
//One giant claw tentacle every minute
|
||||
@@ -835,12 +835,12 @@ public:
|
||||
//GiantEyeTentacleTimer
|
||||
if (GiantEyeTentacleTimer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectRandomNotStomach())
|
||||
if (Unit* target = SelectRandomNotStomach())
|
||||
{
|
||||
//Spawn claw tentacle on the random target
|
||||
if (Creature* spawned = me->SummonCreature(MOB_GIANT_EYE_TENTACLE, *pTarget, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||
if (Creature* spawned = me->SummonCreature(MOB_GIANT_EYE_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||
if (spawned->AI())
|
||||
spawned->AI()->AttackStart(pTarget);
|
||||
spawned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
//One giant eye tentacle every minute
|
||||
@@ -988,9 +988,9 @@ public:
|
||||
//MindflayTimer
|
||||
if (MindflayTimer <= diff)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && !pTarget->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
DoCast(pTarget, SPELL_MIND_FLAY);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && !target->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
DoCast(target, SPELL_MIND_FLAY);
|
||||
|
||||
//Mindflay every 10 seconds
|
||||
MindflayTimer = 10000;
|
||||
@@ -1064,16 +1064,16 @@ public:
|
||||
//Dissapear and reappear at new position
|
||||
me->SetVisible(false);
|
||||
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget)
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
{
|
||||
me->Kill(me);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
|
||||
me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
if (Creature* pPortal = me->SummonCreature(MOB_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
@@ -1083,7 +1083,7 @@ public:
|
||||
GroundRuptureTimer = 500;
|
||||
HamstringTimer = 2000;
|
||||
EvadeTimer = 5000;
|
||||
AttackStart(pTarget);
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
me->SetVisible(true);
|
||||
@@ -1176,16 +1176,16 @@ public:
|
||||
//Dissapear and reappear at new position
|
||||
me->SetVisible(false);
|
||||
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!pTarget)
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target)
|
||||
{
|
||||
me->Kill(me);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
|
||||
me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
|
||||
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
pPortal->SetReactState(REACT_PASSIVE);
|
||||
@@ -1196,7 +1196,7 @@ public:
|
||||
HamstringTimer = 2000;
|
||||
ThrashTimer = 5000;
|
||||
EvadeTimer = 5000;
|
||||
AttackStart(pTarget);
|
||||
AttackStart(target);
|
||||
}
|
||||
me->SetVisible(true);
|
||||
} else EvadeTimer -= diff;
|
||||
@@ -1281,9 +1281,9 @@ public:
|
||||
//BeamTimer
|
||||
if (BeamTimer <= diff)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && !pTarget->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
DoCast(pTarget, SPELL_GREEN_BEAM);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && !target->HasAura(SPELL_DIGESTIVE_ACID))
|
||||
DoCast(target, SPELL_GREEN_BEAM);
|
||||
|
||||
//Beam every 2 seconds
|
||||
BeamTimer = 2100;
|
||||
|
||||
@@ -136,61 +136,61 @@ public:
|
||||
{
|
||||
if (SpawnHatchlings_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoCast(pTarget, SPELL_ROOT);
|
||||
DoCast(target, SPELL_ROOT);
|
||||
|
||||
if (DoGetThreat(pTarget))
|
||||
DoModifyThreatPercent(pTarget, -100);
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
|
||||
switch(urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
DoTeleportPlayer(pTarget, -8106.0142f, 1289.2900f, -74.419533f, 5.112f);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
DoTeleportPlayer(target, -8106.0142f, 1289.2900f, -74.419533f, 5.112f);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
break;
|
||||
case 1:
|
||||
DoTeleportPlayer(pTarget, -7990.135354f, 1155.1907f, -78.849319f, 2.608f);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
DoTeleportPlayer(target, -7990.135354f, 1155.1907f, -78.849319f, 2.608f);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
break;
|
||||
case 2:
|
||||
DoTeleportPlayer(pTarget, -8159.7753f, 1127.9064f, -76.868660f, 0.675f);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()-3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
DoTeleportPlayer(target, -8159.7753f, 1127.9064f, -76.868660f, 0.675f);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-3, pTarget->GetPositionY()+3, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()-5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling = me->SummonCreature(15962, pTarget->GetPositionX()-5, pTarget->GetPositionY()+5, pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(pTarget);
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ public:
|
||||
// Wyvern Timer
|
||||
if (Wyvern_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_WYVERNSTING);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_WYVERNSTING);
|
||||
Wyvern_Timer = 15000 + rand()%17000;
|
||||
} else Wyvern_Timer -= diff;
|
||||
|
||||
|
||||
@@ -111,11 +111,11 @@ public:
|
||||
//ChangeTarget_Timer
|
||||
if (Submerged && ChangeTarget_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget)
|
||||
DoTeleportTo(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
|
||||
if (target)
|
||||
DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
|
||||
ChangeTarget_Timer = 10000 + rand()%10000;
|
||||
} else ChangeTarget_Timer -= diff;
|
||||
|
||||
@@ -236,9 +236,9 @@ public:
|
||||
|
||||
for (uint16 i = 0; i < 41; ++i)
|
||||
{
|
||||
if (Player* pTarget = CAST_PLR(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
|
||||
if (Player* target = CAST_PLR(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))
|
||||
{
|
||||
if (Group *pGrp = pTarget->GetGroup())
|
||||
if (Group *pGrp = target->GetGroup())
|
||||
for (uint8 ico = 0; ico < TARGETICONCOUNT; ++ico)
|
||||
{
|
||||
//if (grp->m_targetIcons[ico] == me->GetGUID()) -- private member :(
|
||||
@@ -264,15 +264,15 @@ public:
|
||||
case 25: Images25 = true; break;
|
||||
}
|
||||
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature* Image1 = me->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
|
||||
if (Image1)
|
||||
{
|
||||
Image1->SetMaxHealth(me->GetMaxHealth() / 5);
|
||||
Image1->SetHealth(me->GetHealth() / 5);
|
||||
if (pTarget)
|
||||
Image1->AI()->AttackStart(pTarget);
|
||||
if (target)
|
||||
Image1->AI()->AttackStart(target);
|
||||
CAST_AI(boss_skeram::boss_skeramAI, Image1->AI())->IsImage = true;
|
||||
}
|
||||
|
||||
@@ -281,8 +281,8 @@ public:
|
||||
{
|
||||
Image2->SetMaxHealth(me->GetMaxHealth() / 5);
|
||||
Image2->SetHealth(me->GetHealth() / 5);
|
||||
if (pTarget)
|
||||
Image2->AI()->AttackStart(pTarget);
|
||||
if (target)
|
||||
Image2->AI()->AttackStart(target);
|
||||
CAST_AI(boss_skeram::boss_skeramAI, Image2->AI())->IsImage = true;
|
||||
}
|
||||
Invisible = true;
|
||||
|
||||
@@ -79,7 +79,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
|
||||
virtual bool IAmVeklor() = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual void CastSpellOnBug(Creature* pTarget) = 0;
|
||||
virtual void CastSpellOnBug(Creature* target) = 0;
|
||||
|
||||
void TwinReset()
|
||||
{
|
||||
@@ -418,12 +418,12 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
|
||||
}
|
||||
|
||||
void CastSpellOnBug(Creature* pTarget)
|
||||
void CastSpellOnBug(Creature* target)
|
||||
{
|
||||
pTarget->setFaction(14);
|
||||
pTarget->AI()->AttackStart(me->getThreatManager().getHostilTarget());
|
||||
pTarget->AddAura(SPELL_MUTATE_BUG, pTarget);
|
||||
pTarget->SetFullHealth();
|
||||
target->setFaction(14);
|
||||
target->AI()->AttackStart(me->getThreatManager().getHostilTarget());
|
||||
target->AddAura(SPELL_MUTATE_BUG, target);
|
||||
target->SetFullHealth();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -508,11 +508,11 @@ public:
|
||||
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 0);
|
||||
}
|
||||
|
||||
void CastSpellOnBug(Creature* pTarget)
|
||||
void CastSpellOnBug(Creature* target)
|
||||
{
|
||||
pTarget->setFaction(14);
|
||||
pTarget->AddAura(SPELL_EXPLODEBUG, pTarget);
|
||||
pTarget->SetFullHealth();
|
||||
target->setFaction(14);
|
||||
target->AddAura(SPELL_EXPLODEBUG, target);
|
||||
target->SetFullHealth();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -542,10 +542,10 @@ public:
|
||||
//Blizzard_Timer
|
||||
if (Blizzard_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45, true);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_BLIZZARD);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45, true);
|
||||
if (target)
|
||||
DoCast(target, SPELL_BLIZZARD);
|
||||
Blizzard_Timer = 15000+rand()%15000;
|
||||
} else Blizzard_Timer -= diff;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/* ScriptData
|
||||
SDName: mob_anubisath_sentinel
|
||||
SD%Complete: 95
|
||||
SDComment: Shadow storm is not properly implemented in core it should only pTarget ppl outside of melee range.
|
||||
SDComment: Shadow storm is not properly implemented in core it should only target ppl outside of melee range.
|
||||
SDCategory: Temple of Ahn'Qiraj
|
||||
EndScriptData */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user