mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler
This commit is contained in:
@@ -500,7 +500,7 @@ public:
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO);
|
||||
stmt->setUInt64(0, targetGuid.GetCounter());
|
||||
PreparedQueryResult queryResult = CharacterDatabase.Query(stmt);
|
||||
queryResult = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (queryResult)
|
||||
{
|
||||
|
||||
@@ -552,11 +552,11 @@ public:
|
||||
YellTimer = 10000;
|
||||
}
|
||||
|
||||
uint32 NextStep(uint32 Step)
|
||||
uint32 NextStep(uint32 step)
|
||||
{
|
||||
Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID);
|
||||
Map* map = me->GetMap();
|
||||
switch (Step)
|
||||
switch (step)
|
||||
{
|
||||
case 0: return 9999999;
|
||||
case 1:
|
||||
|
||||
@@ -464,13 +464,13 @@ public:
|
||||
SayTimer = 8000;
|
||||
}
|
||||
|
||||
uint32 NextStep(uint8 Step)
|
||||
uint32 NextStep(uint8 step)
|
||||
{
|
||||
Creature* Spark = ObjectAccessor::GetCreature(*me, SparkGUID);
|
||||
if (!Spark)
|
||||
return 99999999;
|
||||
|
||||
switch (Step)
|
||||
switch (step)
|
||||
{
|
||||
case 0:
|
||||
Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f);
|
||||
|
||||
@@ -221,12 +221,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
void MovementInform(uint32 type, uint32 point) override
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (id == 2 || id == 5 || id == 8 || id == 11)
|
||||
if (point == 2 || point == 5 || point == 8 || point == 11)
|
||||
{
|
||||
movementCompleted = true;
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
}
|
||||
|
||||
nextMovementStarted = false;
|
||||
nextWP = id + 1;
|
||||
nextWP = point + 1;
|
||||
}
|
||||
|
||||
// switch to "who" if nearer than current target.
|
||||
|
||||
@@ -176,8 +176,6 @@ class boss_gothik : public CreatureScript
|
||||
}
|
||||
|
||||
uint32 waveCount;
|
||||
typedef std::vector<Creature*> TriggerVct;
|
||||
TriggerVct liveTrigger, deadTrigger;
|
||||
bool mergedSides;
|
||||
bool phaseTwo;
|
||||
bool thirtyPercentReached;
|
||||
|
||||
@@ -220,11 +220,14 @@ public:
|
||||
DoCast(SPELL_SUMMON_ETHEREAL_SPHERE_2);
|
||||
break;
|
||||
case EVENT_SUMMON_PLAYERS:
|
||||
if (Creature* sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE, 150.0f))
|
||||
sphere->GetAI()->DoAction(ACTION_SUMMON);
|
||||
else if (Creature* sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE2, 150.0f))
|
||||
sphere->GetAI()->DoAction(ACTION_SUMMON);
|
||||
break;
|
||||
{
|
||||
Creature* sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE, 150.0f);
|
||||
if (!sphere)
|
||||
sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE2, 150.0f);
|
||||
if (sphere)
|
||||
sphere->GetAI()->DoAction(ACTION_SUMMON);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -364,21 +364,21 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (!summoned)
|
||||
if (!summon)
|
||||
return;
|
||||
Unit* victim = me->GetVictim();
|
||||
if (summoned->GetEntry() == NPC_NAZAN)
|
||||
if (summon->GetEntry() == NPC_NAZAN)
|
||||
{
|
||||
summoned->SetDisableGravity(true);
|
||||
summoned->SetSpeed(MOVE_FLIGHT, 2.5f);
|
||||
summon->SetDisableGravity(true);
|
||||
summon->SetSpeed(MOVE_FLIGHT, 2.5f);
|
||||
if (victim)
|
||||
AttackStartNoMove(victim);
|
||||
}
|
||||
else
|
||||
if (victim)
|
||||
summoned->AI()->AttackStart(victim);
|
||||
summon->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void SentryDownBy(Unit* killer)
|
||||
|
||||
@@ -127,18 +127,18 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
switch (summoned->GetEntry())
|
||||
switch (summon->GetEntry())
|
||||
{
|
||||
case NPC_HEARTHEN_GUARD:
|
||||
case NPC_SHARPSHOOTER_GUARD:
|
||||
case NPC_REAVER_GUARD:
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
adds.push_back(summoned->GetGUID());
|
||||
summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
adds.push_back(summon->GetGUID());
|
||||
break;
|
||||
case NPC_SHATTERED_ASSASSIN:
|
||||
assassins.push_back(summoned->GetGUID());
|
||||
assassins.push_back(summon->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,6 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
ryga = NULL;
|
||||
}
|
||||
|
||||
// Override Evade Mode event, recast buff that was removed by standard handler
|
||||
@@ -175,15 +174,6 @@ public:
|
||||
DoCast(me, SPELL_ANCESTRAL_WOLF_BUFF, true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!ryga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
|
||||
if (Creature* temp = who->ToCreature())
|
||||
ryga = temp;
|
||||
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
{
|
||||
switch (waypointId)
|
||||
@@ -238,9 +228,6 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
Creature* ryga;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
Reference in New Issue
Block a user