aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorRat <gmstreetrat@gmail.com>2011-11-23 20:23:26 +0100
committerRat <gmstreetrat@gmail.com>2011-11-23 20:23:26 +0100
commit5d39e09d8909a9220a5fc156185c5d5473321d9f (patch)
tree950dc8db09aee5ac260840e63c7c446eb7782524 /src/server/scripts/EasternKingdoms
parent47d0a7f3afbb25d26dec8721801b13d4392aaf1d (diff)
parentafb2289d02fa3d7357b36aaf9065ddc579d00fc9 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp3
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp8
5 files changed, 19 insertions, 17 deletions
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 719c42c0a57..55254a3b8ee 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -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;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index aea25af87bf..18316d67cd4 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -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;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 9afbeaa0172..c9ab9084d22 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -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);
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index b29a0c491cc..ca853d5684e 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -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);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index fd11b4a4985..7c14845f060 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -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: