PageRenderTime 29ms CodeModel.GetById 16ms app.highlight 9ms RepoModel.GetById 2ms app.codeStats 0ms

/TGame/TCommonSvr/Message/DBMessageItem.h

http://awoe.googlecode.com/
C++ Header | 131 lines | 96 code | 21 blank | 14 comment | 2 complexity | f8124099826aaebde83edac1899ab2e5 MD5 | raw file
  1//
  2//	Generated by lua
  3//	2009-2011	(C) Simplay Inc. Reserved
  4//
  5
  6#ifndef __MSG_DB_Item_H__
  7#define __MSG_DB_Item_H__
  8
  9#include "DBMessage.h"
 10
 11#pragma pack(push, 1)
 12
 13//
 14//	Message Definition for DBItem//
 15struct DBItem{
 16public:
 17	DBItem()
 18	{
 19		iid = 0;
 20		sid = 0;
 21		endurance = 0;
 22		count = 0;
 23		pos = 0;
 24		elvl = 0;
 25		slotcnt = 0;
 26		for (int i=0; i<3; i++)
 27		{
 28			slot [i] = 0;
 29		}
 30		datax = 0;
 31		datay = 0;
 32		dataz = 0;
 33	}
 34
 35	DBItem& operator = (const DBItem& o)
 36	{
 37		iid = o.iid;
 38		sid = o.sid;
 39		endurance = o.endurance;
 40		count = o.count;
 41		pos = o.pos;
 42		elvl = o.elvl;
 43		slotcnt = o.slotcnt;
 44		for (int i=0; i<3; i++)
 45		{
 46			slot[i] = o.slot[i];
 47		}
 48		datax = o.datax;
 49		datay = o.datay;
 50		dataz = o.dataz;
 51	}
 52
 53
 54	int	iid;
 55	int	sid;
 56	short	endurance;
 57	short	count;
 58	short	pos;
 59	char	elvl;
 60	char	slotcnt;
 61	int	slot[3];
 62	int	datax;
 63	int	datay;
 64	int	dataz;
 65};
 66
 67
 68//
 69//	Message Definition for LoadItems//
 70class MsgLoadItems	: public DBMessage{
 71public:
 72	enum { Category = Msg::MC_DB_Item, Id = 1};
 73	MsgLoadItems():DBMessage(Category, Id)
 74	{
 75		pid = 0;
 76	}
 77
 78	int	pid;
 79	typedef std::list< DBItem > DBItemList;
 80	DBItemList	items;
 81};
 82
 83//
 84//	Message Definition for CreateItem//
 85class MsgCreateItem	: public DBMessage{
 86public:
 87	enum { Category = Msg::MC_DB_Item, Id = 2};
 88	MsgCreateItem():DBMessage(Category, Id)
 89	{
 90		pid = 0;
 91	}
 92
 93	int	pid;
 94	DBItem	item;
 95};
 96
 97//
 98//	Message Definition for UpdateItem//
 99class MsgUpdateItem	: public DBMessage{
100public:
101	enum { Category = Msg::MC_DB_Item, Id = 3};
102	MsgUpdateItem():DBMessage(Category, Id)
103	{
104		pid = 0;
105	}
106
107	int	pid;
108	DBItem	item;
109};
110
111//
112//	Message Definition for RemoveItem//
113class MsgRemoveItem	: public DBMessage{
114public:
115	enum { Category = Msg::MC_DB_Item, Id = 4};
116	MsgRemoveItem():DBMessage(Category, Id)
117	{
118		pid = 0;
119		iid = 0;
120	}
121
122	int	pid;
123	int	iid;
124};
125
126
127
128#pragma pack(pop)
129
130#endif
131