index 75245bb80c3390126c3419b6b400113c87673ab5..b1e4eca7199598c6c92be2fb40e2a5570292b5ff 100644 (file)
class Lib_items_store\r
{\r
class Lib_items_store\r
{\r
- /*Items*/\r
- static byte[] item_info;\r
-\r
/*Craft*/\r
static byte[] [] craftIN_item;\r
static byte[] [] craftIN_sum;\r
/*Craft*/\r
static byte[] [] craftIN_item;\r
static byte[] [] craftIN_sum;\r
static int[] craftOUT_sum;\r
static byte[] craftOUT_flag;\r
\r
static int[] craftOUT_sum;\r
static byte[] craftOUT_flag;\r
\r
- /*Tools*/\r
- static byte[] tool_type;\r
- static byte[] tool_lvl;\r
- static byte[] tool_speed;\r
- static byte[] tool_damg;\r
-\r
- /* Items */\r
-\r
- public static void resetitems(int len)\r
- {\r
- item_info = new byte[len];\r
- }\r
-\r
- public static void setitemdata(int id, int type, int tex, int max, int info, int flags)\r
- {\r
- item_info[id] = (byte) info;\r
- }\r
-\r
/*Craft*/\r
public static void resetcrafts(int len)\r
{\r
/*Craft*/\r
public static void resetcrafts(int len)\r
{\r
return craftOUT_flag[id] & 0xFF;\r
} catch(Exception e) { return 0xFF;}\r
}\r
return craftOUT_flag[id] & 0xFF;\r
} catch(Exception e) { return 0xFF;}\r
}\r
-\r
-/*Tools*/\r
- public static void resettools(int len)\r
- {\r
- try {\r
- tool_type = new byte[len];\r
- tool_lvl = new byte[len];\r
- tool_speed = new byte[len];\r
- tool_damg = new byte[len];\r
- } catch(Exception e) {e.printStackTrace();}\r
- }\r
-\r
- public static void settooldata(int id, int tool, int lvl, int speed, int damg)\r
- {\r
- try {\r
- tool_type[id] = (byte) tool;\r
- tool_lvl[id] = (byte) lvl;\r
- tool_speed[id] = (byte) speed;\r
- tool_damg[id] = (byte) damg;\r
- } catch(Exception e) {e.printStackTrace();}\r
- }\r
-\r
- public static int gettooltype(int id)\r
- {\r
- try {\r
- return tool_type[item_info[id]];\r
- } catch(Exception e) { return 0;}\r
- }\r
-\r
- public static int gettoollvl(int id)\r
- {\r
- try {\r
- return tool_lvl[item_info[id]];\r
- } catch(Exception e) { return 0;}\r
- }\r
-\r
- public static int gettoolspeed(int id)\r
- {\r
- try {\r
- return tool_speed[item_info[id]];\r
- } catch(Exception e) { return 0;}\r
- }\r
-\r
- public static int gettooldamg(int id)\r
- {\r
- try {\r
- return tool_damg[item_info[id]];\r
- } catch(Exception e) { return 0;}\r
- }\r
-\r
}\r
}\r