summaryrefslogtreecommitdiff
path: root/src/game-server/mapcomposite.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-08-26[Abilities] Removed the old autoattack systemErik Schilling1-8/+0
As a side effect i had to remove the monster attack AI for now. I will readd this as next thing.
2013-05-10Partial rewrite and improvements of Warp objectPrzemysław Grzywacz1-30/+103
2013-04-27Use nullptr instead of NULL everywhereErik Schilling1-3/+3
2013-04-12Moved Actor into an ComponentErik Schilling1-29/+34
This was the final step to remove the hierachy with Entity on the top.
2013-04-11Converted Being into a ComponentErik Schilling1-17/+19
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-2/+2
A CharacterData was created as a proxy class in order to allow using the old serialization method.
2013-04-02Fixed multiple warnings and errors that blocked c++0xErik Schilling1-1/+2
This allows the server to compile with c++0x (and enables it). This also includes some coding style / readabillity fixes.
2013-04-02Moved fighting code into a componentErik Schilling1-2/+3
All damage dealing is now handeled via CombatComponent. Monsters use a derived MonsterCombatComponent since they can have a damage mutation and have a seperate script callback. The wirering with Being is still not optional since most of the stuff does not exist as components. Things done: - Seperated the fighting code from Being and only let Characters and Monsters add the Component (less overhead for npcs) - Added a getter for Attribute values to prevent searching it all the time in non Being members - Fixed the type if the damage mutation to double (no idea why it was int) I did not want to copy it over incorrectly - Removed the addAttack/removeAttack overrides in Character and made the knuckleAttack being added based on newly added signals Future TODOS: - Remove depedency on Being as soon all needed dependencies are available as components of Entity - Move the monster script callback into the general combatcomponent and make it usuable for characters too
2013-03-25Changed SpawnArea and TriggerArea to components of EntityThorbjørn Lindeijer1-7/+15
Well, first visible change is that everything just gets longer to read. Reviewed-by: Yohann Ferreira
2013-02-21Introduced Script::ContextErik Schilling1-11/+8
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.
2013-02-01Silenced to Wreorder warnings.Yohann Ferreira1-2/+2
2013-01-29Silenced some eclipse warningsErik Schilling1-0/+3
2012-09-22Extended warnings for parsing warpsErik Schilling1-1/+1
Reviewed-by: bjorn.
2012-09-22Fixed marking map as activatedErik Schilling1-19/+36
The patch that allowed to use map objects as warp targets broke this. During run of map initalize mActive was still false. This broke creating objects (npc, triggers) in atinit. Reviewed-by: bjorn.
2012-09-02Allow map objects as warp targetsErik Schilling1-13/+50
This patch allows map objects as warp targets. For use: - Create object in tiled with type="WARP_DEST" - Set name to anything you want - Create usual WARP object - Leave out the DEST_{X,Y} part - Add DEST_NAME property with the name of the first object This requires the game server to parse all maps at startup. Change is tested. Reviewed-by: bjorn.
2012-09-02Dropped .gz suffix for mapsErik Schilling1-2/+0
Reviewed-by: bjorn.
2012-08-05Fixed the atinit functionErik Schilling1-0/+2
Previously each map had its own scope. They got merged now but the atinit function was forgotten to adapt. Reviewed-by: bjorn.
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-13/+13
In preparation for using an entity/component system for the entities in the game world, this name will be more recognizable and easier to talk about. Reviewed-by: Yohann Ferreira
2012-03-26Some general cleanups and merged Being::perform() into update()Thorbjørn Lindeijer1-6/+0
The main change here is to remove the separate calling of 'perform' on all beings, and rather rely on the beings to do whatever they were doing in that function when the virtual 'update' function is called. Reviewed-by: Yohann Ferreira
2012-03-17Added map update function, moved schedules there to keep map contextErik Schilling1-0/+30
Reviewed-by: bjorn.
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer1-0/+2
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-11Added callbacks for map/worldvar changesErik Schilling1-0/+35
Reviewed-by: bjorn.
2012-03-03Added further missing callbacksErik Schilling1-4/+13
Reviewed-by: bjorn.
2012-03-02Merged all the different Lua states into oneThorbjørn Lindeijer1-45/+12
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-11-07Merged three global script states into oneThorbjørn Lindeijer1-2/+2
These scripts could trivially share one script state, since the methods called on them from the server are not overlapping. This does leave them open to access each other's global variables, but that's the problem with global variables. The one remaining global script file name is now configurable, so that it may also be set to a script in a different scripting language. The two related script options are: script_mainFile (default: scripts/main.lua) script_defaultEngine (default: lua) - renamed from defaultScriptEngine Reviewed-by: jurkan Reviewed-by: Yohann Ferreira
2011-10-23Added function to determine the script engine by the file name extensionjurkan1-8/+31
Reviewed-by: Bjorn, Bertram.
2011-10-19Took interpreting the objects out of the map readerThorbjørn Lindeijer1-27/+180
The map reader is now only concerned with parsing the XML, whereas the MapComposite turns some of the objects into Warps, Spawns and NPCs. Reviewed-by: Yohann Ferreira
2011-03-17Micro-optimizations related to std::stringThorbjørn Lindeijer1-2/+2
* 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
2011-03-06Small fixes coming from my comment on issue #77.Yohann Ferreira1-6/+6
Trivial.
2011-03-04Implemented persistent world and map variablesPhilipp Sehmisch1-0/+26
The gameserver now receive a copy of all world state variables when they are accepted by the accountserver and receive a copy of all map state variables of a map when they register it successfully. Implemented LUA script bindings for getting and setting these variables. When such a variable is set, the accountserver is notified about this change. Changes to world state variables are then propagated to all gameservers by the accountserver. Be aware that when a gameserver is updating a map, there is no check if it is actually responsible for said map. But I consider this not a security flaw, because authenticated game servers are considered to be trustworthy in a lot of other situations, too. Also renamed "quest" to "character variable" in the sourcecode. Reviewed-by: Bertram
2011-01-09Removed the superfluous point struct.Yohann Ferreira1-1/+1
It was too close from the Position class and it leads to making the server handle one or another type through the code. Still bugged me many times while making changes. Reviewed-by: Jaxad.
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-17Dehardcode the tileWidth and height, except for the speed conversion.Yohann Ferreira1-2/+4
The speed conversion needs a standard tile length anyway and can be improved later once the movement code will start to handle beings size. Reviewed-by: Crush.
2010-09-15Reordered the manaserv.xml.example file and made related code cleanups.Yohann Ferreira1-6/+6
Reviewed-by: Thorbjorn.
2010-04-02Remove empty LOG print when deallocatingChuck Miller1-2/+0
2010-03-30Remove unneed debug outputChuck Miller1-1/+0
The issue this output was created to help debug has long been fixed
2010-02-23Removed some unnecessary log messagesPhilipp Sehmisch1-2/+2
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-07-10Prevent Actors from getting ID 0Jared Adams1-0/+1
Causes client problems.
2009-05-29Fixes crashes that sometimes happens when allocate and deallocating from map ↵Chuck Miller1-29/+29
buckets
2009-05-20Fix crash caused by non-removal of target.David Athay1-12/+17
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer1-13/+17
Same as for the client.
2009-04-26Merged MovingObject into the Being classBjørn Lindeijer1-28/+28
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.
2009-03-30Merge branch 'master' of git@gitorious.org:tmwserv/mainlineDavid Athay1-0/+9
2009-03-30Added debuggingDavid Athay1-0/+7
2009-03-24Added config option to set default PvP modePhilipp Sehmisch1-0/+3
2009-03-19Implemented the possibility to have maps with or without PvP combat.Philipp Sehmisch1-0/+6
PvP is governed by the map property "pvp". Currently it can be either "none" for no PvP combat or "free" for unrestricted PvP combat. "none" is the default value which is used when pvp is undefined. Later addition of more sophisticated PvP modes is possible.
2009-01-28Moved MapContent into header file.David Athay1-118/+24
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0