the ada refactor/java virus can mean a player owns resonators of a higher level than himself. make sure we don't end up with negative values in this case
fix #322
This commit is contained in:
parent
5c9fdc6f61
commit
895671d860
@ -79,10 +79,13 @@ window.getAttackApGain = function(d) {
|
||||
if(!reso)
|
||||
return true;
|
||||
resoCount += 1;
|
||||
var reslevel=parseInt(reso.level);
|
||||
if(reso.ownerGuid === PLAYER.guid) {
|
||||
maxResonators[parseInt(reso.level)] -= 1;
|
||||
if(maxResonators[reslevel] > 0) {
|
||||
maxResonators[reslevel] -= 1;
|
||||
}
|
||||
} else {
|
||||
curResonators[parseInt(reso.level)] += 1;
|
||||
curResonators[reslevel] += 1;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user