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