diff options
author | David Athay <ko2fan@gmail.com> | 2008-04-28 17:30:00 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-04-28 17:30:00 +0000 |
commit | 38d84edf098551793b78b845156e7de240d0d8b0 (patch) | |
tree | af4d295e7c0c1c220ebf863d27694318d9081935 /src/localplayer.cpp | |
parent | 5bbb89e2dbcafb80f33030ba2ffef6d2515b9209 (diff) | |
download | mana-38d84edf098551793b78b845156e7de240d0d8b0.tar.gz mana-38d84edf098551793b78b845156e7de240d0d8b0.tar.bz2 mana-38d84edf098551793b78b845156e7de240d0d8b0.tar.xz mana-38d84edf098551793b78b845156e7de240d0d8b0.zip |
Skills patch by roderic, mantis id=209
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 1e61e59d..5bf6ec0e 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -421,24 +421,24 @@ void LocalPlayer::lowerAttribute(size_t attr) Net::GameServer::Player::lowerAttribute(attr + CHAR_ATTR_BEGIN); } -const std::string& LocalPlayer::getSkillName(int skill) +const struct LocalPlayer::skillInfo& LocalPlayer::getSkillInfo(int skill) { - static const std::string skills[CHAR_SKILL_NB + 1] = + static const skillInfo skills[CHAR_SKILL_NB + 1] = { - _("Unarmed"), // CHAR_SKILL_WEAPON_NONE - _("Knife"), // CHAR_SKILL_WEAPON_KNIFE - _("Sword"), // CHAR_SKILL_WEAPON_SWORD - _("Polearm"), // CHAR_SKILL_WEAPON_POLEARM - _("Staff"), // CHAR_SKILL_WEAPON_STAFF - _("Whip"), // CHAR_SKILL_WEAPON_WHIP - _("Bow"), // CHAR_SKILL_WEAPON_BOW - _("Shooting"), // CHAR_SKILL_WEAPON_SHOOTING - _("Mace"), // CHAR_SKILL_WEAPON_MACE - _("Axe"), // CHAR_SKILL_WEAPON_AXE - _("Thrown"), // CHAR_SKILL_WEAPON_THROWN - _("Magic"), // CHAR_SKILL_MAGIC_IAMJUSTAPLACEHOLDER - _("Craft"), // CHAR_SKILL_CRAFT_IAMJUSTAPLACEHOLDER - _("Unknown Skill") + { _("Unarmed"), "graphics/gui/unarmed.png" }, // CHAR_SKILL_WEAPON_NONE + { _("Knife"), "graphics/gui/knife.png" }, // CHAR_SKILL_WEAPON_KNIFE + { _("Sword"), "graphics/gui/sword.png" }, // CHAR_SKILL_WEAPON_SWORD + { _("Polearm"), "graphics/gui/polearm.png" }, // CHAR_SKILL_WEAPON_POLEARM + { _("Staff"), "graphics/gui/staff.png" }, // CHAR_SKILL_WEAPON_STAFF + { _("Whip"), "graphics/gui/whip.png" }, // CHAR_SKILL_WEAPON_WHIP + { _("Bow"), "graphics/gui/bow.png" }, // CHAR_SKILL_WEAPON_BOW + { _("Shooting"), "graphics/gui/shooting.png" }, // CHAR_SKILL_WEAPON_SHOOTING + { _("Mace"), "graphics/gui/mace.png" }, // CHAR_SKILL_WEAPON_MACE + { _("Axe"), "graphics/gui/axe.png" }, // CHAR_SKILL_WEAPON_AXE + { _("Thrown"), "graphics/gui/thrown.png" }, // CHAR_SKILL_WEAPON_THROWN + { _("Magic"), "graphics/gui/magic.png " }, // CHAR_SKILL_MAGIC_IAMJUSTAPLACEHOLDER + { _("Craft"), "graphics/gui/craft.png" }, // CHAR_SKILL_CRAFT_IAMJUSTAPLACEHOLDER + { _("Unknown Skill"), "graphics/gui/unknown-item.png" } }; if ((skill < 0) || (skill > CHAR_SKILL_NB)) @@ -457,7 +457,7 @@ void LocalPlayer::setExperience(int skill, int current, int next) int diff = current - mExpCurrent.at(skill); if (mMap && mExpCurrent.at(skill) != -1 && diff > 0) { - const std::string text = toString(diff) + " " + getSkillName(skill) + " xp"; + const std::string text = toString(diff) + " " + getSkillInfo(skill).name + " xp"; mExpMessages.push_back(text); } |