diff options
Diffstat (limited to 'src/crskill.cc')
| -rw-r--r-- | src/crskill.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/crskill.cc b/src/crskill.cc index 092e701..27655a9 100644 --- a/src/crskill.cc +++ b/src/crskill.cc @@ -480,20 +480,13 @@ int TSkillProbe::GetExpForLevel(int Level){ return 0; } - // TODO(fusion): This part of the decompiled code was a bit weird. I had to - // look into the disassembly to figure the string parameter of `error` below - // and it is weird that we keep going even with invalid values of `FactorPercent`. int FactorPercent = this->FactorPercent; - if(FactorPercent < 1000){ - const char *MasterName = "---"; - if(this->Master != NULL){ - MasterName = this->Master->Name; - } - error("TSkillProbe::GetExpForLevel: Ungültiger FactorPercent-Wert %d bei %s.\n", FactorPercent, MasterName); - } - if(FactorPercent < 1050){ - error("TSkillProbe::GetExpForLevel: Ungültiger FactorPercent-Wert %d. Rechne mit 1000 weiter.\n", FactorPercent); + if(FactorPercent != 1000){ + const char *MasterName = (this->Master != NULL ? this->Master->Name : "---"); + error("TSkillProbe::GetExpForLevel: Ungültiger FactorPercent-Wert %d bei %s." + " Rechne mit 1000 weiter.\n", FactorPercent, MasterName); + } return (Level - this->Min) * this->Delta; } |
