Example #1
0
int32_t NpcScriptInterface::luaActionTurn(lua_State* L)
{
	//selfTurn(direction)
	Npc* npc = getScriptEnv()->getNpc();
	if (npc) {
		npc->doTurn(static_cast<Direction>(getNumber<uint32_t>(L, 1)));
	}
	return 0;
}
Example #2
0
int32_t NpcScriptInterface::luaActionTurn(lua_State* L)
{
	//selfTurn(direction)
	Npc* npc = getScriptEnv()->getNpc();
	if (npc) {
		npc->doTurn((Direction)popNumber(L));
	}
	return 0;
}
Example #3
0
int32_t NpcScriptInterface::luaActionTurn(lua_State* L)
{
	//selfTurn(direction)
	Direction dir = (Direction)popNumber(L);

	ScriptEnvironment* env = getScriptEnv();

	Npc* npc = env->getNpc();
	if (npc) {
		npc->doTurn(dir);
	}

	return 0;
}