mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
add SetInCombatWith
This commit is contained in:
@@ -335,6 +335,7 @@ ElunaRegister<Unit> UnitMethods[] =
|
||||
#endif
|
||||
{ "SetWaterWalk", &LuaUnit::SetWaterWalk },
|
||||
{ "SetStandState", &LuaUnit::SetStandState },
|
||||
{ "SetInCombatWith", &LuaUnit::SetInCombatWith },
|
||||
{ "ModifyPower", &LuaUnit::ModifyPower },
|
||||
|
||||
// Boolean
|
||||
|
||||
@@ -1842,6 +1842,18 @@ namespace LuaUnit
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the [Unit] to set in combat with the [Unit] of given GUID.
|
||||
*
|
||||
* @param ObjectGuid guid : unit to start combat with
|
||||
*/
|
||||
int SetInCombatWith(lua_State* L, Unit* unit)
|
||||
{
|
||||
Unit* enemy = Eluna::CHECKOBJ<Unit>(L, 2);
|
||||
unit->SetInCombatWith(enemy);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (!defined(TBC) && !defined(CLASSIC))
|
||||
/**
|
||||
* Sets the [Unit]'s FFA flag on or off.
|
||||
|
||||
Reference in New Issue
Block a user