aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-07-21 00:33:36 +0200
committerShauren <shauren.trinity@gmail.com>2015-07-21 00:33:36 +0200
commita22e4e121a1e54b2f4154d59623ee4a94a449176 (patch)
treed4fb01e9f32e3f146062f47638cb1e664568c0de /src/server/game/AI/SmartScripts
parent5987391073b0a7a257658ecef51f1df4f0f38842 (diff)
Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index be0781240d9..5605d8f4c00 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -918,8 +918,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
else if (IsUnit(*itr)) // Special handling for vehicles
if (Vehicle* vehicle = (*itr)->ToUnit()->GetVehicleKit())
- for (SeatMap::iterator itr = vehicle->Seats.begin(); itr != vehicle->Seats.end(); ++itr)
- if (Player* player = ObjectAccessor::FindPlayer(itr->second.Passenger.Guid))
+ for (SeatMap::iterator seatItr = vehicle->Seats.begin(); seatItr != vehicle->Seats.end(); ++seatItr)
+ if (Player* player = ObjectAccessor::FindPlayer(seatItr->second.Passenger.Guid))
player->KilledMonsterCredit(e.action.killedMonster.creature);
}
@@ -1754,7 +1754,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsUnit(*itr))
continue;
- Unit* unit = (*itr)->ToUnit();
+ Unit* targetUnit = (*itr)->ToUnit();
bool interruptedSpell = false;
@@ -1767,11 +1767,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (!interruptedSpell && e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)
{
- unit->InterruptNonMeleeSpells(false);
+ targetUnit->InterruptNonMeleeSpells(false);
interruptedSpell = true;
}
- unit->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) != 0);
+ targetUnit->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) != 0);
}
else
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.action.cast.spell, (*it)->GetGUID().ToString().c_str());