summaryrefslogtreecommitdiff
path: root/src/game-server/skillmanager.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-04-29Single xml solutionPrzemysław Grzywacz1-25/+28
Mana-mantis: #506.
2013-04-02Fixed multiple warnings and errors that blocked c++0xErik Schilling1-2/+1
This allows the server to compile with c++0x (and enables it). This also includes some coding style / readabillity fixes.
2013-01-09Replaced 'unsigned int' with 'unsigned'Thorbjørn Lindeijer1-3/+3
Same thing, but shorter.
2013-01-08Work on (Auto)Attack system.Erik Schilling1-3/+9
During the implementation bjorn and I agreed to limit the number of attacks that can be used in the same tick to one. This makes a lot of stuff easier and the client cannot display two frames at the same time Things done: - Implemented setting of attacks when equipping/unequipping items - Single place where the xml attack node is parsed - Finished attack logic - Unified the attack handling of monsters and characters - Added a global cooldown after attack use (not only for next use of same attack) - Removed the temponary attributes for the monster attack values - Priorities for all attacks - Rewrote the attack core: - Attacks now have this attributes: - warmup -> time a attack needs after starting it to actually deal the damage - cooldown -> time a attack needs after dealing damage before another attack can be used - reuse -> time before the same attack can be used again - If no attack is performed at the moment the following is done: - make a list with all ready attacks - check for attack that has the necessarily range and highest priority - start this attack (inform client about it) - when warmup is finished -> trigger damage - when cooldown is finished -> allow to use other (or the same if reusetimer allows) attacks TODO: - sync client with this to allow better timed animations
2012-03-17Made skill related function capable of taking the skill name as parameterErik Schilling1-3/+8
Reviewed-by: bjorn.
2011-10-20Return a const & from NameMap to avoid potential deep copiesThorbjørn Lindeijer1-1/+1
When I introduced NameMap it was only used with pointers, but now it is also used with std::string so it probably makes sense to keep a default- constructed value around so that a reference can be returned rather than a copy. NameMap::find was renamed to NameMap::value to make it more clear that it doesn't return an iterator, like std::map::find. Reviewed-by: Yohann Ferreira Reviewed-by: Ben Longbons
2011-09-28Rewrote the skill manager the same way as the item manager.Yohann Ferreira1-121/+117
This will permit better handling of both skills names and id. This is needed to start reworking on the auto-attack system.
2011-09-28Turned the skill manager into a class.Yohann Ferreira1-3/+2
Ack-by: o11c.
2011-03-23Fixed problems with loading XML files containing Windows newlinesThorbjørn Lindeijer1-30/+10
By using xmlParseFile instead of xmlParseMemory, the system-dependent newlines should be handled automatically. The .tmx.gz files should still be supported, but instead of manually decompressing them the xmlParseFile function should take care of that. It also fixes the leaking of XML documents in both the SkillManager as well as the PermissionManager, since they now rely on XML::Document, which cleans up automatically. Reviewed-by: Stefan Dombrowski
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-4/+4
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-10-22Made the servers check for positive id in xml db loading.Yohann Ferreira1-1/+1
Also fixed a memleak when loading an invalid monster attack. Resolves: Mana-Mantis #215. Reviewed-by: Thorbjorn.
2010-09-08Centralized stringToBool conversion.Yohann Ferreira1-4/+4
Also moved the trim() function into the utils namespace where it belongs more, and made some random code cleanups. Reviewed-by: Thorbjorn.
2010-07-22Upgraded Skill Map loading.Yohann Ferreira1-14/+106
- Added a new 'default' boolean parameter in mana-skills.xml. If set to true, unknown weapon types will be defaulted to the given value. - Added better checks on skill id and names and improved error reporting. - Corrected minor typos, and made small cleanups. Reviewed-by: jaxad0127
2010-05-29Use const std::string & to avoid a copyThorbjørn Lindeijer1-5/+4
2010-05-29Only skip the UTF-8 BOM for Lua scriptsThorbjørn Lindeijer1-2/+1
libxml2 should be able to handle files with a BOM fine. Reviewed-by: Bertram
2010-05-28Added some more log infos, and made small cleanups.Yohann Ferreira1-4/+6
Reviewed-by: Thorbjorn, Jaxad0127
2010-05-16Changed and split up the default location for loading dataThorbjørn Lindeijer1-1/+1
Instead of loading data from a 'data' directory in the current working directory, the server now uses clientDataPath and serverDataPath as specified in the configuration. This removes the need to set up symbolic links in order to merge these two types of data. The default values point to example/clientdata and example/serverdata, where a minimal example world can be developed to make setting up an initial server quick and easy. The XML::Document convenience class was copied over from the client. Also, the ResourceManager is now shared between both servers, since the account client is reading items.xml. Reviewed-by: Jared Adams
2010-04-25Added a Byte Order Mask (BOM) filter to the ResourceManager.Bertram1-1/+2
Reviewed by: Jaxad0127
2010-02-07Update Copyright date for Manaserv.Bertram1-1/+1
2009-12-28Added parser for mana-skills.xmlPhilipp Sehmisch1-1/+60
2009-12-28Added support for skill names as weapon types in items.xml (still hardcoded)Philipp Sehmisch1-0/+61