summaryrefslogtreecommitdiff
path: root/src/game-server/statuseffect.h
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11Converted Being into a ComponentErik Schilling1-2/+2
I did not really care too much about staying consistent with the use of static_casts to Actors since they are only temporary anyway until Actor is a component too.
2012-03-03Use callbacks for items, monsters and status effectsThorbjørn Lindeijer1-4/+4
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
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+46
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.