mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 19:53:02 -04:00
Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user