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