lua/wrappers/game/lua_quest.cpp
/**
	 * Adds an event listener to this quest.
	 * <pre>
	 * quest = am.quest.new("testQuest")
	 * quest:on("startQuest", function(event)
	 *     am.debug.log("Quest started")
	 *     quest:finish_quest()
	 * end)
	 * quest:on("finishQuest", function(event)
	 *     am.debug.log("Quest finished")
	 * end)
	 * quest:start_quest()
	 * </pre>
	 *
	 * @param string event_name The event type or name to trigger on
	 * @param function listener The function to call when the event is fired.
	 * @param table [nil] content An option context for the listener to be
	 * called with.
	 * @returns boolean True if the event was added successfully.
	 */
Adds an event listener to this quest.

@param string event_name The event type or name to trigger on
@param function listener The function to call when the event is fired.
@param table [nil] content An option context for the listener to be
called with.
@returns boolean True if the event was added successfully.
Adds an event listener to this quest . @param string event_name The event type or name to trigger on @param function listener The function to call when the event is fired . @param table [ nil ] content An option context for the listener to be called with . @returns boolean True if the event was added successfully .
int Quest_add_event_listener(lua_State *lua)
	{
		Quest *quest = castUData<Quest>(lua, 1);
		if (quest)
		{
			if (lua_isstr(lua, 2) && lua_isfunction(lua, 3))
			{
				lua_pushboolean(lua, am::lua::ui::addEventListener(lua, quest));
				return 1;
			}
			return LuaState::expectedArgs(lua, "on", "string event_name, function listener");
		}
		return LuaState::expectedContext(lua, "on", "am.quest");
	}
int Quest_add_event_listener ( lua_State * lua ) { Quest * quest = castUData < Quest > ( lua , 1 ) ; if ( quest ) { if ( lua_isstr ( lua , 2 ) && lua_isfunction ( lua , 3 ) ) { lua_pushboolean ( lua , am :: lua :: ui :: addEventListener ( lua , quest ) ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Adds an event listener to this quest.
Adds an event listener to this quest .