mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix GetAITarget
Add missing important breaks
This commit is contained in:
@@ -369,6 +369,7 @@ namespace LuaCreature
|
|||||||
std::advance(itr, position);
|
std::advance(itr, position);
|
||||||
Eluna::Push(L, *itr);
|
Eluna::Push(L, *itr);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case SELECT_TARGET_FARTHEST:
|
case SELECT_TARGET_FARTHEST:
|
||||||
case SELECT_TARGET_BOTTOMAGGRO:
|
case SELECT_TARGET_BOTTOMAGGRO:
|
||||||
{
|
{
|
||||||
@@ -376,14 +377,17 @@ namespace LuaCreature
|
|||||||
std::advance(ritr, position);
|
std::advance(ritr, position);
|
||||||
Eluna::Push(L, *ritr);
|
Eluna::Push(L, *ritr);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case SELECT_TARGET_RANDOM:
|
case SELECT_TARGET_RANDOM:
|
||||||
{
|
{
|
||||||
std::list<Unit*>::const_iterator itr = targetList.begin();
|
std::list<Unit*>::const_iterator itr = targetList.begin();
|
||||||
std::advance(itr, urand(position, targetList.size() - 1));
|
std::advance(itr, urand(position, targetList.size() - 1));
|
||||||
Eluna::Push(L, *itr);
|
Eluna::Push(L, *itr);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
luaL_argerror(L, 2, "SelectAggroTarget expected");
|
luaL_argerror(L, 2, "SelectAggroTarget expected");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user