PageRenderTime 25ms CodeModel.GetById 8ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/Protocol/db_cooldown.lua

http://awoe.googlecode.com/
Lua | 67 lines | 66 code | 1 blank | 0 comment | 0 complexity | 056168ad95158f8c548e6fc8aa18b763 MD5 | raw file
 1messages = {
 2	{
 3		define = "struct", name = "DBCoolDown",
 4		attributes =
 5		{
 6			{type="int16", name="type", default = 0},
 7			{type="int32", name="time", default = 0},
 8			{type="int32", name="datax", default = 0},
 9			{type="int32", name="datay", default = 0},
10			{type="int32", name="dataz", default = 0},
11		}
12	},
13	{
14		define = "msg", name="LoadCoolDowns", category = "Msg::MC_DB_CoolDown", id = 1, base = "DBMessage",
15		 attributes =
16		 {
17			 {type="int32", name = "pid", default = 0},
18			 {type="DBCoolDown", name = "cds", list = true},
19		 },
20		 handler =
21		 {
22			 sql = "load_cooldowns(%d)",
23			 input = {"pid"},
24			 output={list = true, type = "DBCoolDown", variable = "cds", "type","time","datax", "datay", "dataz"}
25		 }
26	},
27	{
28		define = "msg", name="CreateCoolDown", category = "Msg::MC_DB_CoolDown", id = 2, base = "DBMessage",
29		 attributes =
30		 {
31			 {type="int32", name = "pid", default = 0},
32			 {type="DBCoolDown", name = "cd"},
33		 },
34		 handler =
35		 {
36			 sql = "create_cooldown(%d, %d, %d, %d, %d, %d)",
37			 input = {variable="cd", "pid", "type","time","datax", "datay", "dataz"},
38		 }
39	},
40	{
41		define = "msg", name="UpdateCoolDown", category = "Msg::MC_DB_CoolDown", id = 3, base = "DBMessage",
42		 attributes =
43		 {
44			 {type="int32", name = "pid", default = 0},
45			 {type="DBCoolDown", name = "cd"},
46		 },
47		 handler =
48		 {
49			 sql = "update_cooldown(%d, %d, %d, %d, %d, %d)",
50			 input = {variable="cd", "pid", "type","time","datax", "datay", "dataz"},
51		 }
52	},
53	{
54		define = "msg", name="RemoveCoolDown", category = "Msg::MC_DB_CoolDown", id = 4, base = "DBMessage",
55		 attributes =
56		 {
57			 {type="int32", name = "pid", default = 0},
58			 {type="int32", name = "type", default = 0},
59		 },
60		 handler =
61		 {
62			 sql = "remove_cooldown(%d, %d)",
63			 input = {"pid", "type"},
64		 }
65	 },
66}
67