summaryrefslogtreecommitdiffstats
path: root/src/game-server/npc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Removed NPC and character parameters from NPC functionsThorbjørn Lindeijer2013-04-141-0/+2
| | | | | | | | These functions can only be used in the context of a character talking to an NPC, so these parameters can be deduced from that context rather than passing them explicitly all the time. Simplifies NPC scripting.
* Removed static member definitions that are no longer neededThorbjørn Lindeijer2013-04-121-2/+0
| | | | | | | | | The requirement for having these definitions was relaxed in the C++11 standard. In short, they are not needed anymore for static const integral types. Details: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#454
* Moved Actor into an ComponentErik Schilling2013-04-121-2/+3
| | | | This was the final step to remove the hierachy with Entity on the top.
* Converted Being into a ComponentErik Schilling2013-04-111-6/+6
| | | | | | 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.
* Converted the Character class into a componentErik Schilling2013-04-111-10/+12
| | | | | A CharacterData was created as a proxy class in order to allow using the old serialization method.
* Changed NPC to an NpcComponent added to a BeingThorbjørn Lindeijer2013-03-251-70/+53
|
* Introduced Script::ContextErik Schilling2013-02-211-4/+2
| | | | | | | | This should allow to finally call functions to lua without having to care about working around situations where a lua call causes a c++ call which needs to call to lua again. Tested against the source of tales repository data.
* Fixed setting current map for npc update functionErik Schilling2013-01-151-0/+2
|
* Added script bind to set walkmask for beingsErik Schilling2012-03-131-0/+3
| | | | | | TODO: Inform client about this change. Reviewed-by: bjorn.
* Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer2012-03-111-17/+29
| | | | | | | | | | | | 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
* Moved the managing of NPC script coroutines into C++Thorbjørn Lindeijer2012-03-101-37/+69
| | | | | | | | | | | | 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
* Added further missing callbacksErik Schilling2012-03-031-10/+23
| | | | Reviewed-by: bjorn.
* Renamed .hpp files into .h for consistency.Yohann Ferreira2010-11-141-3/+3
| | | | | | Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
* Update Copyright date for Manaserv.Bertram2010-02-071-1/+1
|
* Fixed name of the project in copyright headersThorbjørn Lindeijer2009-12-061-13/+13
| | | | | | 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.
* Fixed name of method (recepted -> received)Bjørn Lindeijer2009-05-241-2/+2
|
* tmwserv NPC String inputBlue2009-05-011-2/+17
| | | | Adding support for npc string input.
* Mysql backend, lua and NPC handlerBlue2009-05-011-0/+4
| | | | | Fix for mysql backend (again) Lua modification for integer and string ask with NPC, and closing fix.
* Merged MovingObject into the Being classBjørn Lindeijer2009-04-261-1/+4
| | | | | | Also renamed Object to Actor, to make it sound a little less generic. Cleans up a bit the rather big hierarchy of different object types we have.
* Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer2008-11-161-2/+0
|
* Added enabling and disabling NPCs.David Athay2008-10-221-4/+9
|
* Implemented NPC names. Implemented the theoretical possibility to have named ↵Philipp Sehmisch2008-05-191-1/+2
| | | | monsters along the way. Note that the syntax of the LUA functions for creating NPCs has changed.
* Converted NPC class to scripting engine.Guillaume Melquiond2007-08-091-0/+58