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 public class
42 BotKilled
43 extends GBEvent
44
45 implements IWorldEvent, IWorldChangeEvent
46
47 {
48
49
50
51
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
82
83
84 public BotKilled(
85 UnrealId Killer, String DamageType, String DeathString, String WeaponName, boolean Flaming, boolean CausedByWorld, boolean DirectDamage, boolean BulletHit, boolean VehicleHit) {
86
87 this.Killer = Killer;
88
89 this.DamageType = DamageType;
90
91 this.DeathString = DeathString;
92
93 this.WeaponName = WeaponName;
94
95 this.Flaming = Flaming;
96
97 this.CausedByWorld = CausedByWorld;
98
99 this.DirectDamage = DirectDamage;
100
101 this.BulletHit = BulletHit;
102
103 this.VehicleHit = VehicleHit;
104
105 }
106
107
108
109 public static final String PROTOTYPE =
110 "DIE {Killer unreal_id} {DamageType text} {DeathString text} {WeaponName text} {Flaming False} {CausedByWorld False} {DirectDamage False} {BulletHit False} {VehicleHit False}";
111
112
113
114
115
116
117
118
119
120 protected
121 UnrealId Killer =
122 null;
123
124
125
126
127
128
129
130 public
131 UnrealId getKiller() {
132 return
133 Killer;
134 }
135
136
137
138
139
140
141
142 protected
143 String DamageType =
144 null;
145
146
147
148
149
150
151 public
152 String getDamageType() {
153 return
154 DamageType;
155 }
156
157
158
159
160
161
162
163 protected
164 String DeathString =
165 null;
166
167
168
169
170
171
172 public
173 String getDeathString() {
174 return
175 DeathString;
176 }
177
178
179
180
181
182
183
184 protected
185 String WeaponName =
186 null;
187
188
189
190
191
192
193 public
194 String getWeaponName() {
195 return
196 WeaponName;
197 }
198
199
200
201
202
203
204
205 protected
206 boolean Flaming =
207 false;
208
209
210
211
212
213
214 public
215 boolean isFlaming() {
216 return
217 Flaming;
218 }
219
220
221
222
223
224
225
226 protected
227 boolean CausedByWorld =
228 false;
229
230
231
232
233
234
235 public
236 boolean isCausedByWorld() {
237 return
238 CausedByWorld;
239 }
240
241
242
243
244
245
246
247 protected
248 boolean DirectDamage =
249 false;
250
251
252
253
254
255
256 public
257 boolean isDirectDamage() {
258 return
259 DirectDamage;
260 }
261
262
263
264
265
266
267
268 protected
269 boolean BulletHit =
270 false;
271
272
273
274
275
276
277 public
278 boolean isBulletHit() {
279 return
280 BulletHit;
281 }
282
283
284
285
286
287
288
289 protected
290 boolean VehicleHit =
291 false;
292
293
294
295
296
297
298 public
299 boolean isVehicleHit() {
300 return
301 VehicleHit;
302 }
303
304
305
306
307
308
309
310
311
312 public long getSimTime() {
313
314 return 0;
315 }
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332 public BotKilled(BotKilled original) {
333
334 this.Killer=original.Killer;
335
336 this.DamageType=original.DamageType;
337
338 this.DeathString=original.DeathString;
339
340 this.WeaponName=original.WeaponName;
341
342 this.Flaming=original.Flaming;
343
344 this.CausedByWorld=original.CausedByWorld;
345
346 this.DirectDamage=original.DirectDamage;
347
348 this.BulletHit=original.BulletHit;
349
350 this.VehicleHit=original.VehicleHit;
351
352 }
353
354
355
356
357
358 public BotKilled() {
359 }
360
361
362
363 public String toString() {
364 return
365
366 super.toString() + " | " +
367
368 "Killer = " +
369 String.valueOf(Killer) + " | " +
370
371 "DamageType = " +
372 String.valueOf(DamageType) + " | " +
373
374 "DeathString = " +
375 String.valueOf(DeathString) + " | " +
376
377 "WeaponName = " +
378 String.valueOf(WeaponName) + " | " +
379
380 "Flaming = " +
381 String.valueOf(Flaming) + " | " +
382
383 "CausedByWorld = " +
384 String.valueOf(CausedByWorld) + " | " +
385
386 "DirectDamage = " +
387 String.valueOf(DirectDamage) + " | " +
388
389 "BulletHit = " +
390 String.valueOf(BulletHit) + " | " +
391
392 "VehicleHit = " +
393 String.valueOf(VehicleHit) + " | " +
394 "";
395
396 }
397
398 public String toHtmlString() {
399 return super.toString() +
400
401 "<b>Killer</b> : " +
402 String.valueOf(Killer) +
403 " <br/> " +
404
405 "<b>DamageType</b> : " +
406 String.valueOf(DamageType) +
407 " <br/> " +
408
409 "<b>DeathString</b> : " +
410 String.valueOf(DeathString) +
411 " <br/> " +
412
413 "<b>WeaponName</b> : " +
414 String.valueOf(WeaponName) +
415 " <br/> " +
416
417 "<b>Flaming</b> : " +
418 String.valueOf(Flaming) +
419 " <br/> " +
420
421 "<b>CausedByWorld</b> : " +
422 String.valueOf(CausedByWorld) +
423 " <br/> " +
424
425 "<b>DirectDamage</b> : " +
426 String.valueOf(DirectDamage) +
427 " <br/> " +
428
429 "<b>BulletHit</b> : " +
430 String.valueOf(BulletHit) +
431 " <br/> " +
432
433 "<b>VehicleHit</b> : " +
434 String.valueOf(VehicleHit) +
435 " <br/> " +
436 "";
437 }
438
439
440
441 }
442
443