From 67048ee057d0db912b383601c0fd39412e77e836 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 27 Jan 2013 03:45:40 +0000 Subject: Added cItems to Lua API. Now HOOK_BLOCK_TO_PICKUPS is fully functional, as demonstrated by HookNotify. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1178 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/LuaItems.h | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 source/LuaItems.h (limited to 'source/LuaItems.h') diff --git a/source/LuaItems.h b/source/LuaItems.h deleted file mode 100644 index f6f06c903..000000000 --- a/source/LuaItems.h +++ /dev/null @@ -1,54 +0,0 @@ - -// LuaItems.h - -// Interfaces to the cLuaItems class representing a wrapper class that allows Lua to access and manipulate cItems - - - - - -#pragma once - -#include "Item.h" - - - - - -// tolua_begin -class cLuaItems -{ -public: - // tolua_end - // The constructor is not to be Lua-exported, Lua cannot make use of this object - cLuaItems(cItems & a_Items) : - m_Items(a_Items) - { - } - - // tolua_begin - cItem & Get (int a_Idx) {return m_Items[a_Idx]; } - void Set (int a_Idx, const cItem & a_Item) {m_Items[a_Idx] = a_Item; } - void Add (const cItem & a_Item) {m_Items.push_back(a_Item); } - void Delete(int a_Idx) {m_Items.erase(m_Items.begin() + a_Idx); } - void Clear (void) {m_Items.clear(); } - int Size (void) {return m_Items.size(); } - - void Add (ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth) - { - m_Items.push_back(cItem(a_ItemType, a_ItemCount, a_ItemHealth)); - } - - void Set (int a_Idx, ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth) - { - m_Items[a_Idx] = cItem(a_ItemType, a_ItemCount, a_ItemHealth); - } - -protected: - cItems & m_Items; -} ; -// tolua_end - - - - -- cgit v1.2.3