Don't use Number, parseInt, etc. per coding conventions (use the +operator instead)

This was SVN commit r13192.
This commit is contained in:
historic_bruno 2013-02-24 00:25:13 +00:00
parent ca92e50048
commit 9e163500c5
2 changed files with 9 additions and 9 deletions

View File

@ -92,7 +92,7 @@ EntityGroups.prototype.rebuildGroup = function(renamed)
var toAdd = [];
for (var ent in oldGroup)
toAdd.push(renamed[ent] ? renamed[ent] : parseInt(ent));
toAdd.push(renamed[ent] ? renamed[ent] : +ent);
this.add(toAdd);
}
@ -129,7 +129,7 @@ EntityGroups.prototype.getEntsByName = function(templateName)
for (var ent in this.ents)
{
if (this.ents[ent] == templateName)
ents.push(parseInt(ent));
ents.push(+ent);
}
return ents;
@ -144,7 +144,7 @@ EntityGroups.prototype.getEntsByNameInverse = function(templateName)
for (var ent in this.ents)
{
if (this.ents[ent] != templateName)
ents.push(parseInt(ent));
ents.push(+ent);
}
return ents;

View File

@ -25,12 +25,12 @@ BattleDetection.prototype.Schema =
BattleDetection.prototype.Init = function()
{
// Load values from template.
this.interval = Number(this.template.TimerInterval);
this.recordLength = Number(this.template.RecordLength);
this.damageRateThreshold = Number(this.template.DamageRateThreshold);
this.alertnessBattleThreshold = Number(this.template.AlertnessBattleThreshold);
this.alertnessPeaceThreshold = Number(this.template.AlertnessPeaceThreshold);
this.alertnessMax = Number(this.template.AlertnessMax);
this.interval = +this.template.TimerInterval;
this.recordLength = +this.template.RecordLength;
this.damageRateThreshold = +this.template.DamageRateThreshold;
this.alertnessBattleThreshold = +this.template.AlertnessBattleThreshold;
this.alertnessPeaceThreshold = +this.template.AlertnessPeaceThreshold;
this.alertnessMax = +this.template.AlertnessMax;
// Initialize variables.
this.damage = 0; // Damage counter. Accumulative damage done over the current timer period.