View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2    		
3    		// --- IMPORTS FROM /messages/settings/javasettings/javaimport BEGIN
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   		// --- IMPORTS FROM /messages/settings/javasettings/javaimport END
6   		
7   		
8   		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] BEGIN
9   				
10  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] END
11  		
12  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=static]+classtype[@name=impl] BEGIN
13  		
14  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=static]+classtype[@name=impl] END
15      
16   		/**
17           *  
18              				Implementation of the static part of the GameBots2004 message NAV.  
19              			
20           *
21           *  <p></p><p></p>
22           *  Complete message documentation:               
23           *  
24  		Synchronous message. NavPoint carries information about UT
25  		navigation point - location, reachability... Also some item can
26  		be respawned at this point. Or some additional information can
27  		be stored here (if it is an ambush point, or sniper point..).
28  	
29           */
30   	public class NavPointStaticImpl 
31    						extends
32    						NavPointStatic
33  	    {
34   	
35      	
36      	
37      	/**
38      	 * Parameter-less contructor for the message.
39      	 */
40  		public NavPointStaticImpl()
41  		{
42  		}
43  	
44      	
45      	
46      	
47      	/**
48  		 * Creates new instance of the message NavPoint.
49  		 * 
50  		Synchronous message. NavPoint carries information about UT
51  		navigation point - location, reachability... Also some item can
52  		be respawned at this point. Or some additional information can
53  		be stored here (if it is an ambush point, or sniper point..).
54  	
55  		 * Corresponding GameBots message
56  		 *   (static part)
57  		 *   is
58  		 *   NAV.
59  		 * 
60   	  	 * 
61  		 *   
62  		 *     @param Id 
63  			A unique Id of this navigation point assigned by the game.
64  		
65  		 *   
66  		 * 
67  		 *   
68  		 * 
69  		 *   
70  		 * 
71  		 *   
72  		 * 
73  		 *   
74  		 *     @param Item 
75  			Unique Id of the respawned item (the item respawns at this
76  			point). Not sent if point is not an inventory spot. Sent only in HandShake.
77  		
78  		 *   
79  		 * 
80  		 *   
81  		 *     @param ItemClass 
82              Class of the item (e.g. xWeapons.FlakCannonPickup). Not sent if point is not an inventory spot. Sent only in HandShake.
83          
84  		 *   
85  		 * 
86  		 *   
87  		 * 
88  		 *   
89  		 * 
90  		 *   
91  		 *     @param Mover 
92              If this NavPoint is marking some mover, the mover id will be here. Not sent if point is not a Door, a LiftCenter or a LiftExit. Sent only in HandShake.
93          
94  		 *   
95  		 * 
96  		 *   
97  		 *     @param LiftOffset 
98              Starting vector between MyLift location and LiftCenter location. Not sent if point is not a LiftCenter. Sent only in HandShake.
99          
100 		 *   
101 		 * 
102 		 *   
103 		 *     @param LiftJumpExit 
104             Boolean. If we can/should exit the lift by a jump when near the destination place. Not sent if point is not a LiftExit. Sent only in HandShake.
105         
106 		 *   
107 		 * 
108 		 *   
109 		 *     @param NoDoubleJump 
110             Boolean. If we should or not use double jump when exiting lift with a jump. Not sent if point is not a LiftExit. Sent only in HandShake.
111         
112 		 *   
113 		 * 
114 		 *   
115 		 * 
116 		 *   
117 		 * 
118 		 *   
119 		 *     @param TeamNumber 
120 			Will be sent if this is a player start. In Team games (team deathmatch, capture the flag, domination) holds information about which team respawns at this player start spot. In non-team games will return 0!
121 		
122 		 *   
123 		 * 
124 		 *   
125 		 *     @param DomPoint If this point marks a DominationPoint (for BotDoubleDomination game).
126 		 *   
127 		 * 
128 		 *   
129 		 *     @param DomPointController Exported if this NavPoint is a DominationPoint (for BotDoubleDomination game) - which team controls this point.
130 		 *   
131 		 * 
132 		 *   
133 		 *     @param Door 
134 			If this point marks a door mover.
135 		
136 		 *   
137 		 * 
138 		 *   
139 		 *     @param LiftCenter 
140 			If this point marks a lift center (used to mark center of a lift mover, note that this point will be always moved with the lift).
141 		
142 		 *   
143 		 * 
144 		 *   
145 		 *     @param LiftExit 
146 			If this point marks a lift exit (used to mark exit point of a lift mover).
147 		
148 		 *   
149 		 * 
150 		 *   
151 		 *     @param AIMarker 
152 			If this point is an AI marker - marks an interesting spot in the environment. May be ambush point or sniping spot, etc.
153 		
154 		 *   
155 		 * 
156 		 *   
157 		 *     @param JumpSpot 
158 			If this point marks a jump spot (a special device that causes the bot to jump high or far).
159 		
160 		 *   
161 		 * 
162 		 *   
163 		 *     @param JumpPad 
164 			If this point marks a jump pad (a special device that causes the bot to jump high or far).
165 		
166 		 *   
167 		 * 
168 		 *   
169 		 *     @param JumpDest 
170 			If this point marks a jump destination - some place that can be reached by some special jump.
171 		
172 		 *   
173 		 * 
174 		 *   
175 		 *     @param Teleporter 
176 			If this point marks a teleport. 
177 		
178 		 *   
179 		 * 
180 		 *   
181 		 *     @param Rotation 
182 			If the type is AIMarker. The rotation the bot should be
183 			facing, when doing the action specified by AIMarker. Sent only in HandShake.
184 		
185 		 *   
186 		 * 
187 		 *   
188 		 *     @param RoamingSpot 
189 			Some ambush point, where is good chance to intercept
190 			approaching opponents. Sent only in HandShake.
191 		
192 		 *   
193 		 * 
194 		 *   
195 		 *     @param SnipingSpot Point good for sniping. Sent only in HandShake.
196 		 *   
197 		 * 
198 		 *   
199 		 *     @param ItemInstance If item should be present at this navpoint it's instance will be here.
200 		 *   
201 		 * 
202 		 *   
203 		 *     @param OutgoingEdges Maps edge-LEADING_TO-navpoint-UnrealId to neighbour link, those are outgoing edges (those edges that originates in this navpoint going to another one, those you may usually travel).
204 		 *   
205 		 * 
206 		 *   
207 		 *     @param IncomingEdges Maps edge-ORIGINATES_FROM-navpoint-UnrealId to neighbour link, those are incoming edges (those edges that originates in different navpoint and ends here, do not use this to ask whether you can get to navpoint of specific unreal id, use OutgoingEdges instead).
208 		 *   
209 		 * 
210 		 *   
211 		 *     @param PreferedWeapon 
212 			Class of the weapon that should be prefered when using this
213 			point for AIMarker specified action. Sent only in HandShake.
214 		
215 		 *   
216 		 * 
217 		 */
218 		public NavPointStaticImpl(
219 			UnrealId Id,  UnrealId Item,  ItemType ItemClass,  UnrealId Mover,  Vector3d LiftOffset,  boolean LiftJumpExit,  boolean NoDoubleJump,  int TeamNumber,  boolean DomPoint,  int DomPointController,  boolean Door,  boolean LiftCenter,  boolean LiftExit,  boolean AIMarker,  boolean JumpSpot,  boolean JumpPad,  boolean JumpDest,  boolean Teleporter,  Rotation Rotation,  boolean RoamingSpot,  boolean SnipingSpot,  Item ItemInstance,  Map<UnrealId, NavPointNeighbourLink> OutgoingEdges,  Map<UnrealId, NavPointNeighbourLink> IncomingEdges,  String PreferedWeapon
220 		) {
221 			
222 					this.Id = Id;
223 				
224 					this.Item = Item;
225 				
226 					this.ItemClass = ItemClass;
227 				
228 					this.Mover = Mover;
229 				
230 					this.LiftOffset = LiftOffset;
231 				
232 					this.LiftJumpExit = LiftJumpExit;
233 				
234 					this.NoDoubleJump = NoDoubleJump;
235 				
236 					this.TeamNumber = TeamNumber;
237 				
238 					this.DomPoint = DomPoint;
239 				
240 					this.DomPointController = DomPointController;
241 				
242 					this.Door = Door;
243 				
244 					this.LiftCenter = LiftCenter;
245 				
246 					this.LiftExit = LiftExit;
247 				
248 					this.AIMarker = AIMarker;
249 				
250 					this.JumpSpot = JumpSpot;
251 				
252 					this.JumpPad = JumpPad;
253 				
254 					this.JumpDest = JumpDest;
255 				
256 					this.Teleporter = Teleporter;
257 				
258 					this.Rotation = Rotation;
259 				
260 					this.RoamingSpot = RoamingSpot;
261 				
262 					this.SnipingSpot = SnipingSpot;
263 				
264 					this.ItemInstance = ItemInstance;
265 				
266 					this.OutgoingEdges = OutgoingEdges;
267 				
268 					this.IncomingEdges = IncomingEdges;
269 				
270 					this.PreferedWeapon = PreferedWeapon;
271 				
272 		}
273     
274     	/**
275 		 * Cloning constructor from the full message.
276 		 *
277 		 * @param original
278 		 */
279 		public NavPointStaticImpl(NavPoint original) {		
280 			
281 					this.Id = original.getId()
282  	;
283 				
284 					this.Item = original.getItem()
285  	;
286 				
287 					this.ItemClass = original.getItemClass()
288  	;
289 				
290 					this.Mover = original.getMover()
291  	;
292 				
293 					this.LiftOffset = original.getLiftOffset()
294  	;
295 				
296 					this.LiftJumpExit = original.isLiftJumpExit()
297  	;
298 				
299 					this.NoDoubleJump = original.isNoDoubleJump()
300  	;
301 				
302 					this.TeamNumber = original.getTeamNumber()
303  	;
304 				
305 					this.DomPoint = original.isDomPoint()
306  	;
307 				
308 					this.DomPointController = original.getDomPointController()
309  	;
310 				
311 					this.Door = original.isDoor()
312  	;
313 				
314 					this.LiftCenter = original.isLiftCenter()
315  	;
316 				
317 					this.LiftExit = original.isLiftExit()
318  	;
319 				
320 					this.AIMarker = original.isAIMarker()
321  	;
322 				
323 					this.JumpSpot = original.isJumpSpot()
324  	;
325 				
326 					this.JumpPad = original.isJumpPad()
327  	;
328 				
329 					this.JumpDest = original.isJumpDest()
330  	;
331 				
332 					this.Teleporter = original.isTeleporter()
333  	;
334 				
335 					this.Rotation = original.getRotation()
336  	;
337 				
338 					this.RoamingSpot = original.isRoamingSpot()
339  	;
340 				
341 					this.SnipingSpot = original.isSnipingSpot()
342  	;
343 				
344 					this.ItemInstance = original.getItemInstance()
345  	;
346 				
347 					this.OutgoingEdges = original.getOutgoingEdges()
348  	;
349 				
350 					this.IncomingEdges = original.getIncomingEdges()
351  	;
352 				
353 					this.PreferedWeapon = original.getPreferedWeapon()
354  	;
355 				
356 			this.SimTime = original.getSimTime();			
357 		}
358 		
359 		/**
360 		 * Cloning constructor from the full message.
361 		 *
362 		 * @param original
363 		 */
364 		public NavPointStaticImpl(NavPointStaticImpl original) {		
365 			
366 					this.Id = original.getId()
367  	;
368 				
369 					this.Item = original.getItem()
370  	;
371 				
372 					this.ItemClass = original.getItemClass()
373  	;
374 				
375 					this.Mover = original.getMover()
376  	;
377 				
378 					this.LiftOffset = original.getLiftOffset()
379  	;
380 				
381 					this.LiftJumpExit = original.isLiftJumpExit()
382  	;
383 				
384 					this.NoDoubleJump = original.isNoDoubleJump()
385  	;
386 				
387 					this.TeamNumber = original.getTeamNumber()
388  	;
389 				
390 					this.DomPoint = original.isDomPoint()
391  	;
392 				
393 					this.DomPointController = original.getDomPointController()
394  	;
395 				
396 					this.Door = original.isDoor()
397  	;
398 				
399 					this.LiftCenter = original.isLiftCenter()
400  	;
401 				
402 					this.LiftExit = original.isLiftExit()
403  	;
404 				
405 					this.AIMarker = original.isAIMarker()
406  	;
407 				
408 					this.JumpSpot = original.isJumpSpot()
409  	;
410 				
411 					this.JumpPad = original.isJumpPad()
412  	;
413 				
414 					this.JumpDest = original.isJumpDest()
415  	;
416 				
417 					this.Teleporter = original.isTeleporter()
418  	;
419 				
420 					this.Rotation = original.getRotation()
421  	;
422 				
423 					this.RoamingSpot = original.isRoamingSpot()
424  	;
425 				
426 					this.SnipingSpot = original.isSnipingSpot()
427  	;
428 				
429 					this.ItemInstance = original.getItemInstance()
430  	;
431 				
432 					this.OutgoingEdges = original.getOutgoingEdges()
433  	;
434 				
435 					this.IncomingEdges = original.getIncomingEdges()
436  	;
437 				
438 					this.PreferedWeapon = original.getPreferedWeapon()
439  	;
440 				
441 			this.SimTime = original.getSimTime();
442 		}
443 		
444 			/**
445 			 * Cloning constructor from the message part.
446 			 *
447 			 * @param original
448 			 */
449 			public NavPointStaticImpl(NavPointStatic original) {
450 				
451 						this.Id = original.getId()
452  	;
453 					
454 						this.Item = original.getItem()
455  	;
456 					
457 						this.ItemClass = original.getItemClass()
458  	;
459 					
460 						this.Mover = original.getMover()
461  	;
462 					
463 						this.LiftOffset = original.getLiftOffset()
464  	;
465 					
466 						this.LiftJumpExit = original.isLiftJumpExit()
467  	;
468 					
469 						this.NoDoubleJump = original.isNoDoubleJump()
470  	;
471 					
472 						this.TeamNumber = original.getTeamNumber()
473  	;
474 					
475 						this.DomPoint = original.isDomPoint()
476  	;
477 					
478 						this.DomPointController = original.getDomPointController()
479  	;
480 					
481 						this.Door = original.isDoor()
482  	;
483 					
484 						this.LiftCenter = original.isLiftCenter()
485  	;
486 					
487 						this.LiftExit = original.isLiftExit()
488  	;
489 					
490 						this.AIMarker = original.isAIMarker()
491  	;
492 					
493 						this.JumpSpot = original.isJumpSpot()
494  	;
495 					
496 						this.JumpPad = original.isJumpPad()
497  	;
498 					
499 						this.JumpDest = original.isJumpDest()
500  	;
501 					
502 						this.Teleporter = original.isTeleporter()
503  	;
504 					
505 						this.Rotation = original.getRotation()
506  	;
507 					
508 						this.RoamingSpot = original.isRoamingSpot()
509  	;
510 					
511 						this.SnipingSpot = original.isSnipingSpot()
512  	;
513 					
514 						this.ItemInstance = original.getItemInstance()
515  	;
516 					
517 						this.OutgoingEdges = original.getOutgoingEdges()
518  	;
519 					
520 						this.IncomingEdges = original.getIncomingEdges()
521  	;
522 					
523 						this.PreferedWeapon = original.getPreferedWeapon()
524  	;
525 					
526 			}
527 		
528    				
529    				@Override
530    				public void setSimTime(long SimTime) {
531 					super.setSimTime(SimTime);
532 				}
533    			
534 	    				@Override
535 	    				public 
536 	    				NavPointStaticImpl clone() {
537 	    					return new 
538 	    					NavPointStaticImpl(this);
539 	    				}
540 	    				
541 	    				
542     	
543 	    /**
544          * 
545 			A unique Id of this navigation point assigned by the game.
546 		 
547          */
548         protected
549          UnrealId Id =
550        	null;
551 	
552  		/**
553          * 
554 			A unique Id of this navigation point assigned by the game.
555 		 
556          */
557         public  UnrealId getId()
558  	 {
559 				    					return Id;
560 				    				}
561 				    			
562     	
563 	    /**
564          * 
565 			Unique Id of the respawned item (the item respawns at this
566 			point). Not sent if point is not an inventory spot. Sent only in HandShake.
567 		 
568          */
569         protected
570          UnrealId Item =
571        	null;
572 	
573  		/**
574          * 
575 			Unique Id of the respawned item (the item respawns at this
576 			point). Not sent if point is not an inventory spot. Sent only in HandShake.
577 		 
578          */
579         public  UnrealId getItem()
580  	 {
581 				    					return Item;
582 				    				}
583 				    			
584     	
585 	    /**
586          * 
587             Class of the item (e.g. xWeapons.FlakCannonPickup). Not sent if point is not an inventory spot. Sent only in HandShake.
588          
589          */
590         protected
591          ItemType ItemClass =
592        	null;
593 	
594  		/**
595          * 
596             Class of the item (e.g. xWeapons.FlakCannonPickup). Not sent if point is not an inventory spot. Sent only in HandShake.
597          
598          */
599         public  ItemType getItemClass()
600  	 {
601 				    					return ItemClass;
602 				    				}
603 				    			
604     	
605 	    /**
606          * 
607             If this NavPoint is marking some mover, the mover id will be here. Not sent if point is not a Door, a LiftCenter or a LiftExit. Sent only in HandShake.
608          
609          */
610         protected
611          UnrealId Mover =
612        	null;
613 	
614  		/**
615          * 
616             If this NavPoint is marking some mover, the mover id will be here. Not sent if point is not a Door, a LiftCenter or a LiftExit. Sent only in HandShake.
617          
618          */
619         public  UnrealId getMover()
620  	 {
621 				    					return Mover;
622 				    				}
623 				    			
624     	
625 	    /**
626          * 
627             Starting vector between MyLift location and LiftCenter location. Not sent if point is not a LiftCenter. Sent only in HandShake.
628          
629          */
630         protected
631          Vector3d LiftOffset =
632        	null;
633 	
634  		/**
635          * 
636             Starting vector between MyLift location and LiftCenter location. Not sent if point is not a LiftCenter. Sent only in HandShake.
637          
638          */
639         public  Vector3d getLiftOffset()
640  	 {
641 				    					return LiftOffset;
642 				    				}
643 				    			
644     	
645 	    /**
646          * 
647             Boolean. If we can/should exit the lift by a jump when near the destination place. Not sent if point is not a LiftExit. Sent only in HandShake.
648          
649          */
650         protected
651          boolean LiftJumpExit =
652        	false;
653 	
654  		/**
655          * 
656             Boolean. If we can/should exit the lift by a jump when near the destination place. Not sent if point is not a LiftExit. Sent only in HandShake.
657          
658          */
659         public  boolean isLiftJumpExit()
660  	 {
661 				    					return LiftJumpExit;
662 				    				}
663 				    			
664     	
665 	    /**
666          * 
667             Boolean. If we should or not use double jump when exiting lift with a jump. Not sent if point is not a LiftExit. Sent only in HandShake.
668          
669          */
670         protected
671          boolean NoDoubleJump =
672        	false;
673 	
674  		/**
675          * 
676             Boolean. If we should or not use double jump when exiting lift with a jump. Not sent if point is not a LiftExit. Sent only in HandShake.
677          
678          */
679         public  boolean isNoDoubleJump()
680  	 {
681 				    					return NoDoubleJump;
682 				    				}
683 				    			
684     	
685 	    /**
686          * 
687 			Will be sent if this is a player start. In Team games (team deathmatch, capture the flag, domination) holds information about which team respawns at this player start spot. In non-team games will return 0!
688 		 
689          */
690         protected
691          int TeamNumber =
692        	0;
693 	
694  		/**
695          * 
696 			Will be sent if this is a player start. In Team games (team deathmatch, capture the flag, domination) holds information about which team respawns at this player start spot. In non-team games will return 0!
697 		 
698          */
699         public  int getTeamNumber()
700  	 {
701 				    					return TeamNumber;
702 				    				}
703 				    			
704     	
705 	    /**
706          * If this point marks a DominationPoint (for BotDoubleDomination game). 
707          */
708         protected
709          boolean DomPoint =
710        	false;
711 	
712  		/**
713          * If this point marks a DominationPoint (for BotDoubleDomination game). 
714          */
715         public  boolean isDomPoint()
716  	 {
717 				    					return DomPoint;
718 				    				}
719 				    			
720     	
721 	    /**
722          * Exported if this NavPoint is a DominationPoint (for BotDoubleDomination game) - which team controls this point. 
723          */
724         protected
725          int DomPointController =
726        	0;
727 	
728  		/**
729          * Exported if this NavPoint is a DominationPoint (for BotDoubleDomination game) - which team controls this point. 
730          */
731         public  int getDomPointController()
732  	 {
733 				    					return DomPointController;
734 				    				}
735 				    			
736     	
737 	    /**
738          * 
739 			If this point marks a door mover.
740 		 
741          */
742         protected
743          boolean Door =
744        	false;
745 	
746  		/**
747          * 
748 			If this point marks a door mover.
749 		 
750          */
751         public  boolean isDoor()
752  	 {
753 				    					return Door;
754 				    				}
755 				    			
756     	
757 	    /**
758          * 
759 			If this point marks a lift center (used to mark center of a lift mover, note that this point will be always moved with the lift).
760 		 
761          */
762         protected
763          boolean LiftCenter =
764        	false;
765 	
766  		/**
767          * 
768 			If this point marks a lift center (used to mark center of a lift mover, note that this point will be always moved with the lift).
769 		 
770          */
771         public  boolean isLiftCenter()
772  	 {
773 				    					return LiftCenter;
774 				    				}
775 				    			
776     	
777 	    /**
778          * 
779 			If this point marks a lift exit (used to mark exit point of a lift mover).
780 		 
781          */
782         protected
783          boolean LiftExit =
784        	false;
785 	
786  		/**
787          * 
788 			If this point marks a lift exit (used to mark exit point of a lift mover).
789 		 
790          */
791         public  boolean isLiftExit()
792  	 {
793 				    					return LiftExit;
794 				    				}
795 				    			
796     	
797 	    /**
798          * 
799 			If this point is an AI marker - marks an interesting spot in the environment. May be ambush point or sniping spot, etc.
800 		 
801          */
802         protected
803          boolean AIMarker =
804        	false;
805 	
806  		/**
807          * 
808 			If this point is an AI marker - marks an interesting spot in the environment. May be ambush point or sniping spot, etc.
809 		 
810          */
811         public  boolean isAIMarker()
812  	 {
813 				    					return AIMarker;
814 				    				}
815 				    			
816     	
817 	    /**
818          * 
819 			If this point marks a jump spot (a special device that causes the bot to jump high or far).
820 		 
821          */
822         protected
823          boolean JumpSpot =
824        	false;
825 	
826  		/**
827          * 
828 			If this point marks a jump spot (a special device that causes the bot to jump high or far).
829 		 
830          */
831         public  boolean isJumpSpot()
832  	 {
833 				    					return JumpSpot;
834 				    				}
835 				    			
836     	
837 	    /**
838          * 
839 			If this point marks a jump pad (a special device that causes the bot to jump high or far).
840 		 
841          */
842         protected
843          boolean JumpPad =
844        	false;
845 	
846  		/**
847          * 
848 			If this point marks a jump pad (a special device that causes the bot to jump high or far).
849 		 
850          */
851         public  boolean isJumpPad()
852  	 {
853 				    					return JumpPad;
854 				    				}
855 				    			
856     	
857 	    /**
858          * 
859 			If this point marks a jump destination - some place that can be reached by some special jump.
860 		 
861          */
862         protected
863          boolean JumpDest =
864        	false;
865 	
866  		/**
867          * 
868 			If this point marks a jump destination - some place that can be reached by some special jump.
869 		 
870          */
871         public  boolean isJumpDest()
872  	 {
873 				    					return JumpDest;
874 				    				}
875 				    			
876     	
877 	    /**
878          * 
879 			If this point marks a teleport. 
880 		 
881          */
882         protected
883          boolean Teleporter =
884        	false;
885 	
886  		/**
887          * 
888 			If this point marks a teleport. 
889 		 
890          */
891         public  boolean isTeleporter()
892  	 {
893 				    					return Teleporter;
894 				    				}
895 				    			
896     	
897 	    /**
898          * 
899 			If the type is AIMarker. The rotation the bot should be
900 			facing, when doing the action specified by AIMarker. Sent only in HandShake.
901 		 
902          */
903         protected
904          Rotation Rotation =
905        	null;
906 	
907  		/**
908          * 
909 			If the type is AIMarker. The rotation the bot should be
910 			facing, when doing the action specified by AIMarker. Sent only in HandShake.
911 		 
912          */
913         public  Rotation getRotation()
914  	 {
915 				    					return Rotation;
916 				    				}
917 				    			
918     	
919 	    /**
920          * 
921 			Some ambush point, where is good chance to intercept
922 			approaching opponents. Sent only in HandShake.
923 		 
924          */
925         protected
926          boolean RoamingSpot =
927        	false;
928 	
929  		/**
930          * 
931 			Some ambush point, where is good chance to intercept
932 			approaching opponents. Sent only in HandShake.
933 		 
934          */
935         public  boolean isRoamingSpot()
936  	 {
937 				    					return RoamingSpot;
938 				    				}
939 				    			
940     	
941 	    /**
942          * Point good for sniping. Sent only in HandShake. 
943          */
944         protected
945          boolean SnipingSpot =
946        	false;
947 	
948  		/**
949          * Point good for sniping. Sent only in HandShake. 
950          */
951         public  boolean isSnipingSpot()
952  	 {
953 				    					return SnipingSpot;
954 				    				}
955 				    			
956     	
957 	    /**
958          * If item should be present at this navpoint it's instance will be here. 
959          */
960         protected
961          Item ItemInstance =
962        	null;
963 	
964  		/**
965          * If item should be present at this navpoint it's instance will be here. 
966          */
967         public  Item getItemInstance()
968  	 {
969 				    					return ItemInstance;
970 				    				}
971 				    			
972     	
973 	    /**
974          * Maps edge-LEADING_TO-navpoint-UnrealId to neighbour link, those are outgoing edges (those edges that originates in this navpoint going to another one, those you may usually travel). 
975          */
976         protected
977          Map<UnrealId, NavPointNeighbourLink> OutgoingEdges =
978        	new HashMap<UnrealId, NavPointNeighbourLink>();
979 	
980  		/**
981          * Maps edge-LEADING_TO-navpoint-UnrealId to neighbour link, those are outgoing edges (those edges that originates in this navpoint going to another one, those you may usually travel). 
982          */
983         public  Map<UnrealId, NavPointNeighbourLink> getOutgoingEdges()
984  	 {
985 				    					return OutgoingEdges;
986 				    				}
987 				    			
988     	
989 	    /**
990          * Maps edge-ORIGINATES_FROM-navpoint-UnrealId to neighbour link, those are incoming edges (those edges that originates in different navpoint and ends here, do not use this to ask whether you can get to navpoint of specific unreal id, use OutgoingEdges instead). 
991          */
992         protected
993          Map<UnrealId, NavPointNeighbourLink> IncomingEdges =
994        	new HashMap<UnrealId, NavPointNeighbourLink>();
995 	
996  		/**
997          * Maps edge-ORIGINATES_FROM-navpoint-UnrealId to neighbour link, those are incoming edges (those edges that originates in different navpoint and ends here, do not use this to ask whether you can get to navpoint of specific unreal id, use OutgoingEdges instead). 
998          */
999         public  Map<UnrealId, NavPointNeighbourLink> getIncomingEdges()
1000  	 {
1001 				    					return IncomingEdges;
1002 				    				}
1003 				    			
1004     	
1005 	    /**
1006          * 
1007 			Class of the weapon that should be prefered when using this
1008 			point for AIMarker specified action. Sent only in HandShake.
1009 		 
1010          */
1011         protected
1012          String PreferedWeapon =
1013        	null;
1014 	
1015  		/**
1016          * 
1017 			Class of the weapon that should be prefered when using this
1018 			point for AIMarker specified action. Sent only in HandShake.
1019 		 
1020          */
1021         public  String getPreferedWeapon()
1022  	 {
1023 				    					return PreferedWeapon;
1024 				    				}
1025 				    			
1026     	
1027     	
1028     	public static class NavPointStaticUpdate
1029      implements IStaticWorldObjectUpdatedEvent
1030 		{
1031 			
1032 			private NavPointStatic data;
1033 			private long time;
1034 			
1035 			public NavPointStaticUpdate
1036     (NavPointStatic source, long time)
1037 			{
1038 				this.data = source;
1039 				this.time = time;
1040 			}
1041 			
1042 			/**
1043 			 * Simulation time in MILLI SECONDS !!!
1044 			 */
1045 			@Override
1046 			public long getSimTime() {
1047 				return time;
1048 			}
1049 	
1050 			@Override
1051 			public WorldObjectId getId() {
1052 				return data.getId();
1053 			}
1054 			
1055 			@Override
1056 			public IWorldObjectUpdateResult<IStaticWorldObject> update(
1057 					IStaticWorldObject object) {
1058 				if ( object == null)
1059 				{
1060 					data = new NavPointStaticImpl(data);
1061 					return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IStaticWorldObject>(IWorldObjectUpdateResult.Result.CREATED, data);
1062 				}
1063 				//since static objects can't be updated, we'll just check that the object stays the same
1064 				if ( object instanceof NavPointStaticImpl)
1065 				{
1066 					NavPointStaticImpl orig = (NavPointStaticImpl)object;
1067 					//since these errors usually mean error in gamebots, we will just print an error message
1068 					if ( data.isDifferentFrom(orig) )
1069 					{
1070 						//data.isDifferentFrom(orig);
1071 						//throw new PogamutException("Trying to modify static object " + this.data.getId().toString() , this);
1072 						System.out.println("!!!!!ERROR!!!!!! in static object modification. Object class : NavPointStaticImpl to see which property was different see !!!!PROPERTY UPDATE ERROR!!!!");
1073 					}
1074 					return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IStaticWorldObject>(IWorldObjectUpdateResult.Result.SAME, data);
1075 				}				
1076 				throw new PogamutException("Unexpected object type for update, NavPointStaticImpl expected not class " + object.getClass().getSimpleName() + ".", this);
1077 			}
1078 		}
1079 	
1080     
1081  		
1082  		@Override
1083  		public boolean isDifferentFrom(IStaticWorldObject other)
1084  		{
1085  			if (other == null) //early fail
1086  			{
1087  				return true;
1088  			}
1089  			else if (other == this) //early out
1090  			{
1091  				return false;
1092  			}
1093  			else
1094  			{
1095  				NavPointStatic obj = (NavPointStatic) other;
1096 
1097  				
1098  						if ( !(
1099  	 			AdvancedEquals.equalsOrNull(this.getId()
1100  	, obj.getId()
1101  	)
1102  	 		) )
1103 						{
1104 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Id on object class NavPointStatic");
1105 							return true;
1106 						}
1107  					
1108  						if ( !(
1109  	 			AdvancedEquals.equalsOrNull(this.getItem()
1110  	, obj.getItem()
1111  	)
1112  	 		) )
1113 						{
1114 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Item on object class NavPointStatic");
1115 							return true;
1116 						}
1117  					
1118  						if ( !(
1119  	 			AdvancedEquals.equalsOrNull(this.getItemClass()
1120  	, obj.getItemClass()
1121  	)
1122  	 		) )
1123 						{
1124 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property ItemClass on object class NavPointStatic");
1125 							return true;
1126 						}
1127  					
1128  						if ( !(
1129  	 			AdvancedEquals.equalsOrNull(this.getMover()
1130  	, obj.getMover()
1131  	)
1132  	 		) )
1133 						{
1134 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Mover on object class NavPointStatic");
1135 							return true;
1136 						}
1137  					
1138  						if ( !(
1139  	 			AdvancedEquals.equalsOrNull(this.getLiftOffset()
1140  	, obj.getLiftOffset()
1141  	)
1142  	 		) )
1143 						{
1144 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property LiftOffset on object class NavPointStatic");
1145 							return true;
1146 						}
1147  					
1148  						if ( !(this.isLiftJumpExit()
1149  	
1150  	 			== obj.isLiftJumpExit()
1151  	) )
1152 						{
1153 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property LiftJumpExit on object class NavPointStatic");
1154 							return true;
1155 						}
1156  					
1157  						if ( !(this.isNoDoubleJump()
1158  	
1159  	 			== obj.isNoDoubleJump()
1160  	) )
1161 						{
1162 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property NoDoubleJump on object class NavPointStatic");
1163 							return true;
1164 						}
1165  					
1166  						if ( !(this.getTeamNumber()
1167  	
1168  	 			== obj.getTeamNumber()
1169  	) )
1170 						{
1171 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property TeamNumber on object class NavPointStatic");
1172 							return true;
1173 						}
1174  					
1175  						if ( !(this.isDomPoint()
1176  	
1177  	 			== obj.isDomPoint()
1178  	) )
1179 						{
1180 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property DomPoint on object class NavPointStatic");
1181 							return true;
1182 						}
1183  					
1184  						if ( !(this.getDomPointController()
1185  	
1186  	 			== obj.getDomPointController()
1187  	) )
1188 						{
1189 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property DomPointController on object class NavPointStatic");
1190 							return true;
1191 						}
1192  					
1193  						if ( !(this.isDoor()
1194  	
1195  	 			== obj.isDoor()
1196  	) )
1197 						{
1198 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Door on object class NavPointStatic");
1199 							return true;
1200 						}
1201  					
1202  						if ( !(this.isLiftCenter()
1203  	
1204  	 			== obj.isLiftCenter()
1205  	) )
1206 						{
1207 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property LiftCenter on object class NavPointStatic");
1208 							return true;
1209 						}
1210  					
1211  						if ( !(this.isLiftExit()
1212  	
1213  	 			== obj.isLiftExit()
1214  	) )
1215 						{
1216 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property LiftExit on object class NavPointStatic");
1217 							return true;
1218 						}
1219  					
1220  						if ( !(this.isAIMarker()
1221  	
1222  	 			== obj.isAIMarker()
1223  	) )
1224 						{
1225 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property AIMarker on object class NavPointStatic");
1226 							return true;
1227 						}
1228  					
1229  						if ( !(this.isJumpSpot()
1230  	
1231  	 			== obj.isJumpSpot()
1232  	) )
1233 						{
1234 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property JumpSpot on object class NavPointStatic");
1235 							return true;
1236 						}
1237  					
1238  						if ( !(this.isJumpPad()
1239  	
1240  	 			== obj.isJumpPad()
1241  	) )
1242 						{
1243 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property JumpPad on object class NavPointStatic");
1244 							return true;
1245 						}
1246  					
1247  						if ( !(this.isJumpDest()
1248  	
1249  	 			== obj.isJumpDest()
1250  	) )
1251 						{
1252 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property JumpDest on object class NavPointStatic");
1253 							return true;
1254 						}
1255  					
1256  						if ( !(this.isTeleporter()
1257  	
1258  	 			== obj.isTeleporter()
1259  	) )
1260 						{
1261 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Teleporter on object class NavPointStatic");
1262 							return true;
1263 						}
1264  					
1265  						if ( !(
1266  	 			AdvancedEquals.equalsOrNull(this.getRotation()
1267  	, obj.getRotation()
1268  	)
1269  	 		) )
1270 						{
1271 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Rotation on object class NavPointStatic");
1272 							return true;
1273 						}
1274  					
1275  						if ( !(this.isRoamingSpot()
1276  	
1277  	 			== obj.isRoamingSpot()
1278  	) )
1279 						{
1280 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property RoamingSpot on object class NavPointStatic");
1281 							return true;
1282 						}
1283  					
1284  						if ( !(this.isSnipingSpot()
1285  	
1286  	 			== obj.isSnipingSpot()
1287  	) )
1288 						{
1289 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property SnipingSpot on object class NavPointStatic");
1290 							return true;
1291 						}
1292  					
1293  						if ( !(
1294  	 			AdvancedEquals.equalsOrNull(this.getItemInstance()
1295  	, obj.getItemInstance()
1296  	)
1297  	 		) )
1298 						{
1299 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property ItemInstance on object class NavPointStatic");
1300 							return true;
1301 						}
1302  					
1303  						//Skipping outgoing and incoming edges tests because the navGraph is sent only once
1304  					
1305  						//Skipping outgoing and incoming edges tests because the navGraph is sent only once
1306  					
1307  						if ( !(
1308  	 			AdvancedEquals.equalsOrNull(this.getPreferedWeapon()
1309  	, obj.getPreferedWeapon()
1310  	)
1311  	 		) )
1312 						{
1313 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property PreferedWeapon on object class NavPointStatic");
1314 							return true;
1315 						}
1316  					
1317  			}
1318  			return false;
1319  		}
1320  	 
1321  		
1322  	    public String toString() {
1323             return
1324             	super.toString() + "[" +
1325             	
1326 		              			"Id = " + String.valueOf(getId()
1327  	) + " | " + 
1328 		              		
1329 		              			"Item = " + String.valueOf(getItem()
1330  	) + " | " + 
1331 		              		
1332 		              			"ItemClass = " + String.valueOf(getItemClass()
1333  	) + " | " + 
1334 		              		
1335 		              			"Mover = " + String.valueOf(getMover()
1336  	) + " | " + 
1337 		              		
1338 		              			"LiftOffset = " + String.valueOf(getLiftOffset()
1339  	) + " | " + 
1340 		              		
1341 		              			"LiftJumpExit = " + String.valueOf(isLiftJumpExit()
1342  	) + " | " + 
1343 		              		
1344 		              			"NoDoubleJump = " + String.valueOf(isNoDoubleJump()
1345  	) + " | " + 
1346 		              		
1347 		              			"TeamNumber = " + String.valueOf(getTeamNumber()
1348  	) + " | " + 
1349 		              		
1350 		              			"DomPoint = " + String.valueOf(isDomPoint()
1351  	) + " | " + 
1352 		              		
1353 		              			"DomPointController = " + String.valueOf(getDomPointController()
1354  	) + " | " + 
1355 		              		
1356 		              			"Door = " + String.valueOf(isDoor()
1357  	) + " | " + 
1358 		              		
1359 		              			"LiftCenter = " + String.valueOf(isLiftCenter()
1360  	) + " | " + 
1361 		              		
1362 		              			"LiftExit = " + String.valueOf(isLiftExit()
1363  	) + " | " + 
1364 		              		
1365 		              			"AIMarker = " + String.valueOf(isAIMarker()
1366  	) + " | " + 
1367 		              		
1368 		              			"JumpSpot = " + String.valueOf(isJumpSpot()
1369  	) + " | " + 
1370 		              		
1371 		              			"JumpPad = " + String.valueOf(isJumpPad()
1372  	) + " | " + 
1373 		              		
1374 		              			"JumpDest = " + String.valueOf(isJumpDest()
1375  	) + " | " + 
1376 		              		
1377 		              			"Teleporter = " + String.valueOf(isTeleporter()
1378  	) + " | " + 
1379 		              		
1380 		              			"Rotation = " + String.valueOf(getRotation()
1381  	) + " | " + 
1382 		              		
1383 		              			"RoamingSpot = " + String.valueOf(isRoamingSpot()
1384  	) + " | " + 
1385 		              		
1386 		              			"SnipingSpot = " + String.valueOf(isSnipingSpot()
1387  	) + " | " + 
1388 		              		
1389 		              			"PreferedWeapon = " + String.valueOf(getPreferedWeapon()
1390  	) + " | " + 
1391 		              		
1392 				"]";           		
1393         }
1394  	
1395  		
1396  		public String toHtmlString() {
1397  			return super.toString() + "[<br/>" +
1398             	
1399 		              			"<b>Id</b> = " + String.valueOf(getId()
1400  	) + " <br/> " + 
1401 		              		
1402 		              			"<b>Item</b> = " + String.valueOf(getItem()
1403  	) + " <br/> " + 
1404 		              		
1405 		              			"<b>ItemClass</b> = " + String.valueOf(getItemClass()
1406  	) + " <br/> " + 
1407 		              		
1408 		              			"<b>Mover</b> = " + String.valueOf(getMover()
1409  	) + " <br/> " + 
1410 		              		
1411 		              			"<b>LiftOffset</b> = " + String.valueOf(getLiftOffset()
1412  	) + " <br/> " + 
1413 		              		
1414 		              			"<b>LiftJumpExit</b> = " + String.valueOf(isLiftJumpExit()
1415  	) + " <br/> " + 
1416 		              		
1417 		              			"<b>NoDoubleJump</b> = " + String.valueOf(isNoDoubleJump()
1418  	) + " <br/> " + 
1419 		              		
1420 		              			"<b>TeamNumber</b> = " + String.valueOf(getTeamNumber()
1421  	) + " <br/> " + 
1422 		              		
1423 		              			"<b>DomPoint</b> = " + String.valueOf(isDomPoint()
1424  	) + " <br/> " + 
1425 		              		
1426 		              			"<b>DomPointController</b> = " + String.valueOf(getDomPointController()
1427  	) + " <br/> " + 
1428 		              		
1429 		              			"<b>Door</b> = " + String.valueOf(isDoor()
1430  	) + " <br/> " + 
1431 		              		
1432 		              			"<b>LiftCenter</b> = " + String.valueOf(isLiftCenter()
1433  	) + " <br/> " + 
1434 		              		
1435 		              			"<b>LiftExit</b> = " + String.valueOf(isLiftExit()
1436  	) + " <br/> " + 
1437 		              		
1438 		              			"<b>AIMarker</b> = " + String.valueOf(isAIMarker()
1439  	) + " <br/> " + 
1440 		              		
1441 		              			"<b>JumpSpot</b> = " + String.valueOf(isJumpSpot()
1442  	) + " <br/> " + 
1443 		              		
1444 		              			"<b>JumpPad</b> = " + String.valueOf(isJumpPad()
1445  	) + " <br/> " + 
1446 		              		
1447 		              			"<b>JumpDest</b> = " + String.valueOf(isJumpDest()
1448  	) + " <br/> " + 
1449 		              		
1450 		              			"<b>Teleporter</b> = " + String.valueOf(isTeleporter()
1451  	) + " <br/> " + 
1452 		              		
1453 		              			"<b>Rotation</b> = " + String.valueOf(getRotation()
1454  	) + " <br/> " + 
1455 		              		
1456 		              			"<b>RoamingSpot</b> = " + String.valueOf(isRoamingSpot()
1457  	) + " <br/> " + 
1458 		              		
1459 		              			"<b>SnipingSpot</b> = " + String.valueOf(isSnipingSpot()
1460  	) + " <br/> " + 
1461 		              		
1462 		              			"<b>PreferedWeapon</b> = " + String.valueOf(getPreferedWeapon()
1463  	) + " <br/> " + 
1464 		              		
1465 				"<br/>]";     
1466 		}
1467  	
1468  		
1469  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
1470         	
1471 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
1472 		
1473 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=static+classtype[@name=impl]) ---
1474 	                
1475          	  
1476          		    
1477          		    
1478          	            		   	
1479          	  
1480          		    
1481          		    
1482          	  
1483          	/**
1484 		     * DO NOT USE THIS METHOD! Reserved for GaviaLib (Pogamut core)! It's used
1485 		     * to set correct item instance into the NavPoint.
1486 		     */  	
1487 		    public void setItemInstance(Item item) {
1488 		        this.ItemInstance = item;
1489 		        if (item != null) {
1490 		        	this.Item = item.getId();
1491 		        }
1492 		    } 	
1493 		
1494 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=static+classtype[@name=impl]) ---        	            	
1495  	
1496 		}
1497