summaryrefslogtreecommitdiff
path: root/src/account-server
AgeCommit message (Collapse)AuthorFilesLines
2010-08-03Allow default values for attributes at character creation time.Freeyorp2-1/+24
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-08-02Changed the stat file name to attributes.xml.Yohann Ferreira3-11/+15
I also made it required to start properly since it's now the case. Reviewed-by: Jaxad0127.
2010-07-10New attribute system and major changes to many low-level areas.Freeyorp6-194/+328
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-07-09Added LUA script bindings for manipulating the specials available to a ↵Philipp Sehmisch2-5/+76
character. Added script call for getting the cost of a special (recharge only for now) Deleting specials works server-sided but the client isn't informed about it properly. Specials without recharge cost don't appear for the player. Both of these features require an additional netcode message. Reviewed-by: Freeyorp
2010-05-30Use XML::Document to automate memory cleanupThorbjørn Lindeijer1-1/+1
Makes the code a little nicer.
2010-05-29Made the logLevel be taken from configuration for both servers.Yohann Ferreira1-27/+38
The new parameters in the manaserv.xml file can be used to do so: log_accountServerLogLevel log_gameServerLogLevel Also, updated the sample manaserv.xml accordingly. Reviewed-by: Thorbjorn.
2010-05-28Added some more log infos, and made small cleanups.Yohann Ferreira1-0/+5
Reviewed-by: Thorbjorn, Jaxad0127
2010-05-16Random cleanups, adding const, removing unnecessary clear callsThorbjørn Lindeijer3-9/+8
Reviewed-by: Jared Adams
2010-05-16Changed and split up the default location for loading dataThorbjørn Lindeijer2-35/+18
Instead of loading data from a 'data' directory in the current working directory, the server now uses clientDataPath and serverDataPath as specified in the configuration. This removes the need to set up symbolic links in order to merge these two types of data. The default values point to example/clientdata and example/serverdata, where a minimal example world can be developed to make setting up an initial server quick and easy. The XML::Document convenience class was copied over from the client. Also, the ResourceManager is now shared between both servers, since the account client is reading items.xml. Reviewed-by: Jared Adams
2010-02-23Removed some unnecessary log messagesPhilipp Sehmisch1-1/+0
2010-02-22Send update host also with registration responseThorbjørn Lindeijer1-3/+8
The client would otherwise not know which update host to use after registration. Also, the update host is now always sent, even if it is empty. This makes the message contents more deterministic. Reviewed-by: Jared Adams
2010-02-07Update Copyright date for Manaserv.Bertram13-13/+13
2010-01-29Rename enum elements to avoid clashing with macrosBernd Wachter1-1/+1
2010-01-18Reverted the accountserver-affecting changes of commits a9a87aea and ↵Philipp Sehmisch2-6/+2
dfc6875e - doesn't work out the way I planned.
2010-01-17Removed last traces of hardcoded access levels form game-server, begun with ↵Philipp Sehmisch2-2/+6
using the permission manager in the account-server.
2010-01-08Added tracing of kill count for each monster per characterPhilipp Sehmisch3-3/+101
2009-12-18Instead of sending http://update.manasource.org/ don't send any update host ↵Chuck Miller1-1/+3
if defaultUpdateHost is not set
2009-12-18Makes server send the update host from defaultUpdateHost config (defaults to ↵Chuck Miller1-0/+1
http://update.manasouce.org/ when non is set)
2009-12-06Added a method of updating the passwords of an existing databaseThorbjørn Lindeijer2-4/+51
To be removed sometime soon.
2009-12-06Moved storagesql.hpp into storage.hppThorbjørn Lindeijer2-152/+44
Also removed the not very useful documentation, so that the list of constants is more readable.
2009-12-06Renamed DALStorage to StorageThorbjørn Lindeijer6-71/+72
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-06Moved DALStorage documentation into source fileThorbjørn Lindeijer3-302/+208
Some methods were documented twice. Stuff moved to source file since this keeps the header more readable, and makes it easier to keep the documentation up to date with the implementation. Also, my IDE jumps to the definition when navigating. Removed two methods that were without an implementation.
2009-12-06Removed obsolete commented out code from DALStorageThorbjørn Lindeijer1-79/+6
2009-12-06Fixed name of the project in copyright headersThorbjørn Lindeijer14-147/+141
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-06Removed "TMW" and "TMWSERV" from header guardsThorbjørn Lindeijer7-17/+17
2009-12-06A host of code style changesThorbjørn Lindeijer2-80/+54
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-12-04Added server-sided SHA256 encryption of passwords as discussed.Philipp Sehmisch1-8/+4
2009-12-04Moved password hashing during registration to the client.Philipp Sehmisch1-3/+3
2009-12-04register credential information service and basic code structure for captcha ↵Philipp Sehmisch1-9/+46
support
2009-10-24Rebranding tmwserv to manaservThorbjørn Lindeijer3-40/+40
Includes a database update. Use update_6_to_7.sql to update existing sqlite databases.
2009-10-18Some random cleanupsThorbjørn Lindeijer2-3/+3
2009-10-17Also close gracefully on receiving the TERM signalThorbjørn Lindeijer1-0/+1
Probably the most important signal to handle gracefully...
2009-10-09Synced the protocol file with client in protocol.h, letting other defines in ↵Bertram3-2/+3
defines.h, and removing some overheading along the way.
2009-10-07Added a warning to accountserver when using the default inter-server password.Philipp Sehmisch1-0/+7
2009-10-07Adds server auth, also adds the "net_password" configure optionChuck Miller1-1/+14
2009-10-03Limit login attempt frequency based on IP addressThorbjørn Lindeijer5-59/+27
The previous method was broken because it set the "last time" to the current time when the client connected. So login would fail when the username and password were sent within a second from connecting, which is not desirable. If I'd have fixed this by setting the "last time" to login time minus one second, then an attacker would just need to reconnect for each login attempt. So now it uses an IP address based approach, where each IP can only try to log in once per second.
2009-10-03Some cleanupThorbjørn Lindeijer1-133/+143
* Removed unsigned/signed warning by just using signed integers. * Made AccountHandler message handler functions members again instead of static functions. * Renamed 'computer' to 'client' since that is a less confusing name.
2009-10-01Adds code for saving and getting status effects from the databaseChuck Miller3-0/+101
2009-09-30Adds tmw_char_status_effects tables to mySQL and SQLiteChuck Miller2-1/+6
2009-08-23Added table and view to prepare reporting of transaction log.Andreas Habel1-1/+1
Fixed database update "3 to 4". Added database update "4 to 5". Added indexes to table tmw_transaction for faster search when it gets bigger. Refactored layout of sqlite database script.
2009-08-17Update table tmw_accounts. Added columns to store secret key and expirationAndreas Habel1-1/+1
time for password recovery via tmwweb/email.
2009-08-14Bugfix for storing transaction messages for new created characters.Andreas Habel1-2/+3
First flush the new character to the database to get it's new DatabaseID. Calling ->getDatabaseID() before flush() will give a wrong, uninitialized value.
2009-07-10Changed BindInteger and BindString to BindValueDavid Athay1-23/+23
2009-07-10Changed database to using prepared statements, to stop SQL injection attacksDavid Athay2-65/+170
2009-07-03Makes Skills non hard codedChuck Miller3-13/+21
It should be noted that Jax still needs to update the client Level calulation seems broken now too
2009-05-24Stopped tmwserv from writing to its configuration fileBjørn Lindeijer1-26/+41
This was confusing, since changes made to the config file while the server is running are lost once the server exists. Also, XML comments were being stripped by the server. The command line option to set the port now only applies to a single run, and isn't saved in the configuration. There shouldn't be a need for the server to write to its configuration file, it might not even have the rights to do so.
2009-05-24More code style fixesBjørn Lindeijer1-2/+1
2009-05-24Made it possible to specify the host to listen onBjørn Lindeijer5-9/+11
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 Lindeijer2-2/+2
Also renamed Guild::totalMembers to Guild::memberCount
2009-04-26Standardize on the position of the const keywordBjørn Lindeijer10-105/+114
Same as for the client.