Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
|
|
BEGIN; END; does not work similar to sqlite here.
|
|
|
|
|
|
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
|
|
It is only needed temporarily while serializing and deserializing.
|
|
This was the final step to remove the hierachy with Entity on the top.
|
|
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.
|
|
A CharacterData was created as a proxy class in order to allow using the
old serialization method.
|
|
|
|
|
|
It looks like mingw does not define all the stuff in c++0x it does
without.
|
|
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
|
|
This allows the server to compile with c++0x (and enables it).
This also includes some coding style / readabillity fixes.
|
|
It was forgotten to remove when the new approach was added
|
|
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
|
|
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
|
|
|
|
Reviewed-by: Yohann Ferreira
|
|
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
|
|
Well, first visible change is that everything just gets longer to read.
Reviewed-by: Yohann Ferreira
|
|
|
|
The 'scripts' subfolder was not added to the toplevel CMakeLists.txt
|
|
MonsterTargetEventDispatch was used before switching to libsigc++.
|
|
Inspired by the QDebug class and qDebug() function from Qt. Actually it
might be nice if the LOG macro would also use this.
|
|
Since the name was used to log things and the default now is "" also added
logging of the address and port too.
|
|
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.
|
|
The game server will now look for the scripts in this order:
- serverPath - config value
- current working directory
- the PKG_DATADIR #define
|
|
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
|
|
They are now required via the main.lua.
Also made Harmony giving you the plague in order to allow testing.
|
|
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.
|
|
|
|
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)
|
|
Accidently only reordered the order in the definition but not in the calls
|
|
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.
|
|
Only done for easier debugging
|
|
Did this during trying to understand the code
|
|
|
|
Reviewed-by: bjorn.
|
|
|
|
Added emote support.
Reviewed-by: Ablu
|
|
|
|
|
|
|
|
Also removed a senseless line
|
|
|
|
|
|
|
|
This documentation used to be accurate, until Point was merged with the
Position class in commit 8ff3e6674c1d4fc05fc1ba87f42484689fca0879.
Also fixed a typo.
|