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