Changes between Initial Version and Version 1 of Ticket #2154, comment 32
- Timestamp:
- Nov 28, 2013, 11:42:20 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2154, comment 32
initial v1 1 1 Line 683 of UnitAI can set the target to undefined, and this can cause some warnings. The if-else structure should be different, as the setting of the target may not be executed after this.FinishOrder is called. 2 3 I think the following works better: 4 {{{ 5 this.alertRaiser = this.order.data.raiser; 6 7 // Find a target to garrison into, if we don't already have one 8 if(!this.alertGarrisoningTarget) 9 this.alertGarrisoningTarget = this.FindNearbyGarrisonHolder(); 10 11 if (this.alertGarrisoningTarget) 12 this.ReplaceOrder("Garrison", {"target": this.alertGarrisoningTarget}); 13 }}}