feat(CreatureMethods.h): Added SetReactState(x)

Signed-off-by: Tikki <oliver.m.m@hotmail.com>
This commit is contained in:
Tikki
2021-05-28 14:46:53 +02:00
parent 9413bee27a
commit 68b5ffcf4b
2 changed files with 13 additions and 0 deletions

View File

@@ -983,6 +983,18 @@ auto const& threatlist = creature->getThreatManager().getThreatList();
return 0;
}
/**
* Sets the [Creature]'s ReactState to `state`.
*
* @param [ReactState] state
*/
int SetReactState(lua_State* L, Creature* creature)
{
uint32 state = Eluna::CHECKVAL<uint32>(L, 2);
creature->SetReactState((ReactStates)state);
return 0;
}
/**
* Makes the [Creature] able to fly if enabled.

View File

@@ -807,6 +807,7 @@ ElunaRegister<Creature> CreatureMethods[] =
{ "SetLootMode", &LuaCreature::SetLootMode },
#endif
{ "SetNPCFlags", &LuaCreature::SetNPCFlags },
{ "SetReactState", &LuaCreature::SetReactState },
{ "SetDeathState", &LuaCreature::SetDeathState },
{ "SetWalk", &LuaCreature::SetWalk },
{ "SetHomePosition", &LuaCreature::SetHomePosition },