summaryrefslogtreecommitdiff
path: root/src/game-server/skillmanager.h
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-02-17 12:24:45 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-08-26 22:56:47 +0200
commit44ee071d7ece5a2023f79307f36e8a244c9e7b3a (patch)
tree06b7fcea59bbbf1963b460ca9b678d0ea6fa90e4 /src/game-server/skillmanager.h
parente3a1e9c89e102dbf961c624435c495c759776312 (diff)
downloadmanaserv-44ee071d7ece5a2023f79307f36e8a244c9e7b3a.tar.gz
manaserv-44ee071d7ece5a2023f79307f36e8a244c9e7b3a.tar.bz2
manaserv-44ee071d7ece5a2023f79307f36e8a244c9e7b3a.tar.xz
manaserv-44ee071d7ece5a2023f79307f36e8a244c9e7b3a.zip
Removed skills
This removes support for skills. The plan is to allow to implement the skills as they were implemented before via attributes. This adds a lot more flexibility to the server creators while also removing the confusion about skills and attributes. So this change does: - Remove the skillmanager with all its calls, the skill xml file, etc - Move exp giving to the script engine: --> Allows to implement the old behaviour (and more) in the scripts - Remove the exp tag from the monster definition: + Since the server itself does not require it anymore it feels wrong to require it for EVERY monster. TODO: Add a system to add properties to the monsters/items.xml which allow defining things like the exp and allows to read the value from the script engine. + Small drawback, but it should not be hard to implement this property system. - Drop the level networking and calculation. + level calculation will happen via the attribute system later but i would prefer to do this in a seperate patch since this patch already got longer than expected especially since this requires to make setting correction points and available status points scriptable. + The level would be simply set as a attribute, the int number of it will be the level, the remaining digits will be the % number till the next levelup. - NOT remove any existing skill tables in the database update scripts. + There is no way to move them into the attribute table in a unified way (there are too many different way they could have been used). So server admins have to care about moving theirs skills to attributes themselves. + Keeping the old tables does not hurt for existing databases. So removing does not give any advantage/is required anyway. The now obsolote info about the EXP transaction is not removed for updated databases either. (The update script basically only bumps the version number without doing anything else. - bump the network protocol version --> old clients won't be able to connect. - bump the database version --> serveradmins need to update their db.
Diffstat (limited to 'src/game-server/skillmanager.h')
-rw-r--r--src/game-server/skillmanager.h103
1 files changed, 0 insertions, 103 deletions
diff --git a/src/game-server/skillmanager.h b/src/game-server/skillmanager.h
deleted file mode 100644
index 12828fe4..00000000
--- a/src/game-server/skillmanager.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * The Mana Server
- * Copyright (C) 2004-2010 The Mana World Development Team
- *
- * This file is part of The Mana Server.
- *
- * The Mana Server is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * The Mana Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Mana Server. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef SKILLMANAGER_H
-#define SKILLMANAGER_H
-
-#include "utils/string.h"
-#include "utils/xml.h"
-
-class SkillManager
-{
- public:
- SkillManager():
- mDefaultSkillId(0)
- {}
-
- ~SkillManager()
- { clear(); }
-
- /**
- * Loads skill reference file.
- */
- void initialize();
-
- /**
- * Reloads skill reference file.
- */
- void reload();
-
- /**
- * Gets the skill Id from a set and a skill string.
- */
- unsigned getId(const std::string &set, const std::string &name) const;
-
- /**
- * Gets the skill Id from a string formatted in this way:
- * "setname_skillname"
- */
- unsigned getId(const std::string &skillName) const;
-
- const std::string getSkillName(unsigned id) const;
- const std::string getSetName(unsigned id) const;
-
- bool exists(unsigned id) const;
-
- unsigned getDefaultSkillId() const
- { return mDefaultSkillId; }
-
- void readSkillSetNode(xmlNodePtr node, const std::string &filename);
-
- void checkStatus();
-
- private:
- struct SkillInfo {
- SkillInfo():
- id(0)
- {}
-
- unsigned id;
- std::string setName;
- std::string skillName;
- };
-
- /*
- * Clears up the skill maps.
- */
- void clear();
-
- void printDebugSkillTable();
-
- void readSkillNode(xmlNodePtr skillNode, const std::string& setName);
-
- // The skill map
- typedef std::map<unsigned, SkillInfo*> SkillsInfo;
- SkillsInfo mSkillsInfo;
- // A map used to get skills per name.
- utils::NameMap<SkillInfo*> mNamedSkillsInfo;
-
- // The default skill id
- unsigned mDefaultSkillId;
-};
-
-extern SkillManager *skillManager;
-
-#endif // SKILLMANAGER_H