Fix GetAITarget

Add missing important breaks
This commit is contained in:
Rochet2
2014-06-14 01:12:15 +03:00
committed by Foereaper
parent 45c5c876dd
commit 719707f8b0

View File

@@ -369,6 +369,7 @@ namespace LuaCreature
std::advance(itr, position);
Eluna::Push(L, *itr);
}
break;
case SELECT_TARGET_FARTHEST:
case SELECT_TARGET_BOTTOMAGGRO:
{
@@ -376,14 +377,17 @@ namespace LuaCreature
std::advance(ritr, position);
Eluna::Push(L, *ritr);
}
break;
case SELECT_TARGET_RANDOM:
{
std::list<Unit*>::const_iterator itr = targetList.begin();
std::advance(itr, urand(position, targetList.size() - 1));
Eluna::Push(L, *itr);
}
break;
default:
luaL_argerror(L, 2, "SelectAggroTarget expected");
break;
}
return 1;