1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 public class InitedMessageMessage
30 extends
31 InitedMessage
32 implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent
33
34 {
35
36
37
38
39
40
41 public InitedMessageMessage()
42 {
43 }
44
45
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188 public InitedMessageMessage(
189 UnrealId BotId, int HealthStart, int HealthFull, int HealthMax, double AdrenalineStart, double AdrenalineMax, int ShieldStrengthStart, int ShieldStrengthMax, int MaxMultiJump, double DamageScaling, double GroundSpeed, double WaterSpeed, double AirSpeed, double LadderSpeed, double AccelRate, double JumpZ, double MultiJumpBoost, double MaxFallSpeed, double DodgeSpeedFactor, double DodgeSpeedZ, double AirControl
190 ) {
191
192 this.BotId = BotId;
193
194 this.HealthStart = HealthStart;
195
196 this.HealthFull = HealthFull;
197
198 this.HealthMax = HealthMax;
199
200 this.AdrenalineStart = AdrenalineStart;
201
202 this.AdrenalineMax = AdrenalineMax;
203
204 this.ShieldStrengthStart = ShieldStrengthStart;
205
206 this.ShieldStrengthMax = ShieldStrengthMax;
207
208 this.MaxMultiJump = MaxMultiJump;
209
210 this.DamageScaling = DamageScaling;
211
212 this.GroundSpeed = GroundSpeed;
213
214 this.WaterSpeed = WaterSpeed;
215
216 this.AirSpeed = AirSpeed;
217
218 this.LadderSpeed = LadderSpeed;
219
220 this.AccelRate = AccelRate;
221
222 this.JumpZ = JumpZ;
223
224 this.MultiJumpBoost = MultiJumpBoost;
225
226 this.MaxFallSpeed = MaxFallSpeed;
227
228 this.DodgeSpeedFactor = DodgeSpeedFactor;
229
230 this.DodgeSpeedZ = DodgeSpeedZ;
231
232 this.AirControl = AirControl;
233
234 }
235
236
237
238
239
240
241 public InitedMessageMessage(InitedMessageMessage original) {
242
243 this.BotId = original.getBotId()
244 ;
245
246 this.HealthStart = original.getHealthStart()
247 ;
248
249 this.HealthFull = original.getHealthFull()
250 ;
251
252 this.HealthMax = original.getHealthMax()
253 ;
254
255 this.AdrenalineStart = original.getAdrenalineStart()
256 ;
257
258 this.AdrenalineMax = original.getAdrenalineMax()
259 ;
260
261 this.ShieldStrengthStart = original.getShieldStrengthStart()
262 ;
263
264 this.ShieldStrengthMax = original.getShieldStrengthMax()
265 ;
266
267 this.MaxMultiJump = original.getMaxMultiJump()
268 ;
269
270 this.DamageScaling = original.getDamageScaling()
271 ;
272
273 this.GroundSpeed = original.getGroundSpeed()
274 ;
275
276 this.WaterSpeed = original.getWaterSpeed()
277 ;
278
279 this.AirSpeed = original.getAirSpeed()
280 ;
281
282 this.LadderSpeed = original.getLadderSpeed()
283 ;
284
285 this.AccelRate = original.getAccelRate()
286 ;
287
288 this.JumpZ = original.getJumpZ()
289 ;
290
291 this.MultiJumpBoost = original.getMultiJumpBoost()
292 ;
293
294 this.MaxFallSpeed = original.getMaxFallSpeed()
295 ;
296
297 this.DodgeSpeedFactor = original.getDodgeSpeedFactor()
298 ;
299
300 this.DodgeSpeedZ = original.getDodgeSpeedZ()
301 ;
302
303 this.AirControl = original.getAirControl()
304 ;
305
306 this.TeamId = original.getTeamId();
307
308 this.SimTime = original.getSimTime();
309 }
310
311
312 public UnrealId getId() {
313 return cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage.InitedMessageId;
314 }
315
316
317 protected ITeamId TeamId;
318
319
320
321
322 protected void setTeamId(ITeamId TeamId) {
323 this.TeamId = TeamId;
324 }
325
326 public ITeamId getTeamId() {
327 return TeamId;
328 }
329
330
331
332
333
334
335
336
337
338 protected
339 UnrealId BotId =
340 null;
341
342
343
344
345
346 protected boolean BotId_Set = false;
347
348 @Override
349
350
351
352
353
354
355 public UnrealId getBotId()
356 {
357 return BotId;
358 }
359
360
361
362
363
364
365
366 protected
367 int HealthStart =
368 0;
369
370
371
372
373
374 protected boolean HealthStart_Set = false;
375
376 @Override
377
378
379
380
381
382
383 public int getHealthStart()
384 {
385 return HealthStart;
386 }
387
388
389
390
391
392
393
394 protected
395 int HealthFull =
396 0;
397
398
399
400
401
402 protected boolean HealthFull_Set = false;
403
404 @Override
405
406
407
408
409
410
411 public int getHealthFull()
412 {
413 return HealthFull;
414 }
415
416
417
418
419
420
421
422 protected
423 int HealthMax =
424 0;
425
426
427
428
429
430 protected boolean HealthMax_Set = false;
431
432 @Override
433
434
435
436
437
438
439 public int getHealthMax()
440 {
441 return HealthMax;
442 }
443
444
445
446
447
448
449
450 protected
451 double AdrenalineStart =
452 0;
453
454
455
456
457
458 protected boolean AdrenalineStart_Set = false;
459
460 @Override
461
462
463
464
465
466
467 public double getAdrenalineStart()
468 {
469 return AdrenalineStart;
470 }
471
472
473
474
475
476
477
478 protected
479 double AdrenalineMax =
480 0;
481
482
483
484
485
486 protected boolean AdrenalineMax_Set = false;
487
488 @Override
489
490
491
492
493
494
495 public double getAdrenalineMax()
496 {
497 return AdrenalineMax;
498 }
499
500
501
502
503
504
505
506 protected
507 int ShieldStrengthStart =
508 0;
509
510
511
512
513
514 protected boolean ShieldStrengthStart_Set = false;
515
516 @Override
517
518
519
520
521
522
523 public int getShieldStrengthStart()
524 {
525 return ShieldStrengthStart;
526 }
527
528
529
530
531
532
533
534 protected
535 int ShieldStrengthMax =
536 0;
537
538
539
540
541
542 protected boolean ShieldStrengthMax_Set = false;
543
544 @Override
545
546
547
548
549
550
551 public int getShieldStrengthMax()
552 {
553 return ShieldStrengthMax;
554 }
555
556
557
558
559
560
561
562 protected
563 int MaxMultiJump =
564 0;
565
566
567
568
569
570 protected boolean MaxMultiJump_Set = false;
571
572 @Override
573
574
575
576
577
578
579 public int getMaxMultiJump()
580 {
581 return MaxMultiJump;
582 }
583
584
585
586
587
588
589
590 protected
591 double DamageScaling =
592 0;
593
594
595
596
597
598 protected boolean DamageScaling_Set = false;
599
600 @Override
601
602
603
604
605
606
607 public double getDamageScaling()
608 {
609 return DamageScaling;
610 }
611
612
613
614
615
616
617
618 protected
619 double GroundSpeed =
620 0;
621
622
623
624
625
626 protected boolean GroundSpeed_Set = false;
627
628 @Override
629
630
631
632
633
634
635 public double getGroundSpeed()
636 {
637 return GroundSpeed;
638 }
639
640
641
642
643
644
645
646 protected
647 double WaterSpeed =
648 0;
649
650
651
652
653
654 protected boolean WaterSpeed_Set = false;
655
656 @Override
657
658
659
660
661
662
663 public double getWaterSpeed()
664 {
665 return WaterSpeed;
666 }
667
668
669
670
671
672
673
674 protected
675 double AirSpeed =
676 0;
677
678
679
680
681
682 protected boolean AirSpeed_Set = false;
683
684 @Override
685
686
687
688
689
690
691 public double getAirSpeed()
692 {
693 return AirSpeed;
694 }
695
696
697
698
699
700
701
702 protected
703 double LadderSpeed =
704 0;
705
706
707
708
709
710 protected boolean LadderSpeed_Set = false;
711
712 @Override
713
714
715
716
717
718
719 public double getLadderSpeed()
720 {
721 return LadderSpeed;
722 }
723
724
725
726
727
728
729
730 protected
731 double AccelRate =
732 0;
733
734
735
736
737
738 protected boolean AccelRate_Set = false;
739
740 @Override
741
742
743
744
745
746
747 public double getAccelRate()
748 {
749 return AccelRate;
750 }
751
752
753
754
755
756
757
758 protected
759 double JumpZ =
760 0;
761
762
763
764
765
766 protected boolean JumpZ_Set = false;
767
768 @Override
769
770
771
772
773
774
775 public double getJumpZ()
776 {
777 return JumpZ;
778 }
779
780
781
782
783
784
785
786 protected
787 double MultiJumpBoost =
788 0;
789
790
791
792
793
794 protected boolean MultiJumpBoost_Set = false;
795
796 @Override
797
798
799
800
801
802
803 public double getMultiJumpBoost()
804 {
805 return MultiJumpBoost;
806 }
807
808
809
810
811
812
813
814 protected
815 double MaxFallSpeed =
816 0;
817
818
819
820
821
822 protected boolean MaxFallSpeed_Set = false;
823
824 @Override
825
826
827
828
829
830
831 public double getMaxFallSpeed()
832 {
833 return MaxFallSpeed;
834 }
835
836
837
838
839
840
841
842 protected
843 double DodgeSpeedFactor =
844 0;
845
846
847
848
849
850 protected boolean DodgeSpeedFactor_Set = false;
851
852 @Override
853
854
855
856
857
858
859 public double getDodgeSpeedFactor()
860 {
861 return DodgeSpeedFactor;
862 }
863
864
865
866
867
868
869
870 protected
871 double DodgeSpeedZ =
872 0;
873
874
875
876
877
878 protected boolean DodgeSpeedZ_Set = false;
879
880 @Override
881
882
883
884
885
886
887 public double getDodgeSpeedZ()
888 {
889 return DodgeSpeedZ;
890 }
891
892
893
894
895
896
897
898 protected
899 double AirControl =
900 0;
901
902
903
904
905
906 protected boolean AirControl_Set = false;
907
908 @Override
909
910
911
912
913
914
915 public double getAirControl()
916 {
917 return AirControl;
918 }
919
920
921 private InitedMessageLocal localPart = null;
922
923 @Override
924 public InitedMessageLocal
925 getLocal() {
926 if (localPart != null) return localPart;
927 return localPart = new
928 InitedMessageLocalMessage();
929 }
930
931 private InitedMessageShared sharedPart = null;
932
933 @Override
934 public InitedMessageShared
935 getShared() {
936 if (sharedPart != null) return sharedPart;
937 return sharedPart = new
938 InitedMessageSharedMessage();
939 }
940
941 private InitedMessageStatic staticPart = null;
942
943 @Override
944 public InitedMessageStatic
945 getStatic() {
946 if (staticPart != null) return staticPart;
947 return staticPart = new
948 InitedMessageStaticMessage();
949 }
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965 public class InitedMessageLocalMessage
966 extends
967 InitedMessageLocal
968 {
969
970
971 public UnrealId getId() {
972 return cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage.InitedMessageId;
973 }
974
975 @Override
976 public
977 InitedMessageLocalMessage clone() {
978 return this;
979 }
980
981 public InitedMessageLocalMessage getLocal() {
982 return this;
983 }
984 public ISharedWorldObject getShared() {
985 throw new UnsupportedOperationException("Could not return LOCAL as SHARED");
986 }
987 public IStaticWorldObject getStatic() {
988 throw new UnsupportedOperationException("Could not return LOCAL as STATIC");
989 }
990
991
992
993
994
995
996 public UnrealId getBotId()
997 {
998 return BotId;
999 }
1000
1001
1002
1003
1004
1005
1006 public int getHealthStart()
1007 {
1008 return HealthStart;
1009 }
1010
1011
1012
1013
1014
1015
1016 public int getHealthFull()
1017 {
1018 return HealthFull;
1019 }
1020
1021
1022
1023
1024
1025
1026 public int getHealthMax()
1027 {
1028 return HealthMax;
1029 }
1030
1031
1032
1033
1034
1035
1036 public double getAdrenalineStart()
1037 {
1038 return AdrenalineStart;
1039 }
1040
1041
1042
1043
1044
1045
1046 public double getAdrenalineMax()
1047 {
1048 return AdrenalineMax;
1049 }
1050
1051
1052
1053
1054
1055
1056 public int getShieldStrengthStart()
1057 {
1058 return ShieldStrengthStart;
1059 }
1060
1061
1062
1063
1064
1065
1066 public int getShieldStrengthMax()
1067 {
1068 return ShieldStrengthMax;
1069 }
1070
1071
1072
1073
1074
1075
1076 public int getMaxMultiJump()
1077 {
1078 return MaxMultiJump;
1079 }
1080
1081
1082
1083
1084
1085
1086 public double getDamageScaling()
1087 {
1088 return DamageScaling;
1089 }
1090
1091
1092
1093
1094
1095
1096 public double getGroundSpeed()
1097 {
1098 return GroundSpeed;
1099 }
1100
1101
1102
1103
1104
1105
1106 public double getWaterSpeed()
1107 {
1108 return WaterSpeed;
1109 }
1110
1111
1112
1113
1114
1115
1116 public double getAirSpeed()
1117 {
1118 return AirSpeed;
1119 }
1120
1121
1122
1123
1124
1125
1126 public double getLadderSpeed()
1127 {
1128 return LadderSpeed;
1129 }
1130
1131
1132
1133
1134
1135
1136 public double getAccelRate()
1137 {
1138 return AccelRate;
1139 }
1140
1141
1142
1143
1144
1145
1146 public double getJumpZ()
1147 {
1148 return JumpZ;
1149 }
1150
1151
1152
1153
1154
1155
1156 public double getMultiJumpBoost()
1157 {
1158 return MultiJumpBoost;
1159 }
1160
1161
1162
1163
1164
1165
1166 public double getMaxFallSpeed()
1167 {
1168 return MaxFallSpeed;
1169 }
1170
1171
1172
1173
1174
1175
1176 public double getDodgeSpeedFactor()
1177 {
1178 return DodgeSpeedFactor;
1179 }
1180
1181
1182
1183
1184
1185
1186 public double getDodgeSpeedZ()
1187 {
1188 return DodgeSpeedZ;
1189 }
1190
1191
1192
1193
1194
1195
1196 public double getAirControl()
1197 {
1198 return AirControl;
1199 }
1200
1201
1202 public String toString() {
1203 return
1204 super.toString() + "[" +
1205
1206 "BotId = " + String.valueOf(getBotId()
1207 ) + " | " +
1208
1209 "HealthStart = " + String.valueOf(getHealthStart()
1210 ) + " | " +
1211
1212 "HealthFull = " + String.valueOf(getHealthFull()
1213 ) + " | " +
1214
1215 "HealthMax = " + String.valueOf(getHealthMax()
1216 ) + " | " +
1217
1218 "AdrenalineStart = " + String.valueOf(getAdrenalineStart()
1219 ) + " | " +
1220
1221 "AdrenalineMax = " + String.valueOf(getAdrenalineMax()
1222 ) + " | " +
1223
1224 "ShieldStrengthStart = " + String.valueOf(getShieldStrengthStart()
1225 ) + " | " +
1226
1227 "ShieldStrengthMax = " + String.valueOf(getShieldStrengthMax()
1228 ) + " | " +
1229
1230 "MaxMultiJump = " + String.valueOf(getMaxMultiJump()
1231 ) + " | " +
1232
1233 "DamageScaling = " + String.valueOf(getDamageScaling()
1234 ) + " | " +
1235
1236 "GroundSpeed = " + String.valueOf(getGroundSpeed()
1237 ) + " | " +
1238
1239 "WaterSpeed = " + String.valueOf(getWaterSpeed()
1240 ) + " | " +
1241
1242 "AirSpeed = " + String.valueOf(getAirSpeed()
1243 ) + " | " +
1244
1245 "LadderSpeed = " + String.valueOf(getLadderSpeed()
1246 ) + " | " +
1247
1248 "AccelRate = " + String.valueOf(getAccelRate()
1249 ) + " | " +
1250
1251 "JumpZ = " + String.valueOf(getJumpZ()
1252 ) + " | " +
1253
1254 "MultiJumpBoost = " + String.valueOf(getMultiJumpBoost()
1255 ) + " | " +
1256
1257 "MaxFallSpeed = " + String.valueOf(getMaxFallSpeed()
1258 ) + " | " +
1259
1260 "DodgeSpeedFactor = " + String.valueOf(getDodgeSpeedFactor()
1261 ) + " | " +
1262
1263 "DodgeSpeedZ = " + String.valueOf(getDodgeSpeedZ()
1264 ) + " | " +
1265
1266 "AirControl = " + String.valueOf(getAirControl()
1267 ) + " | " +
1268
1269 "]";
1270 }
1271
1272
1273 public String toHtmlString() {
1274 return super.toString() + "[<br/>" +
1275
1276 "<b>BotId</b> = " + String.valueOf(getBotId()
1277 ) + " <br/> " +
1278
1279 "<b>HealthStart</b> = " + String.valueOf(getHealthStart()
1280 ) + " <br/> " +
1281
1282 "<b>HealthFull</b> = " + String.valueOf(getHealthFull()
1283 ) + " <br/> " +
1284
1285 "<b>HealthMax</b> = " + String.valueOf(getHealthMax()
1286 ) + " <br/> " +
1287
1288 "<b>AdrenalineStart</b> = " + String.valueOf(getAdrenalineStart()
1289 ) + " <br/> " +
1290
1291 "<b>AdrenalineMax</b> = " + String.valueOf(getAdrenalineMax()
1292 ) + " <br/> " +
1293
1294 "<b>ShieldStrengthStart</b> = " + String.valueOf(getShieldStrengthStart()
1295 ) + " <br/> " +
1296
1297 "<b>ShieldStrengthMax</b> = " + String.valueOf(getShieldStrengthMax()
1298 ) + " <br/> " +
1299
1300 "<b>MaxMultiJump</b> = " + String.valueOf(getMaxMultiJump()
1301 ) + " <br/> " +
1302
1303 "<b>DamageScaling</b> = " + String.valueOf(getDamageScaling()
1304 ) + " <br/> " +
1305
1306 "<b>GroundSpeed</b> = " + String.valueOf(getGroundSpeed()
1307 ) + " <br/> " +
1308
1309 "<b>WaterSpeed</b> = " + String.valueOf(getWaterSpeed()
1310 ) + " <br/> " +
1311
1312 "<b>AirSpeed</b> = " + String.valueOf(getAirSpeed()
1313 ) + " <br/> " +
1314
1315 "<b>LadderSpeed</b> = " + String.valueOf(getLadderSpeed()
1316 ) + " <br/> " +
1317
1318 "<b>AccelRate</b> = " + String.valueOf(getAccelRate()
1319 ) + " <br/> " +
1320
1321 "<b>JumpZ</b> = " + String.valueOf(getJumpZ()
1322 ) + " <br/> " +
1323
1324 "<b>MultiJumpBoost</b> = " + String.valueOf(getMultiJumpBoost()
1325 ) + " <br/> " +
1326
1327 "<b>MaxFallSpeed</b> = " + String.valueOf(getMaxFallSpeed()
1328 ) + " <br/> " +
1329
1330 "<b>DodgeSpeedFactor</b> = " + String.valueOf(getDodgeSpeedFactor()
1331 ) + " <br/> " +
1332
1333 "<b>DodgeSpeedZ</b> = " + String.valueOf(getDodgeSpeedZ()
1334 ) + " <br/> " +
1335
1336 "<b>AirControl</b> = " + String.valueOf(getAirControl()
1337 ) + " <br/> " +
1338
1339 "<br/>]";
1340 }
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351 }
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367 public class InitedMessageStaticMessage
1368 extends
1369 InitedMessageStatic
1370 {
1371
1372
1373 public UnrealId getId() {
1374 return cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage.InitedMessageId;
1375 }
1376
1377 @Override
1378 public
1379 InitedMessageStaticMessage clone() {
1380 return this;
1381 }
1382
1383
1384 @Override
1385 public boolean isDifferentFrom(IStaticWorldObject other)
1386 {
1387 if (other == null)
1388 {
1389 return true;
1390 }
1391 else if (other == this)
1392 {
1393 return false;
1394 }
1395 else
1396 {
1397 InitedMessageStatic obj = (InitedMessageStatic) other;
1398
1399
1400 }
1401 return false;
1402 }
1403
1404
1405 public String toString() {
1406 return
1407 super.toString() + "[" +
1408
1409 "]";
1410 }
1411
1412
1413 public String toHtmlString() {
1414 return super.toString() + "[<br/>" +
1415
1416 "<br/>]";
1417 }
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428 }
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444 public class InitedMessageSharedMessage
1445 extends
1446 InitedMessageShared
1447 {
1448
1449
1450
1451 public InitedMessageSharedMessage()
1452 {
1453
1454 }
1455
1456
1457 public UnrealId getId() {
1458 return cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage.InitedMessageId;
1459 }
1460
1461 @Override
1462 public
1463 InitedMessageSharedMessage clone() {
1464 return this;
1465 }
1466
1467
1468
1469
1470 protected HashMap<PropertyId, ISharedProperty> propertyMap = new HashMap<PropertyId, ISharedProperty>(
1471 0
1472 );
1473
1474 @Override
1475 public ISharedProperty getProperty(PropertyId id) {
1476 return propertyMap.get(id);
1477 }
1478
1479 @Override
1480 public Map<PropertyId, ISharedProperty> getProperties() {
1481 return propertyMap;
1482 }
1483
1484
1485
1486
1487 public String toString() {
1488 return
1489 super.toString() + "[" +
1490
1491 "]";
1492 }
1493
1494
1495 public String toHtmlString() {
1496 return super.toString() + "[<br/>" +
1497
1498 "<br/>]";
1499 }
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510 }
1511
1512
1513
1514
1515 @Override
1516 public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object) {
1517 if (object == null)
1518 {
1519 return new IWorldObjectUpdateResult.WorldObjectUpdateResult(IWorldObjectUpdateResult.Result.CREATED, this);
1520 }
1521 if (!( object instanceof InitedMessageMessage) ) {
1522 throw new PogamutException("Can't update different class than InitedMessageMessage, got class " + object.getClass().getSimpleName() + "!", this);
1523 }
1524 InitedMessageMessage toUpdate = (InitedMessageMessage)object;
1525
1526 boolean updated = false;
1527
1528
1529
1530 if (!SafeEquals.equals(toUpdate.BotId, getBotId()
1531 )) {
1532 toUpdate.BotId=getBotId()
1533 ;
1534 updated = true;
1535 }
1536
1537 if (toUpdate.HealthStart != getHealthStart()
1538 ) {
1539 toUpdate.HealthStart=getHealthStart()
1540 ;
1541 updated = true;
1542 }
1543
1544 if (toUpdate.HealthFull != getHealthFull()
1545 ) {
1546 toUpdate.HealthFull=getHealthFull()
1547 ;
1548 updated = true;
1549 }
1550
1551 if (toUpdate.HealthMax != getHealthMax()
1552 ) {
1553 toUpdate.HealthMax=getHealthMax()
1554 ;
1555 updated = true;
1556 }
1557
1558 if (toUpdate.AdrenalineStart != getAdrenalineStart()
1559 ) {
1560 toUpdate.AdrenalineStart=getAdrenalineStart()
1561 ;
1562 updated = true;
1563 }
1564
1565 if (toUpdate.AdrenalineMax != getAdrenalineMax()
1566 ) {
1567 toUpdate.AdrenalineMax=getAdrenalineMax()
1568 ;
1569 updated = true;
1570 }
1571
1572 if (toUpdate.ShieldStrengthStart != getShieldStrengthStart()
1573 ) {
1574 toUpdate.ShieldStrengthStart=getShieldStrengthStart()
1575 ;
1576 updated = true;
1577 }
1578
1579 if (toUpdate.ShieldStrengthMax != getShieldStrengthMax()
1580 ) {
1581 toUpdate.ShieldStrengthMax=getShieldStrengthMax()
1582 ;
1583 updated = true;
1584 }
1585
1586 if (toUpdate.MaxMultiJump != getMaxMultiJump()
1587 ) {
1588 toUpdate.MaxMultiJump=getMaxMultiJump()
1589 ;
1590 updated = true;
1591 }
1592
1593 if (toUpdate.DamageScaling != getDamageScaling()
1594 ) {
1595 toUpdate.DamageScaling=getDamageScaling()
1596 ;
1597 updated = true;
1598 }
1599
1600 if (toUpdate.GroundSpeed != getGroundSpeed()
1601 ) {
1602 toUpdate.GroundSpeed=getGroundSpeed()
1603 ;
1604 updated = true;
1605 }
1606
1607 if (toUpdate.WaterSpeed != getWaterSpeed()
1608 ) {
1609 toUpdate.WaterSpeed=getWaterSpeed()
1610 ;
1611 updated = true;
1612 }
1613
1614 if (toUpdate.AirSpeed != getAirSpeed()
1615 ) {
1616 toUpdate.AirSpeed=getAirSpeed()
1617 ;
1618 updated = true;
1619 }
1620
1621 if (toUpdate.LadderSpeed != getLadderSpeed()
1622 ) {
1623 toUpdate.LadderSpeed=getLadderSpeed()
1624 ;
1625 updated = true;
1626 }
1627
1628 if (toUpdate.AccelRate != getAccelRate()
1629 ) {
1630 toUpdate.AccelRate=getAccelRate()
1631 ;
1632 updated = true;
1633 }
1634
1635 if (toUpdate.JumpZ != getJumpZ()
1636 ) {
1637 toUpdate.JumpZ=getJumpZ()
1638 ;
1639 updated = true;
1640 }
1641
1642 if (toUpdate.MultiJumpBoost != getMultiJumpBoost()
1643 ) {
1644 toUpdate.MultiJumpBoost=getMultiJumpBoost()
1645 ;
1646 updated = true;
1647 }
1648
1649 if (toUpdate.MaxFallSpeed != getMaxFallSpeed()
1650 ) {
1651 toUpdate.MaxFallSpeed=getMaxFallSpeed()
1652 ;
1653 updated = true;
1654 }
1655
1656 if (toUpdate.DodgeSpeedFactor != getDodgeSpeedFactor()
1657 ) {
1658 toUpdate.DodgeSpeedFactor=getDodgeSpeedFactor()
1659 ;
1660 updated = true;
1661 }
1662
1663 if (toUpdate.DodgeSpeedZ != getDodgeSpeedZ()
1664 ) {
1665 toUpdate.DodgeSpeedZ=getDodgeSpeedZ()
1666 ;
1667 updated = true;
1668 }
1669
1670 if (toUpdate.AirControl != getAirControl()
1671 ) {
1672 toUpdate.AirControl=getAirControl()
1673 ;
1674 updated = true;
1675 }
1676
1677
1678
1679
1680
1681
1682 toUpdate.SimTime = SimTime;
1683
1684 if (updated) {
1685 return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IWorldObject>(IWorldObjectUpdateResult.Result.UPDATED, toUpdate);
1686 } else {
1687 return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IWorldObject>(IWorldObjectUpdateResult.Result.SAME, toUpdate);
1688 }
1689 }
1690
1691 @Override
1692 public ILocalWorldObjectUpdatedEvent getLocalEvent() {
1693 return new InitedMessageLocalImpl.InitedMessageLocalUpdate
1694 (this.getLocal(), SimTime);
1695 }
1696
1697 @Override
1698 public ISharedWorldObjectUpdatedEvent getSharedEvent() {
1699 return new InitedMessageSharedImpl.InitedMessageSharedUpdate
1700 (this.getShared(), SimTime, this.getTeamId());
1701 }
1702
1703 @Override
1704 public IStaticWorldObjectUpdatedEvent getStaticEvent() {
1705 return new InitedMessageStaticImpl.InitedMessageStaticUpdate
1706 (this.getStatic(), SimTime);
1707 }
1708
1709
1710 public String toString() {
1711 return
1712 super.toString() + "[" +
1713
1714 "BotId = " + String.valueOf(getBotId()
1715 ) + " | " +
1716
1717 "HealthStart = " + String.valueOf(getHealthStart()
1718 ) + " | " +
1719
1720 "HealthFull = " + String.valueOf(getHealthFull()
1721 ) + " | " +
1722
1723 "HealthMax = " + String.valueOf(getHealthMax()
1724 ) + " | " +
1725
1726 "AdrenalineStart = " + String.valueOf(getAdrenalineStart()
1727 ) + " | " +
1728
1729 "AdrenalineMax = " + String.valueOf(getAdrenalineMax()
1730 ) + " | " +
1731
1732 "ShieldStrengthStart = " + String.valueOf(getShieldStrengthStart()
1733 ) + " | " +
1734
1735 "ShieldStrengthMax = " + String.valueOf(getShieldStrengthMax()
1736 ) + " | " +
1737
1738 "MaxMultiJump = " + String.valueOf(getMaxMultiJump()
1739 ) + " | " +
1740
1741 "DamageScaling = " + String.valueOf(getDamageScaling()
1742 ) + " | " +
1743
1744 "GroundSpeed = " + String.valueOf(getGroundSpeed()
1745 ) + " | " +
1746
1747 "WaterSpeed = " + String.valueOf(getWaterSpeed()
1748 ) + " | " +
1749
1750 "AirSpeed = " + String.valueOf(getAirSpeed()
1751 ) + " | " +
1752
1753 "LadderSpeed = " + String.valueOf(getLadderSpeed()
1754 ) + " | " +
1755
1756 "AccelRate = " + String.valueOf(getAccelRate()
1757 ) + " | " +
1758
1759 "JumpZ = " + String.valueOf(getJumpZ()
1760 ) + " | " +
1761
1762 "MultiJumpBoost = " + String.valueOf(getMultiJumpBoost()
1763 ) + " | " +
1764
1765 "MaxFallSpeed = " + String.valueOf(getMaxFallSpeed()
1766 ) + " | " +
1767
1768 "DodgeSpeedFactor = " + String.valueOf(getDodgeSpeedFactor()
1769 ) + " | " +
1770
1771 "DodgeSpeedZ = " + String.valueOf(getDodgeSpeedZ()
1772 ) + " | " +
1773
1774 "AirControl = " + String.valueOf(getAirControl()
1775 ) + " | " +
1776
1777 "]";
1778 }
1779
1780
1781 public String toHtmlString() {
1782 return super.toString() + "[<br/>" +
1783
1784 "<b>BotId</b> = " + String.valueOf(getBotId()
1785 ) + " <br/> " +
1786
1787 "<b>HealthStart</b> = " + String.valueOf(getHealthStart()
1788 ) + " <br/> " +
1789
1790 "<b>HealthFull</b> = " + String.valueOf(getHealthFull()
1791 ) + " <br/> " +
1792
1793 "<b>HealthMax</b> = " + String.valueOf(getHealthMax()
1794 ) + " <br/> " +
1795
1796 "<b>AdrenalineStart</b> = " + String.valueOf(getAdrenalineStart()
1797 ) + " <br/> " +
1798
1799 "<b>AdrenalineMax</b> = " + String.valueOf(getAdrenalineMax()
1800 ) + " <br/> " +
1801
1802 "<b>ShieldStrengthStart</b> = " + String.valueOf(getShieldStrengthStart()
1803 ) + " <br/> " +
1804
1805 "<b>ShieldStrengthMax</b> = " + String.valueOf(getShieldStrengthMax()
1806 ) + " <br/> " +
1807
1808 "<b>MaxMultiJump</b> = " + String.valueOf(getMaxMultiJump()
1809 ) + " <br/> " +
1810
1811 "<b>DamageScaling</b> = " + String.valueOf(getDamageScaling()
1812 ) + " <br/> " +
1813
1814 "<b>GroundSpeed</b> = " + String.valueOf(getGroundSpeed()
1815 ) + " <br/> " +
1816
1817 "<b>WaterSpeed</b> = " + String.valueOf(getWaterSpeed()
1818 ) + " <br/> " +
1819
1820 "<b>AirSpeed</b> = " + String.valueOf(getAirSpeed()
1821 ) + " <br/> " +
1822
1823 "<b>LadderSpeed</b> = " + String.valueOf(getLadderSpeed()
1824 ) + " <br/> " +
1825
1826 "<b>AccelRate</b> = " + String.valueOf(getAccelRate()
1827 ) + " <br/> " +
1828
1829 "<b>JumpZ</b> = " + String.valueOf(getJumpZ()
1830 ) + " <br/> " +
1831
1832 "<b>MultiJumpBoost</b> = " + String.valueOf(getMultiJumpBoost()
1833 ) + " <br/> " +
1834
1835 "<b>MaxFallSpeed</b> = " + String.valueOf(getMaxFallSpeed()
1836 ) + " <br/> " +
1837
1838 "<b>DodgeSpeedFactor</b> = " + String.valueOf(getDodgeSpeedFactor()
1839 ) + " <br/> " +
1840
1841 "<b>DodgeSpeedZ</b> = " + String.valueOf(getDodgeSpeedZ()
1842 ) + " <br/> " +
1843
1844 "<b>AirControl</b> = " + String.valueOf(getAirControl()
1845 ) + " <br/> " +
1846
1847 "<br/>]";
1848 }
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859 }
1860