summaryrefslogtreecommitdiff
path: root/src/account-server/serverhandler.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-14/+14
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-58/+58
Mainly for consistency with the client, and the general consensus was that these numbered versions were clearer.
2010-10-30Introduced a helper class for performing transactionsThorbjørn Lindeijer1-2/+2
Avoids having to remember to call rollbackTransaction and makes transactions exception-safe (since the destructor of PerformTransaction will be called when an exception is thrown).
2010-10-30Use a transaction when handling a GAMSG_PLAYER_SYNC messageThorbjørn Lindeijer1-11/+16
This message can contain a lot of small database updates, which at least on my system are way more efficient when performed in a transaction (now it takes no more than 1 second vs. about 14 seconds before). Not saying this is normal, my guess is that it's due to using full partition encryption. I've also prevented the thing from entering an infinite loop in the case of a wrong message, and corrected some variable names.
2010-10-17Synchronise defaults between configuration file and source.Freeyorp1-1/+1
Reviewed-by: Bertram
2010-08-03Allow default values for attributes at character creation time.Freeyorp1-0/+1
TODO: The game-server also needs to keep track of this for when new attributes or attributes not in the default scope need to be created. Also hopefully fix attribute calculation order for derived attributes. Still hardcoded for now. Reviewed-by: Bertram.
2010-07-10New attribute system and major changes to many low-level areas.Freeyorp1-4/+11
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-05-16Random cleanups, adding const, removing unnecessary clear callsThorbjørn Lindeijer1-3/+6
Reviewed-by: Jared Adams
2010-02-07Update Copyright date for Manaserv.Bertram1-1/+1
2009-12-06Renamed DALStorage to StorageThorbjørn Lindeijer1-1/+1
The only reason it was a DALStorage was because it used to implement the Storage interface, but that interface got removed a long time ago.
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-10-09Synced the protocol file with client in protocol.h, letting other defines in ↵Bertram1-0/+1
defines.h, and removing some overheading along the way.
2009-10-07Adds server auth, also adds the "net_password" configure optionChuck Miller1-1/+14
2009-05-24Made it possible to specify the host to listen onBjørn Lindeijer1-2/+2
Needed when the server has multiple network interfaces and the one you want to use isn't the default one for localhost. The host to listen on can be set in config file with 'net_listenHost'.
2009-05-24Fixed a few code style issuesBjørn Lindeijer1-1/+1
Also renamed Guild::totalMembers to Guild::memberCount
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer1-4/+5
Same as for the client.
2009-03-06Added transactional history to game server.David Athay1-0/+15
2008-12-01Added new table to store online users. See mantis #553Andreas Habel1-0/+9
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/+40
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-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
2008-11-05Added version information to item database. Gameserver reports its local ↵Andreas Habel1-0/+20
version to account server during registration and gets notified if the version is up-to-date or outdated to prevent inconsistencies.
2008-10-27Compile fixes and warning fixes.Bjørn Lindeijer1-1/+1
2008-10-27Added changing player's character and account level (game-server commit to ↵David Athay1-1/+21
come at a later date)
2008-10-21Game Server now reconnects to Account Server. Some postal system bugs fixed.David Athay1-6/+12
2008-09-19Added post communication between chat and game servers.David Athay1-0/+92
2008-07-07Added party support between account and game servers.David Athay1-215/+7
2008-06-26fix compile error, and improve guild related methodsRoderic Morris1-2/+4
2007-09-23Simplified interface of the handler used for connections from game servers ↵Guillaume Melquiond1-18/+68
to account server.
2007-09-23Simplified interface of the connection handler used for clients of the ↵Guillaume Melquiond1-2/+1
account server.
2007-09-16Added global accounting of beings.Guillaume Melquiond1-0/+53
2007-09-16Cleaned game-server handler a bit before adding statistics.Guillaume Melquiond1-41/+65
2007-08-31Implemented "ban" remote command.Guillaume Melquiond1-0/+7
2007-08-30Got rid of abstract storage and reference-counted pointers. Fixed lifetime ↵Guillaume Melquiond1-49/+50
of accounts and characters in server memory. Cleaned some code.
2007-08-28Implemented quest variables.Guillaume Melquiond1-0/+21
2007-07-28Replaced user names by client pointers when handling channels, in order to ↵Guillaume Melquiond1-0/+2
reduce lookups in ChatHandler::sendInChannel.
2007-07-25Removed a host of unnecessary methods from ChatChannelManager.Bjørn Lindeijer1-17/+22
2007-07-23Commented out code unavailable from client side. Added support for NPCs.Guillaume Melquiond1-0/+2
2007-07-17Some more cleanup of chat handler related code.Bjørn Lindeijer1-28/+28
2007-07-01Made character data persistent across logout/login.Guillaume Melquiond1-8/+16
2007-07-01Reverted inventory handling code to the last known working state. Simplified ↵Guillaume Melquiond1-1/+2
serialization interface along the way.
2007-06-26Merged guilds-and-parties branch to trunkDavid Athay1-0/+221
2007-03-18Added a TokenCollector class for matching magic_tokens.Rogier Polak1-4/+3
2007-03-14Modified the game-server to use AbstractCharacterData, some renamingRogier Polak1-1/+3
2007-03-10Added a utility function for creating magic_tokensRogier Polak1-8/+5
2007-03-05Added an abstrart base class for characterdata, in order to use the same ↵Rogier Polak1-20/+16
serialize and deserialize functions on both the accountserver and the gameserver.
2007-02-04Added support for switching character by reconnecting to the account server andBjørn Lindeijer1-1/+22
fixed the issue where a client is not logged in after registering (patch by Rogier Polak).
2007-01-12Report problems with finding a certain character instead of crashing.Bjørn Lindeijer1-1/+10
2007-01-05Simplified handling of verbosity levels. Optimized code by generating only ↵Guillaume Melquiond1-7/+7
needed messages.
2007-01-05Removed log level argument from LOG_FATAL helper macro, with the assumptionBjørn Lindeijer1-5/+8
that fatal messages should always have highest log level.
2007-01-04Started serializing character possessions. Reduced their memory footprint.Guillaume Melquiond1-23/+2