REPO: Code-style change

* Fixed pUnit-unit
This commit is contained in:
Bootz
2011-10-07 10:48:56 -05:00
parent e23fe1845f
commit f1ccb83dc0
43 changed files with 340 additions and 340 deletions
@@ -576,11 +576,11 @@ public:
while (i != Stomach_Map.end())
{
//Check for valid player
Unit* pUnit = Unit::GetUnit(*me, i->first);
Unit* unit = Unit::GetUnit(*me, i->first);
//Only units out of stomach
if (pUnit && i->second == false)
temp.push_back(pUnit);
if (unit && i->second == false)
temp.push_back(unit);
++i;
}
@@ -724,19 +724,19 @@ public:
while (i != Stomach_Map.end())
{
//Check for valid player
Unit* pUnit = Unit::GetUnit(*me, i->first);
Unit* unit = Unit::GetUnit(*me, i->first);
//Only move units in stomach
if (pUnit && i->second == true)
if (unit && i->second == true)
{
//Teleport each player out
DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6));
DoTeleportPlayer(unit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6));
//Cast knockback on them
DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true);
DoCast(unit, SPELL_EXIT_STOMACH_KNOCKBACK, true);
//Remove the acid debuff
pUnit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID);
unit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID);
i->second = false;
}
@@ -755,25 +755,25 @@ public:
while (i != Stomach_Map.end())
{
//Check for valid player
Unit* pUnit = Unit::GetUnit(*me, i->first);
Unit* unit = Unit::GetUnit(*me, i->first);
//Only apply to units in stomach
if (pUnit && i->second == true)
if (unit && i->second == true)
{
//Cast digestive acid on them
DoCast(pUnit, SPELL_DIGESTIVE_ACID, true);
DoCast(unit, SPELL_DIGESTIVE_ACID, true);
//Check if player should be kicked from stomach
if (pUnit->IsWithinDist3d(&KickPos, 15.0f))
if (unit->IsWithinDist3d(&KickPos, 15.0f))
{
//Teleport each player out
DoTeleportPlayer(pUnit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6));
DoTeleportPlayer(unit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+10, float(rand()%6));
//Cast knockback on them
DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true);
DoCast(unit, SPELL_EXIT_STOMACH_KNOCKBACK, true);
//Remove the acid debuff
pUnit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID);
unit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID);
i->second = false;
}
@@ -805,11 +805,11 @@ public:
if (StomachEnterVisTimer <= diff)
{
//Check for valid player
Unit* pUnit = Unit::GetUnit(*me, StomachEnterTarget);
Unit* unit = Unit::GetUnit(*me, StomachEnterTarget);
if (pUnit)
if (unit)
{
DoTeleportPlayer(pUnit, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O);
DoTeleportPlayer(unit, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O);
}
StomachEnterTarget = 0;