Core: Cleaning up hungarian notation - Phase3: pTarget -> target
This commit is contained in:
@@ -72,13 +72,13 @@ class boss_ironaya : public CreatureScript
|
||||
DoCast(me->getVictim(), SPELL_KNOCKAWAY, true);
|
||||
|
||||
// current aggro target is knocked away pick new target
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
|
||||
|
||||
if (!pTarget || pTarget == me->getVictim())
|
||||
pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
|
||||
if (!target || target == me->getVictim())
|
||||
target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
|
||||
|
||||
if (pTarget)
|
||||
me->TauntApply(pTarget);
|
||||
if (target)
|
||||
me->TauntApply(target);
|
||||
|
||||
//Shouldn't cast this agian
|
||||
bHasCastedKnockaway = true;
|
||||
|
||||
@@ -175,12 +175,12 @@ class instance_uldaman : public InstanceMapScript
|
||||
{
|
||||
for (std::vector<uint64>::const_iterator i = vStoneKeeper.begin(); i != vStoneKeeper.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction() == 14)
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || !target->isAlive() || target->getFaction() == 14)
|
||||
continue;
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
pTarget->setFaction(14);
|
||||
pTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
target->setFaction(14);
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
return; // only want the first one we find
|
||||
}
|
||||
// if we get this far than all four are dead so open the door
|
||||
@@ -196,11 +196,11 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
for (std::vector<uint64>::const_iterator i = vArchaedasWallMinions.begin(); i != vArchaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || !pTarget->isAlive() || pTarget->getFaction() == 14)
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || !target->isAlive() || target->getFaction() == 14)
|
||||
continue;
|
||||
archaedas->CastSpell(pTarget, SPELL_AWAKEN_VAULT_WALKER, true);
|
||||
pTarget->CastSpell(pTarget, SPELL_ARCHAEDAS_AWAKEN, true);
|
||||
archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true);
|
||||
target->CastSpell(target, SPELL_ARCHAEDAS_AWAKEN, true);
|
||||
return; // only want the first one we find
|
||||
}
|
||||
}
|
||||
@@ -211,31 +211,31 @@ class instance_uldaman : public InstanceMapScript
|
||||
// first despawn any aggroed wall minions
|
||||
for (std::vector<uint64>::const_iterator i = vArchaedasWallMinions.begin(); i != vArchaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || pTarget->isDead() || pTarget->getFaction() != 14)
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || target->isDead() || target->getFaction() != 14)
|
||||
continue;
|
||||
pTarget->setDeathState(JUST_DIED);
|
||||
pTarget->RemoveCorpse();
|
||||
target->setDeathState(JUST_DIED);
|
||||
target->RemoveCorpse();
|
||||
}
|
||||
|
||||
// Vault Walkers
|
||||
for (std::vector<uint64>::const_iterator i = vVaultWalker.begin(); i != vVaultWalker.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || pTarget->isDead() || pTarget->getFaction() != 14)
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || target->isDead() || target->getFaction() != 14)
|
||||
continue;
|
||||
pTarget->setDeathState(JUST_DIED);
|
||||
pTarget->RemoveCorpse();
|
||||
target->setDeathState(JUST_DIED);
|
||||
target->RemoveCorpse();
|
||||
}
|
||||
|
||||
// Earthen Guardians
|
||||
for (std::vector<uint64>::const_iterator i = vEarthenGuardian.begin(); i != vEarthenGuardian.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (!pTarget || pTarget->isDead() || pTarget->getFaction() != 14)
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || target->isDead() || target->getFaction() != 14)
|
||||
continue;
|
||||
pTarget->setDeathState(JUST_DIED);
|
||||
pTarget->RemoveCorpse();
|
||||
target->setDeathState(JUST_DIED);
|
||||
target->RemoveCorpse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,36 +268,36 @@ class instance_uldaman : public InstanceMapScript
|
||||
// first respawn any aggroed wall minions
|
||||
for (std::vector<uint64>::const_iterator i = vArchaedasWallMinions.begin(); i != vArchaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (pTarget && pTarget->isDead())
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (target && target->isDead())
|
||||
{
|
||||
pTarget->Respawn();
|
||||
pTarget->GetMotionMaster()->MoveTargetedHome();
|
||||
SetFrozenState(pTarget);
|
||||
target->Respawn();
|
||||
target->GetMotionMaster()->MoveTargetedHome();
|
||||
SetFrozenState(target);
|
||||
}
|
||||
}
|
||||
|
||||
// Vault Walkers
|
||||
for (std::vector<uint64>::const_iterator i = vVaultWalker.begin(); i != vVaultWalker.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (pTarget && pTarget->isDead())
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (target && target->isDead())
|
||||
{
|
||||
pTarget->Respawn();
|
||||
pTarget->GetMotionMaster()->MoveTargetedHome();
|
||||
SetFrozenState(pTarget);
|
||||
target->Respawn();
|
||||
target->GetMotionMaster()->MoveTargetedHome();
|
||||
SetFrozenState(target);
|
||||
}
|
||||
}
|
||||
|
||||
// Earthen Guardians
|
||||
for (std::vector<uint64>::const_iterator i = vEarthenGuardian.begin(); i != vEarthenGuardian.end(); ++i)
|
||||
{
|
||||
Creature* pTarget = instance->GetCreature(*i);
|
||||
if (pTarget && pTarget->isDead())
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (target && target->isDead())
|
||||
{
|
||||
pTarget->Respawn();
|
||||
pTarget->GetMotionMaster()->MoveTargetedHome();
|
||||
SetFrozenState(pTarget);
|
||||
target->Respawn();
|
||||
target->GetMotionMaster()->MoveTargetedHome();
|
||||
SetFrozenState(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,13 +81,13 @@ class mob_jadespine_basilisk : public CreatureScript
|
||||
//Stop attacking target thast asleep and pick new target
|
||||
uiCslumberTimer = 28000;
|
||||
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
|
||||
|
||||
if (!pTarget || pTarget == me->getVictim())
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!target || target == me->getVictim())
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
|
||||
if (pTarget)
|
||||
me->TauntApply(pTarget);
|
||||
if (target)
|
||||
me->TauntApply(target);
|
||||
|
||||
} else uiCslumberTimer -= uiDiff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user