lua/wrappers/game/lua_store.cpp
/**
	 * Sets the store owner, can be nil.
	 *
	 * @param am.character owner The new owner.
	 * @returns am.store This
	 */
Sets the store owner, can be nil.
@param am.character owner The new owner.
Sets the store owner can be nil . @param am . character owner The new owner .
int Store_owner(lua_State *lua)
	{
		Store *store = castUData<Store>(lua, 1);
		if (store)
		{
			if (lua_gettop(lua) == 1)
			{
				Character *owner = store->getStoreOwner();
				if (owner)
				{
					wrapRefObject<Character>(lua, owner);
				}
				else
				{
					lua_pushnil(lua);
				}
				return 1;
			}
			else if (lua_isnil(lua, 2))
			{
				store->setStoreOwner(nullptr);
				lua_first(lua);
			}
			Character *owner = castUData<Character>(lua, 2);
			if (owner)
			{
				store->setStoreOwner(owner);
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "owner", 2, "am.character owner", "nil owner");
		}
		return LuaState::expectedContext(lua, "owner", "am.store");
	}
int Store_owner ( lua_State * lua ) { Store * store = castUData < Store > ( lua , 1 ) ; if ( store ) { if ( lua_gettop ( lua ) == 1 ) { Character * owner = store -> getStoreOwner ( ) ; if ( owner ) { wrapRefObject < Character > ( lua , owner ) ; } else { lua_pushnil ( lua ) ; } return 1 ; } else if ( lua_isnil ( lua , 2 ) ) { store -> setStoreOwner ( nullptr ) ; lua_first ( lua ) ; } Character * owner = castUData < Character > ( lua , 2 ) ; if ( owner ) { store -> setStoreOwner ( owner ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the store owner, can be nil.
Sets the store owner can be nil .