summaryrefslogtreecommitdiff
path: root/src/game-server/accountconnection.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-05-05Added debugging mode to the protocolThorbjørn Lindeijer1-0/+2
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
2012-04-12Fixed issues with server behind routerErik Schilling1-1/+3
Tested-by: jurkan. Reviewed-by: Bertram.
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-7/+7
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-21Fixed restoring of persistent floor itemsThorbjørn Lindeijer1-1/+1
Only 1/4th of the floor items were being restored after a reboot of the game server. Reviewed-by: jurkan
2011-10-19Merge branch 'master' of github.com:mana/manaservYohann Ferreira1-6/+9
Conflicts: src/game-server/accountconnection.cpp
2011-10-19Took interpreting the objects out of the map readerThorbjørn Lindeijer1-6/+9
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-09-09Add persistent items support based on seeseekey's work.Yohann Ferreira1-6/+58
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.
2011-04-03Changed SYNC_BUFFER_SIZE to unsigned to avoid compiler warningThorbjørn Lindeijer1-2/+5
It's being compared to an unsigned integer. Reported-by: Stefan Dombrowski
2011-04-02Some cleanups related to syncing from game to account serverThorbjørn Lindeijer1-10/+12
* 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
2011-03-18Improved @ban commandPhilipp Sehmisch1-1/+1
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
2011-03-06Small fixes coming from my comment on issue #77.Yohann Ferreira1-1/+2
Trivial.
2011-03-04Implemented persistent world and map variablesPhilipp Sehmisch1-6/+58
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
2010-12-16Deharcoded the host and port options for each servers.Yohann Ferreira1-3/+11
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.
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-16/+16
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-11-03Renamed write{Byte,Short,Long} to writeInt{8,16,32}Thorbjørn Lindeijer1-47/+47
Mainly for consistency with the client, and the general consensus was that these numbered versions were clearer.
2010-10-17Synchronise defaults between configuration file and source.Freeyorp1-1/+1
Reviewed-by: Bertram
2010-09-22Centralized the servers' exit values.Yohann Ferreira1-6/+8
Also made random code format clean-ups. Resolves: Mana-Mantis #217 Reviewed-by: Jaxad0127.
2010-09-19Small fixes.Freeyorp1-5/+1
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
2010-07-10New attribute system and major changes to many low-level areas.Freeyorp1-4/+13
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.
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-12-06A host of code style changesThorbjørn Lindeijer1-2/+2
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.
2009-11-05Fix handeling of GameServer portJared Adams1-3/+1
2009-10-15Speed code unification part 1: Made the server accept speed values in tiles ↵Bertram1-1/+3
per second.
2009-10-09Synced the protocol file with client in protocol.h, letting other defines in ↵Bertram1-1/+0
defines.h, and removing some overheading along the way.
2009-10-07Adds server auth, also adds the "net_password" configure optionChuck Miller1-0/+9
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer1-7/+8
Same as for the client.
2009-03-06Added transactional history to game server.David Athay1-0/+9
2009-02-24Made a lot of hard-coded values configuration optionsPhilipp Sehmisch1-4/+4
2008-12-12Fixed game server crash and code styleBjørn Lindeijer1-27/+25
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.
2008-12-01Added new table to store online users. See mantis #553Andreas Habel1-0/+16
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.
2008-11-30Add sync Buffer according to mantis #550Andreas Habel1-1/+66
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...
2008-11-24Fixed character party information on game server.David Athay1-2/+2
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
2008-11-06Added sending post via NPC.David Athay1-9/+6
2008-11-05Added version information to item database. Gameserver reports its local ↵Andreas Habel1-0/+17
version to account server during registration and gets notified if the version is up-to-date or outdated to prevent inconsistencies.
2008-10-31Changed command system to handle commands without template magic.David Athay1-25/+8
2008-10-26Some cleanup and an unsuccesful attempt at fixing a crash on map server exitBjørn Lindeijer1-6/+20
when there is no connection the account server (a different one surfaced).
2008-10-24Added post callback for getting post.David Athay1-1/+10
Added GM command for changing player attributes. Changed GM command to @ as '/' was already being used by client for local commands.
2008-10-21Game Server now reconnects to Account Server. Some postal system bugs fixed.David Athay1-1/+10
2008-09-19Added post communication between chat and game servers.David Athay1-0/+74
2008-07-03Removed guild stuff from game server and added some party stuff to it.David Athay1-160/+6
2008-01-28Added weapon skill system and leveling system.Philipp Sehmisch1-20/+18
2007-09-22Cleaned both configuration and resource managers.Guillaume Melquiond1-5/+6
2007-09-16Added global accounting of beings.Guillaume Melquiond1-1/+45
2007-08-31Implemented "ban" remote command.Guillaume Melquiond1-0/+8
2007-08-28Implemented quest variables.Guillaume Melquiond1-2/+29
2007-08-18First part of a patch for completing the RPG system (character attributes) ↵Guillaume Melquiond1-1/+2
of TMWserv.
2007-08-17Handled multiple connections by allowing client to take over characters.Guillaume Melquiond1-1/+1
2007-07-25Added being speed to protocol.Guillaume Melquiond1-1/+1