summaryrefslogtreecommitdiff
path: root/src/game-server/npc.h
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11Converted Being into a ComponentErik Schilling1-4/+4
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.
2013-04-11Converted the Character class into a componentErik Schilling1-5/+5
A CharacterData was created as a proxy class in order to allow using the old serialization method.
2013-03-25Changed NPC to an NpcComponent added to a BeingThorbjørn Lindeijer1-36/+47
2012-03-13Added script bind to set walkmask for beingsErik Schilling1-6/+0
TODO: Inform client about this change. Reviewed-by: bjorn.
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer1-11/+20
When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
2012-03-10Moved the managing of NPC script coroutines into C++Thorbjørn Lindeijer1-22/+5
Rather than wrapping NPC functions up in coroutines in the Lua side, they are now managed on the C++ side as "script threads", which are essentially the same thing. The main purpose is that the server can now know whether any of these long running script interactions are still active, which will probably be useful when adding the ability to reload scripts. Reviewed-by: Erik Schilling
2012-03-03Added further missing callbacksErik Schilling1-0/+25
Reviewed-by: bjorn.
2011-03-11Split path finding out of the Map classThorbjørn Lindeijer1-3/+2
Extracted the path finding algorithm out of the Map class and introduced a new class called PathInfo that has the path finding information that used to be part of MetaTile. This allows a single vector of path information to be shared between all maps running on the server, significantly reducing the memory overhead per map (for 200x200 maps, the memory reduction is about 1 MB per map). Part of this change is some cleanup, like moving the 'occupation' counts into MetaTile, inlining some methods for performance reasons, and using STL to simplify memory management. Mantis-issue: 106 Reviewed-by: Bertram
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+90
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.