Core: Fixed remaining C6246: Local declaration of 'x' hides declaration of the same name in outer scope. from previous commit
This commit is contained in:
@@ -201,7 +201,8 @@ public:
|
||||
//object already removed, not exist
|
||||
if (!pAdd)
|
||||
{
|
||||
if (Creature* pAdd = me->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
pAdd = me->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (pAdd)
|
||||
m_auiLackeyGUID[j] = pAdd->GetGUID();
|
||||
}
|
||||
++j;
|
||||
|
||||
@@ -497,9 +497,9 @@ public:
|
||||
SetEscortPaused(bOnHold);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 wpId)
|
||||
{
|
||||
switch (i)
|
||||
switch (wpId)
|
||||
{
|
||||
case 0:
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
@@ -1173,8 +1173,8 @@ public:
|
||||
temp->SetSpeed(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
|
||||
temp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[2].x, LightofDawnLoc[2].y, LightofDawnLoc[2].z);
|
||||
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
|
||||
temp->Relocate(LightofDawnLoc[28].x, LightofDawnLoc[28].y, LightofDawnLoc[28].z); // workarounds, he should kick back by Tirion, but here we relocate him
|
||||
if (Creature* lktemp = Unit::GetCreature(*me, uiLichKingGUID))
|
||||
lktemp->Relocate(LightofDawnLoc[28].x, LightofDawnLoc[28].y, LightofDawnLoc[28].z); // workarounds, he should kick back by Tirion, but here we relocate him
|
||||
}
|
||||
JumpToNextStep(1500);
|
||||
break;
|
||||
|
||||
@@ -504,15 +504,14 @@ public:
|
||||
Player* SelectRandomPlayer(float range = 0.0f, bool checkLoS = true)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon()) return NULL;
|
||||
if (!map->IsDungeon())
|
||||
return NULL;
|
||||
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList::const_iterator i;
|
||||
if (PlayerList.isEmpty()) return NULL;
|
||||
if (PlayerList.isEmpty())
|
||||
return NULL;
|
||||
|
||||
std::list<Player*> temp;
|
||||
std::list<Player*>::const_iterator j;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if ((me->IsWithinLOSInMap(i->getSource()) || !checkLoS) && me->getVictim() != i->getSource() &&
|
||||
me->IsWithinDistInMap(i->getSource(), range) && i->getSource()->isAlive())
|
||||
@@ -520,7 +519,7 @@ public:
|
||||
|
||||
if (!temp.empty())
|
||||
{
|
||||
j = temp.begin();
|
||||
std::list<Player*>::const_iterator j = temp.begin();
|
||||
advance(j, rand()%temp.size());
|
||||
return (*j);
|
||||
}
|
||||
|
||||
@@ -662,11 +662,13 @@ public:
|
||||
{
|
||||
float x, y, z;
|
||||
Unit* target = NULL;
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!target || !target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0))break;
|
||||
if (!target || !target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0))
|
||||
break;
|
||||
}
|
||||
|
||||
if (target)
|
||||
{
|
||||
target->GetPosition(x, y, z);
|
||||
|
||||
@@ -330,14 +330,14 @@ public:
|
||||
else
|
||||
{
|
||||
DarkFiend = false;
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, DarkFiends[i][0], DarkFiends[i][1], DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
for (uint8 j = 0; j < 8; ++j)
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, DarkFiends[j][0], DarkFiends[j][1], DarkFiends[j][2], DarkFiends[j][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Timer[TIMER_DARKNESS] = 42000;
|
||||
}
|
||||
break;
|
||||
case TIMER_HUMANOIDES:
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
me->SummonCreature(uint32(Humanoides[i][0]), Humanoides[i][1], Humanoides[i][2], Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
for (uint8 j = 0; j < 6; ++j)
|
||||
me->SummonCreature(uint32(Humanoides[j][0]), Humanoides[j][1], Humanoides[j][2], Humanoides[j][3], Humanoides[j][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Timer[TIMER_HUMANOIDES] = 60000;
|
||||
break;
|
||||
case TIMER_PHASE:
|
||||
|
||||
Reference in New Issue
Block a user