diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-02 18:57:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-02 18:57:10 +0300 |
commit | f1e92aca00a4859047e83fab76220767b9a2f814 (patch) | |
tree | 8aaa9d6853c6a8e0e8fc568c6f981cbd889b0cc3 /src/spellmanager.cpp | |
parent | 70b520b1e876f9698bb95baa2d274ea289a0c6bd (diff) | |
parent | 99771a1fb50286fdb0b511f425312503e657eddc (diff) | |
download | mv-stripped1.1.10.2.tar.gz mv-stripped1.1.10.2.tar.bz2 mv-stripped1.1.10.2.tar.xz mv-stripped1.1.10.2.zip |
Merge branch 'master' into strippedstripped1.1.10.2
Conflicts:
packaging/debian/watch
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 895ac94f2..9f7aaaa8b 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -68,31 +68,31 @@ void SpellManager::fillSpells() { //id, std::string name, std::string symbol, ST type, int basicLvl, MagicSchool school, int schoolLvl, int mana) - addSpell(new TextCommand(0, "lum", "#lum", ALLOWTARGET, - "", 1, SKILL_MAGIC_LIFE, 0, 6)); - addSpell(new TextCommand(1, "inm", "#inma", NEEDTARGET, + addSpell(new TextCommand(0, "lum", "#lum", "heal with lifestones", + ALLOWTARGET, "", 1, SKILL_MAGIC_LIFE, 0, 6)); + addSpell(new TextCommand(1, "inm", "#inma", "heal", NEEDTARGET, "", 2, SKILL_MAGIC_LIFE, 2, 10)); - addSpell(new TextCommand(2, "fla", "#flar", NOTARGET, + addSpell(new TextCommand(2, "fla", "#flar", "", NOTARGET, "", 1, SKILL_MAGIC_WAR, 0, 10)); - addSpell(new TextCommand(3, "chi", "#chiza", NOTARGET, + addSpell(new TextCommand(3, "chi", "#chiza", "", NOTARGET, "", 1, SKILL_MAGIC_WAR, 0, 9)); - addSpell(new TextCommand(4, "ing", "#ingrav", NOTARGET, + addSpell(new TextCommand(4, "ing", "#ingrav", "", NOTARGET, "", 2, SKILL_MAGIC_WAR, 2, 20)); - addSpell(new TextCommand(5, "fri", "#frillyar", NOTARGET, + addSpell(new TextCommand(5, "fri", "#frillyar", "", NOTARGET, "", 2, SKILL_MAGIC_WAR, 2, 25)); - addSpell(new TextCommand(6, "upm", "#upmarmu", NOTARGET, + addSpell(new TextCommand(6, "upm", "#upmarmu", "", NOTARGET, "", 2, SKILL_MAGIC_WAR, 2, 20)); - addSpell(new TextCommand(7, "ite", "#itenplz", NOTARGET, + addSpell(new TextCommand(7, "ite", "#itenplz", "", NOTARGET, "", 1, SKILL_MAGIC_NATURE, 0, 3)); - addSpell(new TextCommand(8, "bet", "#betsanc", ALLOWTARGET, + addSpell(new TextCommand(8, "bet", "#betsanc", "", ALLOWTARGET, "", 2, SKILL_MAGIC_NATURE, 2, 14)); - addSpell(new TextCommand(9, "abi", "#abizit", NOTARGET, + addSpell(new TextCommand(9, "abi", "#abizit", "", NOTARGET, "", 1, SKILL_MAGIC, 0, 1)); - addSpell(new TextCommand(10, "inw", "#inwilt", NOTARGET, + addSpell(new TextCommand(10, "inw", "#inwilt", "", NOTARGET, "", 2, SKILL_MAGIC, 2, 7)); - addSpell(new TextCommand(11, "hi", "hi", NOTARGET, "")); - addSpell(new TextCommand(12, "hea", "heal", NOTARGET, "")); - addSpell(new TextCommand(13, "@sp", "@spawn maggot 10", NOTARGET, "")); + addSpell(new TextCommand(11, "hi", "hi", "", NOTARGET, "")); + addSpell(new TextCommand(12, "hea", "heal", "", NOTARGET, "")); + addSpell(new TextCommand(13, "@sp", "@spawn maggot 10", "", NOTARGET, "")); for (int f = 12; f < SPELL_SHORTCUT_ITEMS * SPELL_SHORTCUT_TABS; f++) addSpell(new TextCommand(f)); } @@ -269,6 +269,8 @@ void SpellManager::load(bool oldConfig) std::string cmd = cfg->getValue("commandShortcutCmd" + toString(i), ""); + std::string comment = cfg->getValue("commandShortcutComment" + + toString(i), ""); std::string symbol = cfg->getValue("commandShortcutSymbol" + toString(i), ""); std::string icon = cfg->getValue("commandShortcutIcon" @@ -276,13 +278,13 @@ void SpellManager::load(bool oldConfig) if (static_cast<TextCommandType>(commandType) == TEXT_COMMAND_MAGIC) { - addSpell(new TextCommand(i, symbol, cmd, + addSpell(new TextCommand(i, symbol, cmd, comment, static_cast<SpellTarget>(targetType), icon, basicLvl, static_cast<MagicSchool>(school), schoolLvl, mana)); } else { - addSpell(new TextCommand(i, symbol, cmd, + addSpell(new TextCommand(i, symbol, cmd, comment, static_cast<SpellTarget>(targetType), icon)); } } @@ -304,6 +306,15 @@ void SpellManager::save() { serverConfig.deleteKey("commandShortcutCmd" + toString(i)); } + if (spell->getComment() != "") + { + serverConfig.setValue("commandShortcutComment" + toString(i), + spell->getComment()); + } + else + { + serverConfig.deleteKey("commandShortcutComment" + toString(i)); + } if (spell->getSymbol() != "") { serverConfig.setValue("commandShortcutSymbol" + toString(i), |