1
2
3
4
5
6
7
8
9
10 package
11 cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages;
12 import java.util.*;
13 import javax.vecmath.*;
14 import cz.cuni.amis.pogamut.base.communication.messages.*;
15 import cz.cuni.amis.pogamut.base.communication.worldview.*;
16 import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18 import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19 import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20 import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22 import cz.cuni.amis.pogamut.udk.communication.messages.*;
23 import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25 import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26 import cz.cuni.amis.utils.exception.*;
27 import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28 import cz.cuni.amis.utils.SafeEquals;
29 import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 public class
48 AddInventoryMsg
49 extends GBEvent
50
51 implements IWorldEvent, IWorldChangeEvent
52
53 {
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 public AddInventoryMsg(
82 UnrealId Id, String Type, ItemDescriptor Descriptor, ItemType PickupType) {
83
84 this.Id = Id;
85
86 this.Type = Type;
87
88 this.Descriptor = Descriptor;
89
90 this.PickupType = PickupType;
91
92 }
93
94
95
96 public static final String PROTOTYPE =
97 "AIN {Id unreal_id} {Type text} {PickupType xWeapons.FlakCannonPickup}";
98
99
100
101
102
103
104
105
106
107 protected
108 UnrealId Id =
109 null;
110
111
112
113
114
115
116
117 public
118 UnrealId getId() {
119 return
120 Id;
121 }
122
123
124
125
126
127
128
129 protected
130 String Type =
131 null;
132
133
134
135
136
137
138 public
139 String getType() {
140 return
141 Type;
142 }
143
144
145
146
147
148
149
150 protected
151 ItemDescriptor Descriptor =
152 null;
153
154
155
156
157
158
159 public
160 ItemDescriptor getDescriptor() {
161 return
162 Descriptor;
163 }
164
165
166
167
168
169
170
171 protected
172 ItemType PickupType =
173 null;
174
175
176
177
178
179
180 public
181 ItemType getPickupType() {
182 return
183 PickupType;
184 }
185
186
187
188
189
190
191
192
193
194 public long getSimTime() {
195
196 return 0;
197 }
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214 public AddInventoryMsg(AddInventoryMsg original) {
215
216 this.Id=original.Id;
217
218 this.Type=original.Type;
219
220 this.Descriptor=original.Descriptor;
221
222 this.PickupType=original.PickupType;
223
224 }
225
226
227
228
229
230 public AddInventoryMsg() {
231 }
232
233
234
235 public String toString() {
236 return
237
238 super.toString() + " | " +
239
240 "Id = " +
241 String.valueOf(Id) + " | " +
242
243 "Type = " +
244 String.valueOf(Type) + " | " +
245
246 "PickupType = " +
247 String.valueOf(PickupType) + " | " +
248 "";
249
250 }
251
252 public String toHtmlString() {
253 return super.toString() +
254
255 "<b>Id</b> : " +
256 String.valueOf(Id) +
257 " <br/> " +
258
259 "<b>Type</b> : " +
260 String.valueOf(Type) +
261 " <br/> " +
262
263 "<b>Descriptor</b> : " +
264 String.valueOf(Descriptor) +
265 " <br/> " +
266
267 "<b>PickupType</b> : " +
268 String.valueOf(PickupType) +
269 " <br/> " +
270 "";
271 }
272
273
274
275 }
276
277