Ticket #3799: 3799.3.diff
File 3799.3.diff, 1.2 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 targetUnitsClone[name] = this[name].targetUnits.slice(0); 225 222 226 if (this.IsGlobalAura(name)) 223 227 this.RemoveTemplateBonus(name); 224 228 225 229 this.RemoveBonus(name, this[name].targetUnits); 226 230 … … Auras.prototype.Clean = function() 256 260 this[name] = {}; 257 261 this[name].targetUnits = []; 258 262 var affectedPlayers = this.GetAffectedPlayers(name); 259 263 260 264 if (!affectedPlayers.length) 265 { 266 this.ApplyBonus(name, targetUnitsClone[name]); 261 267 continue; 268 } 262 269 263 270 if (!this.IsRangeAura(name)) 264 271 continue; 265 272 266 273 this[name].rangeQuery = cmpRangeManager.CreateActiveQuery(