diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-13 19:38:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-13 19:38:32 +0300 |
commit | 24751878f50765a94319e55c7017be36e91756c6 (patch) | |
tree | f5035b28b1d30ae2b9d7f06ac6eb0327a4fe756f /src | |
parent | 71a596747c6f31c0cd010b6cc4522f8ed717d38b (diff) | |
download | plus-24751878f50765a94319e55c7017be36e91756c6.tar.gz plus-24751878f50765a94319e55c7017be36e91756c6.tar.bz2 plus-24751878f50765a94319e55c7017be36e91756c6.tar.xz plus-24751878f50765a94319e55c7017be36e91756c6.zip |
Improve skill error messages.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/skillhandler.cpp | 104 |
1 files changed, 50 insertions, 54 deletions
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index 03dce353b..64841c585 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -302,66 +302,62 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg) txt = info->errorText; else txt = strprintf(_("Unknown skill error: %d"), bskill); - txt.append(" "); - - switch (reason) - { - case RFAIL_SKILLDEP: - // TRANSLATORS: error message - txt.append(_("You have not yet reached a high enough lvl!")); - break; - case RFAIL_INSUFHP: - // TRANSLATORS: error message - txt.append(_("Insufficient HP!")); - break; - case RFAIL_INSUFSP: - // TRANSLATORS: error message - txt.append(_("Insufficient SP!")); - break; - case RFAIL_NOMEMO: - // TRANSLATORS: error message - txt.append(_("You have no memos!")); - break; - case RFAIL_SKILLDELAY: - // TRANSLATORS: error message - txt.append(_("You cannot do that right now!")); - break; - case RFAIL_ZENY: - // TRANSLATORS: error message - txt.append(_("Seems you need more money... ;-)")); - break; - case RFAIL_WEAPON: - // TRANSLATORS: error message - txt.append(_("You cannot use this skill with that " - "kind of weapon!")); - break; - case RFAIL_REDGEM: - // TRANSLATORS: error message - txt.append(_("You need another red gem!")); - break; - case RFAIL_BLUEGEM: - // TRANSLATORS: error message - txt.append(_("You need another blue gem!")); - break; - case RFAIL_OVERWEIGHT: - // TRANSLATORS: error message - txt.append(_("You're carrying to much to do this!")); - break; - default: - // TRANSLATORS: error message - txt.append(_("Huh? What's that?")); - logger->log("QQQ SMSG_SKILL_FAILED: reason " - + toString(reason)); - break; - } } else { SkillInfo *const info = skillDialog->getSkill(skillId); if (info) - txt = info->errorText; + txt = info->errorText + "."; else - txt = strprintf(_("Unknown skill error: %d"), skillId); + txt = strprintf(_("Unknown skill error: %d."), skillId); + } + + txt.append(" "); + switch (reason) + { + case RFAIL_SKILLDEP: + // TRANSLATORS: error message + txt.append(_("You have not yet reached a high enough lvl!")); + break; + case RFAIL_INSUFHP: + // TRANSLATORS: error message + txt.append(_("Insufficient HP!")); + break; + case RFAIL_INSUFSP: + // TRANSLATORS: error message + txt.append(_("Insufficient SP!")); + break; + case RFAIL_NOMEMO: + // TRANSLATORS: error message + txt.append(_("You have no memos!")); + break; + case RFAIL_SKILLDELAY: + // TRANSLATORS: error message + txt.append(_("You cannot do that right now!")); + break; + case RFAIL_ZENY: + // TRANSLATORS: error message + txt.append(_("Seems you need more money... ;-)")); + break; + case RFAIL_WEAPON: + // TRANSLATORS: error message + txt.append(_("You cannot use this skill with that " + "kind of weapon!")); + break; + case RFAIL_REDGEM: + // TRANSLATORS: error message + txt.append(_("You need another red gem!")); + break; + case RFAIL_BLUEGEM: + // TRANSLATORS: error message + txt.append(_("You need another blue gem!")); + break; + case RFAIL_OVERWEIGHT: + // TRANSLATORS: error message + txt.append(_("You're carrying to much to do this!")); + break; + default: + break; } NotifyManager::notify(NotifyTypes::SKILL_FAIL_MESSAGE, txt); |