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.