Core/SAI: Fixed memory leak

This commit is contained in:
Shauren
2011-05-11 21:19:22 +02:00
parent 2c86e193f3
commit 53b409e756

View File

@@ -742,7 +742,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
CAST_AI(SmartAI, me->AI())->SetFollow((*itr)->ToUnit(), (float)e.action.follow.dist, (float)e.action.follow.angle, e.action.follow.credit, e.action.follow.entry, e.action.follow.creditType);
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %u following target %u",
me->GetGUIDLow(), (*itr)->GetGUIDLow());
return;
break;
}
}
@@ -1017,10 +1017,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
me->AI()->AttackStart((*itr)->ToUnit());
delete targets;
return;
break;
}
}
delete targets;
break;
}
case SMART_ACTION_SUMMON_CREATURE: