diff --git a/CreatureMethods.h b/CreatureMethods.h index 8f88b21..26d5c3f 100644 --- a/CreatureMethods.h +++ b/CreatureMethods.h @@ -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::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;