summaryrefslogtreecommitdiff
path: root/src/game-server/statusmanager.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-04-29Single xml solutionPrzemysław Grzywacz1-62/+62
Mana-mantis: #506.
2013-02-21Removed loading of script files using the statusmanagerErik Schilling1-17/+1
They are now required via the main.lua. Also made Harmony giving you the plague in order to allow testing.
2012-03-03Use callbacks for items, monsters and status effectsThorbjørn Lindeijer1-6/+25
Previously, global function names were defined in the respective XML definitions of items, monsters and status effects. This was reasonable when they all had the same state, but now they're sharing the single global Lua state. Now the Lua API provides access to the ItemClass, MonsterClass and StatusEffect instances, on which callbacks for both standard and custom events can be explicitly set. Reviewed-by: Erik Schilling
2012-03-02Merged all the different Lua states into oneThorbjørn Lindeijer1-4/+5
No more Lua state for each status effect, monster, item effect or map. All scripts are loaded into the same state. This should be more efficient overall and make it easier to implement dynamic reloading of the scripts in the future. Now, this introduces the problem of name collisions between different Lua scripts. For now this is solved by using more specific function names, like 'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however to get rid of these globals, and register these callbacks from the script, so that they can be local functions without the danger of colliding with other scripts. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
2011-10-23Added function to determine the script engine by the file name extensionjurkan1-1/+3
Reviewed-by: Bjorn, Bertram.
2011-03-24Rely more on the functionality in XML::DocumentThorbjørn Lindeijer1-9/+3
By default XML::Document will use the ResourceManager to resolve the file name you pass to it. There is no point in disabling that functionality only to resolve it manually. Reviewed-by: Jared Adams
2011-03-17Micro-optimizations related to std::stringThorbjørn Lindeijer1-1/+1
* Rely on the fact that a std::string is empty by default * Use std::string::empty() rather than comparing to "" * Construct with std::string() rather than from "" Reviewed-by: Bertram
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-5/+5
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-3/+4
Also fixed a memleak when loading an invalid monster attack. Resolves: Mana-Mantis #215. Reviewed-by: Thorbjorn.
2010-08-22Some coding style tweaksThorbjørn Lindeijer1-1/+1
2010-07-09Added LUA script bindings for manipulating the specials available to a ↵Philipp Sehmisch1-4/+4
character. Added script call for getting the cost of a special (recharge only for now) Deleting specials works server-sided but the client isn't informed about it properly. Specials without recharge cost don't appear for the player. Both of these features require an additional netcode message. Reviewed-by: Freeyorp
2010-05-30Use XML::Document to automate memory cleanupThorbjørn Lindeijer1-23/+5
Makes the code a little nicer.
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-5/+9
Reviewed-by: Thorbjorn, Jaxad0127
2010-05-16Changed and split up the default location for loading dataThorbjørn Lindeijer1-4/+3
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-06Fixed name of the project in copyright headersThorbjørn Lindeijer1-7/+6
Also updated the headers to refer to the GPL by URL instead of suggesting to contact the FSF by snail mail, as per the latest GPL usage instructions.
2009-10-09Synced the protocol file with client in protocol.h, letting other defines in ↵Bertram1-1/+0
defines.h, and removing some overheading along the way.
2009-07-17Adds scripted status effectsChuck Miller1-0/+141