Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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.
|
|
Allows inspection of message data. It is off by default since it consumes
additional bandwidth, but it can be turned on using the net_debugMode option
in manaserv.xml.
Currently the option only affects outgoing data for each host individually.
In particular, enabling this debug mode for the server does not automatically
make the client annotate its messages.
Reviewed-by: Erik Schilling
|
|
Tested-by: jurkan.
Reviewed-by: Bertram.
|
|
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
|
|
Only 1/4th of the floor items were being restored after a reboot of the game
server.
Reviewed-by: jurkan
|
|
Conflicts:
src/game-server/accountconnection.cpp
|
|
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
|
|
Also made some random changes where useful, including:
- Code formatting fixes,
- Design fix about the fact that only the game config option
should be checked.
- Fixed the size of the values sent and receive to follow
the rest of the development.
- Fixed variables names to make them show what they are,
and not why they are used.
Resolves: Mana-Mantis #142.
|
|
It's being compared to an unsigned integer.
Reported-by: Stefan Dombrowski
|
|
* Remove SYNC_END_OF_BUFFER since the end of a message can already be
identified by no more data being available.
* Consistently prefix ++ rather than postfix ++ when incrementing
mSyncMessages.
* Made SYNC_BUFFER_SIZE into constants rather than defines, and moved
them into the .cpp file since they're not used anywhere else.
* Just use 1 and 0 to indicate online status. No point in writing it
like 0x01 and 0x00.
* Merged some duplicated documentation for
AccountConnection::syncChanges.
Reviewed-by: Jared Adams
|
|
When banning a character, the game master now sets a time unit (m, h, d, w
or y for minutes, hours, days, weeks or years) after the duration.
Ban durations longer than 2^16 minutes are now possible.
The banned character is now kicked automatically and the banning character
receives a feedback chat message.
Reviewed-by: Thorbjorn
|
|
Trivial.
|
|
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
|
|
Changes:
============================================================
For the account server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_accountServerAddress,
net_listenHost -> net_accountHost
net_accountServerPort -> net_accountListenToClientPort
net_accountServerPort +1 -> net_accountListenToGamePort
For the game server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_gameServerAddress -> net_gameHost
net_gameServerPort -> net_gameListenToClientPort
For the chat server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
-> net_chatHost
net_accountServerPort + 2 -> net_chatListenToClientPort
Special fallback feature, as requested by Freeyorp:
When the net_accountListenToClientPort (default to 9601)
is set, the 3 others ports will automatically offset from it,
if they're not set, following this rule:
net_accountListenToGamePort = net_accountListenToClientPort + 1
net_chatListenToClientPort = net_accountListenToClientPort + 2
net_gameListenToClientPort = net_accountListenToClientPort + 3
Resolves: Mana-Mantis #216.
Reviewed-by: Jaxad0127.
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|
|
Mainly for consistency with the client, and the general consensus was
that these numbered versions were clearer.
|
|
Reviewed-by: Bertram
|
|
Also made random code format clean-ups.
Resolves: Mana-Mantis #217
Reviewed-by: Jaxad0127.
|
|
There is no longer any need to send attribute change information for
character or correction point changes to the account server. This is
now handled elsewhere in a dedicated function.
The account server was already doing this but the game server hadn't
been updated. This wasn't causing any major problems since this data
was being sent at the end of the packet.
Update documentation for the functions accordingly.
Also adjust a misplaced opening curly brace in attribute calculation
which could cause modifiers to be applied wrongly in certain cases.
Reviewed-by: Kage
|
|
Attribute system:
Structure is no longer completely hardcoded. Attributes and structure is
defined by new xml file (defaulting to stats.xml)
Structure defines non-base modifications to an attribute, to be used by
modifiers from items, effects, etc.
Calculating the base value for core attributes is still done in C++ (and for
such fundamental elements the only reason I can think of to do it any other
way is perhaps being able to quickly change scripts without a compile could be
useful for testing, but such things are a low priority anyway)
Item structure:
Modifiers are now through triggers rather than single events. This also
removes hardcoded types - an item could be both able to be equipped and be
able to be activated.
Item activation no longer consumes by default, this must be specified by the
property <consumes /> inside the trigger.
Currently only attribute modifications, autoattacks, and consumes are defined
as effects, but stubs for others do exist. Autoattacks are currently
non-functional, and this should be rectified with some urgency.
Auto Attacks:
AutoAttacks are now separate entities, though not fully complete, nor fully
integrated with all beings yet. Integration with the Character class is
urgent, integration with other Being children less so.
When fully integrated this will allow for multiple autoattacks, through
equipping multiple items with this as an equip effect or even through other
means if needed.
Equipment structure:
As ItemClass types are no longer hardcoded, so too are equip types. An item
have multiple ways to be equipped across multiple equipment slots with any
number in each slot. Character maximums are global but configurable.
Miscellaneous:
Speed, money, and weight are now attributes.
Some managers have been changed into classes such that their associated
classes can have them as friends, to avoid (ab)use of public accessors.
The serialise procedure should also be set as a friend of Character (both in
the account- and game- server) as well; having public accessors returning
iterators is simply ridiculous.
Some start for such cleanups have been made, but this is not the primary focus
here. Significant work will need to be done before this is resolved
completely, but the start is there.
BuySell::registerPlayerItems() has been completely disabled temporarily. The
previous function iterated through equipment, yet in the context I think it is
intended to fill items? I have been unable to update this function to fit the
modifications made to the Inventory/Equipment/Possessions, as I am unsure what
exactly what it should be doing.
ItemClass::mSpriteId was previously unused, so had been removed, but I
notice that it was used when transmitting equipment to nearby clients.
Experimentation showed that this value was never set to anything other than
0, and so has been left out of the ItemManager rewrite.
I am not entirely sure what is happening here, but it should be worth looking
into at a later time, as I am not sure how equipment appearences would be sent
otherwise.
|
|
|
|
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.
|
|
Removed pointless void in method parameter lists, fixed methods and
variables that started with upper case, removed pointless 'const' for
stuff passed by value, made some getters const, etc.
|
|
|
|
per second.
|
|
defines.h, and removing some overheading along the way.
|
|
|
|
Same as for the client.
|
|
|
|
|
|
The game server crashed when it was closed while it still hadn't been
able to connect to the account server, due to an uninitialized pointer.
Code style fixes. Don't use 'const' for arguments that are passed by
value and start variable names with lowercase.
|
|
This upgrade will be the first, we provide database installation scripts
and update scripts to upgrade from the previous version. For more details
about database upgrades see
http://wiki.themanaworld.org/index.php/Upgrade_Database and feel free to
comment.
|
|
The game server buffers all changes made to a character in a sync buffer.
The buffer is sent to the account server if the buffer contains more then
20 message, reaches size of 1kb or at least every 10 seconds.
ATM Character attributes, corr points and attribute points and skills are
synchronized. TODO: items, location, money...
|
|
|
|
|
|
|
|
version to account server during registration and gets notified if the version is up-to-date or outdated to prevent inconsistencies.
|
|
|
|
when there is no connection the account server (a different one surfaced).
|
|
Added GM command for changing player attributes. Changed GM command to
@ as '/' was already being used by client for local commands.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|