Ticket #3799: 3799.diff
File 3799.diff, 1.3 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/simulation/components/Auras.js
Auras.prototype.IsGlobalAura = function( 215 215 */ 216 216 Auras.prototype.Clean = function() 217 217 { 218 218 var cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); 219 219 var auraNames = this.GetAuraNames(); 220 let targetUnitsClone = {}; 220 221 // remove all bonuses 221 222 for (let name of auraNames) 222 223 { 224 targetUnitsClone[name] = []; 223 225 if (!this[name]) 224 226 continue; 225 227 228 targetUnitsClone[name] = this[name].targetUnits.slice(0); 226 229 if (this.IsGlobalAura(name)) 227 230 this.RemoveTemplateBonus(name); 228 231 229 232 this.RemoveBonus(name, this[name].targetUnits); 230 233 … … Auras.prototype.Clean = function() 262 265 var affectedPlayers = this.GetAffectedPlayers(name); 263 266 264 267 if (!affectedPlayers.length) 265 268 continue; 266 269 267 if ( !this.IsRangeAura(name))268 continue;270 if (this.IsGarrisonedUnitsAura(name) || this.IsGarrisonAura(name) || this.IsFormationAura(name)) 271 this.ApplyBonus(name, targetUnitsClone[name]); 269 272 270 273 this[name].rangeQuery = cmpRangeManager.CreateActiveQuery( 271 274 this.entity, 272 275 0, 273 276 this.GetRange(name),