summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a full user data for Entity referencesThorbjørn Lindeijer2013-04-147-96/+65
| | | | | Only moved a single script function to a member for now, will do others in a separate commit.
* Don't try to kill the connection of a deleted characterThorbjørn Lindeijer2013-04-131-1/+1
| | | | | | | | The point is to do this on the new character and to allow the client to continue playing with the existing character instance (when it represents the same character in the DB). Somehow was changed in commit aa04597c5f8.
* Added -std=c++0x compiler flag to the codeblocks filesPostremus2013-04-132-1/+3
|
* Actually use transactions for mysql updatesErik Schilling2013-04-132-4/+4
| | | | BEGIN; END; does not work similar to sqlite here.
* Fixed uninitialised variable warning in valgrindErik Schilling2013-04-121-0/+1
|
* Fixed too long lua documentationErik Schilling2013-04-121-21/+46
|
* Removed static member definitions that are no longer neededThorbjørn Lindeijer2013-04-126-11/+1
| | | | | | | | | 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
* Removed CharacterData member from CharacterComponentThorbjørn Lindeijer2013-04-123-9/+3
| | | | It is only needed temporarily while serializing and deserializing.
* Moved Actor into an ComponentErik Schilling2013-04-1233-408/+429
| | | | This was the final step to remove the hierachy with Entity on the top.
* Converted Being into a ComponentErik Schilling2013-04-1149-872/+1051
| | | | | | 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-1142-760/+1178
| | | | | A CharacterData was created as a proxy class in order to allow using the old serialization method.
* Renamed Character -> CharacterData in the accountserverErik Schilling2013-04-1114-68/+70
|
* Fixed @kill killing yourselfErik Schilling2013-04-101-1/+1
|
* Fixed undefined #defines in mingw and c++0xErik Schilling2013-04-073-1/+8
| | | | | It looks like mingw does not define all the stuff in c++0x it does without.
* Moved the Monster class to a ComponentErik Schilling2013-04-0314-123/+160
| | | | | | | Things done: - Allowed to create new Attributes outside of the protected scope of Being - Moved Monster to MonsterComponent - Some minor cleanup in the Attribute setting code of monsters
* Fixed multiple warnings and errors that blocked c++0xErik Schilling2013-04-0218-53/+74
| | | | | This allows the server to compile with c++0x (and enables it). This also includes some coding style / readabillity fixes.
* Removed old commandhandler approachErik Schilling2013-04-022-440/+0
| | | | It was forgotten to remove when the new approach was added
* Moved fighting code into a componentErik Schilling2013-04-0223-374/+651
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Moved documentation out of class definitionThorbjørn Lindeijer2013-03-252-68/+97
| | | | | | | | | | | | | | | Inline documentation is in general needlessly verbose and only makes it harder to read the actual class API. This change moves this kind of documentation to the function implementation for the 'Entity' class. For inline methods, the implementation is moved outside of the class using the 'inline' keyword. This provides a good place to put the documentation, but it also further cleans up the class definition. The class definition now gives a much better overview over its API. And if needed, details can be looked up at the function implementations. Reviewed-by: Erik Schilling
* Changed NPC to an NpcComponent added to a BeingThorbjørn Lindeijer2013-03-2514-172/+178
|
* Changed Effect to a component of ActorThorbjørn Lindeijer2013-03-259-53/+61
| | | | Reviewed-by: Yohann Ferreira
* Changed Item to a component of ActorThorbjørn Lindeijer2013-03-2515-84/+129
| | | | | | | | | | | | | | | Items also have positions, so the ItemComponent only makes sense as part of an Actor. Later on it will probably be part of an entity that also has an ActorComponent. Since it was annoying to update all the places where items were created, I've introduced a function for this. The component types are now prefixed with "CT_" because I wanted to introduce an 'Item' namespace which would otherwise be conflicting. The component types enum isn't used much in the code so it can look a bit ugly. Reviewed-by: Yohann Ferreira
* Changed SpawnArea and TriggerArea to components of EntityThorbjørn Lindeijer2013-03-2513-65/+202
| | | | | | Well, first visible change is that everything just gets longer to read. Reviewed-by: Yohann Ferreira
* Removed some outdated and not useful documentationThorbjørn Lindeijer2013-02-253-113/+0
|
* Fixed installation of Lua scriptsThorbjørn Lindeijer2013-02-241-0/+1
| | | | The 'scripts' subfolder was not added to the toplevel CMakeLists.txt
* Removed mentioning of retired structThorbjørn Lindeijer2013-02-241-2/+0
| | | | MonsterTargetEventDispatch was used before switching to libsigc++.
* Added Debug class for more convenient debugging outputThorbjørn Lindeijer2013-02-241-0/+34
| | | | | Inspired by the QDebug class and qDebug() function from Qt. Actually it might be nice if the LOG macro would also use this.
* Fixed default value of the servernameErik Schilling2013-02-242-2/+3
| | | | | Since the name was used to log things and the default now is "" also added logging of the address and port too.
* Added possibility to reserve mapsErik Schilling2013-02-2411-31/+155
| | | | | | | | | | | | If you set net_gameServerName you can now reserve maps in the maps.xml. There you have to add the servername - property to the <map> tag. Then the map will only be activated by that server. Also changed the activate sequence that the account server now tells the game server what maps to activate (previously the server requested all maps and the account server said yes or no). TODO: Fix general inter server map switching.
* Made the scripts being able to installErik Schilling2013-02-245-5/+15
| | | | | | | The game server will now look for the scripts in this order: - serverPath - config value - current working directory - the PKG_DATADIR #define
* Documented all lua binds directly in the sourceErik Schilling2013-02-242-1352/+2340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a comment to each lua binding. In the future a script should parse those and generate the docs from them. This should prevent outdated docs and duplicate effort to keep code and docs synced. In C++ categories can be defined in this way: /** LUA_CATEGORY long description of the category (shortname) * further text * goes into * the next lines */ The shortname is only used to bind other comments to the category. In lua the category would look like this: --- LUA_CATEGORY long description of the category (shortname) -- further text -- goes into -- the next lines A comment that describes a bind then can look like this: /** LUA some_function (shortnameofcategory) * some_function(string name) * some_function(int id) ** * Description */ Or in Lua: --- LUA some_function (shortnameofcategory) -- some_function(string name) -- some_function(int id) --- -- Description Autoupdates script follows soon
* Removed loading of script files using the statusmanagerErik Schilling2013-02-214-19/+5
| | | | | They are now required via the main.lua. Also made Harmony giving you the plague in order to allow testing.
* Introduced Script::ContextErik Schilling2013-02-2116-87/+99
| | | | | | | | 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.
* Rephrased the README about the server data a bitErik Schilling2013-02-201-11/+2
|
* Monsters no longer load their script filesErik Schilling2013-02-174-41/+0
| | | | | | | | | | | Before monsters loaded their script file on *each* spawn. This is rather wrong since the script state keeps growing for each monster. However all of this was unnessecary since the main.lua can simply require the script file. If you do not want to spam the main.lua (or any other file) with all the requires: I guess we can add script binds to iterate over all monsters and add some custom properties to the monsters.xml (See Mana-Mantis #356)
* Fixed last second reordering of function parameters in last commitErik Schilling2013-02-161-5/+5
| | | | Accidently only reordered the order in the definition but not in the calls
* Moved attribute (re)calculation to the scriptsErik Schilling2013-02-0410-177/+174
| | | | | | | | | | | | | | | | | | | | | | This introduces two callbacks: - on_update_derived_attribute -> Called to recalculate other derived attributes. - on_recalculate_base_attribute -> Called to recalculate a base attribute (only called for characters. However the function passed as callback can be useful for recalculating the derived attributes as well) Monsters no longer block recalculation of attributes except HP and Speed. I saw no sense to keep this. Fixed constant value in libmana-constants.lua Dropped bool type of the recalculation functions. It would be difficult to keep it while pushing all to the script engine and it was unused anyway. All in all this adds a LOT more flexibillity to projects since they can now adapt all attributes in the way they want.
* Changed Sword to Vit bonus since it has a lot derived attributesErik Schilling2013-02-041-1/+1
| | | | Only done for easier debugging
* Random cleanup of attribute codeErik Schilling2013-02-043-19/+28
| | | | Did this during trying to understand the code
* Fixed configure with old cmakeErik Schilling2013-02-031-2/+3
|
* Modifications to allow crosscompiling with mingwErik Schilling2013-02-0310-13/+32
| | | | Reviewed-by: bjorn.
* Fixed codeblocks compile for linux with sigc++Erik Schilling2013-02-031-3/+7
|
* Merge pull request #11 from Bertram25/manaserv-emotes-supportYohann Ferreira2013-02-0116-25/+220
|\ | | | | | | | | Added emote support. Reviewed-by: Ablu
| * Silenced to Wreorder warnings.Yohann Ferreira2013-02-012-3/+3
| |
| * Added emote support.Yohann Ferreira2013-02-0114-22/+217
|/
* Silenced some eclipse warningsErik Schilling2013-01-298-5/+21
|
* Fixed and silenced compiler warningErik Schilling2013-01-291-4/+5
| | | | Also removed a senseless line
* Fixed setting current map for npc update functionErik Schilling2013-01-151-0/+2
|
* Small simplification in Monster::diedThorbjørn Lindeijer2013-01-101-4/+4
|
* Used a typedef to make callback syntax more readableThorbjørn Lindeijer2013-01-101-11/+8
|