summaryrefslogtreecommitdiff
path: root/src/account-server
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11Converted the Character class into a componentErik Schilling2-10/+25
A CharacterData was created as a proxy class in order to allow using the old serialization method.
2013-04-11Renamed Character -> CharacterData in the accountserverErik Schilling9-45/+47
2013-02-24Fixed default value of the servernameErik Schilling1-1/+2
Since the name was used to log things and the default now is "" also added logging of the address and port too.
2013-02-24Added possibility to reserve mapsErik Schilling3-12/+119
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.
2013-02-03Modifications to allow crosscompiling with mingwErik Schilling1-0/+4
Reviewed-by: bjorn.
2013-01-29Silenced some eclipse warningsErik Schilling1-2/+2
2013-01-10Removed deprecated and unused Storage::flushSkillThorbjørn Lindeijer2-19/+0
2013-01-09Replaced 'unsigned int' with 'unsigned'Thorbjørn Lindeijer7-68/+56
Same thing, but shorter.
2012-08-05Cleaned up some world state variable testing codeThorbjørn Lindeijer1-10/+2
Kept the accountserver_startup time for now, since it could be useful. Reviewed-by: Stefan Beller
2012-07-31Fixed SQL syntax error when updating character pointsThorbjørn Lindeijer1-2/+1
Had a comma too much. Reviewed-by: Stefan Beller Reviewed-by: Erik Schilling
2012-05-25Fixed handling of skillsErik Schilling1-8/+8
- Removed possibility of skills getting mixed with attributes - Made the server sending the level of the current skill on exp change (currently the client could calculate it itself, but it allows more flexibillity in future this way) - Fixed reading of skills out of the database (for some reason the status effects were added as skills) ** Needs clientside patch as well (coming soon) ** Reviewed-by: Bertram.
2012-05-05Added debugging mode to the protocolThorbjørn Lindeijer2-10/+13
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-05-01Fix compiler error in g++ (GCC) 4.7.0jurkan1-2/+2
Compiler error was due to variable redeclaration (variable inside of for loop had the same name as the loop iterator variabele) - fixed through renaming of the inner variable. Reviewed-by: bjorn
2012-04-19Fixed guild supportErik Schilling2-3/+36
List of things fixed: - fixed having multiple guild support everywhere - implemented kick code (untested due to missing kick possiblity in client) - fixed giving owner rights to next member when owner leaves guild - fixed potentional segmention fault when trying to access deleted guild after all members left - fixed saving right changes to database - made searching for guilds faster a bit (at least when having many guilds) TODO: + Fix conflict between guild and normal channels + Fix being able to leave guild channel without leaving guild itself + Add kick possiblity to client Reviewed-by: bjorn.
2012-04-12Fixed issues with server behind routerErik Schilling1-2/+2
Tested-by: jurkan. Reviewed-by: Bertram.
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-4/+4
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-04-04Enhanced special supportErik Schilling3-15/+47
- Made the current charge being saved. - Added script binds: - chr_set_special_recharge_speed - chr_get_special_recharge_speed - chr_set_special_mana - chr_get_special_mana - get_special_info - Added special info lua class. Functions: - name - needed_mana - rechargeable - on_use - on_recharged - category Further the engine no longer sets charge to 0 after using of specials this allows more flexbilillity (like failing specials). Changes on the xml database: - recharge renamed to rechargeable (needed by client and server) - needed - the needed mana to trigger a special (server only) - rechargespeed - the defailt recharge speed in mana per tick (server only) - target - the type of target (either being or point) (server and client) I also made the lua engine pushing nil instead of a 0 light userdata when the pointer was 0. Database update needed. Change is tested. Mana-Mantis: #167, #156 Reviewed-by: bjorn.
2012-03-16Use the guild ID when setting guild member rightsThorbjørn Lindeijer1-4/+4
While the plan is to allow only one guild per player, the database currently doesn't enforce this. The expected behavior of this API is that it changes the rights only for the specified guild, but the query was changing the rights of the player in all his guilds. Reviewed-by: Erik Schilling
2012-03-16Fixed remaining compiler warningsThorbjørn Lindeijer1-1/+1
These were unused parameters and one return type with an ignored 'const' qualifier. Reviewed-by: Yohann Ferreira
2012-03-13Fixed problems with map-bound world state variablesThorbjørn Lindeijer4-52/+35
Due to a wrong primary key, which covered only the state name, it was impossible to use the same state name on different maps. This has now been fixed. Another problem was that the map variables were being included in the global variables, because the related database query did not filter on the map_id column properly. While fixing that, the map_id column now allows explicitly marking a state variable as global (with the value 0) or system variables (with the value -1). System variables are currently not accessible from scripts, but that could be changed later. Reviewed-by: Yohann Ferreira Reviewed-by: Erik Schilling
2012-03-13Fixed initial sending of global world variables to the game serverThorbjørn Lindeijer1-1/+2
The AGMSG_REGISTER_RESPONSE message should be sent _after_ adding the global world state variables to it rather than before. Reviewed-by: Yohann Ferreira
2012-02-28Removed unnessecary second check for same conditionErik Schilling1-65/+62
Reviewed-by: Bertram.
2012-02-27Fixed compilation again + some more code cleanupErik Schilling2-10/+10
I did some cleanup but i had a wrong path set inside qtcreator. So i recompiled old versions and it all worked fine. But when i recompiled from console i got a whole bunch of errors. Sorry for pushing broken commits. Reviewed-by: bjorn.
2012-01-21Made @announce fully functionalErik Schilling1-0/+8
- Added announcements having senders now. - Removed /announcement support. Reviewed-by: Bjorn.
2011-11-07Small cleanups in utils::TimerThorbjørn Lindeijer1-0/+3
* Not nice to pass boolean parameter to constructor for preventing the timer from running on creation. Just call 'start' on it explicitly. * getTimeInMillisec could be made static. Reviewed-by: Yohann Ferreira
2011-11-01Removed some superfluous new character initializationsThorbjørn Lindeijer1-13/+0
The level, character points and correction points are already initialized by the Character constructor. The ATTR_GP attribute is either not present, or obtained default value from mDefaultAttributes. In both cases it makes no sense to set it to 0. Reviewed-by: Yohann Ferreira
2011-11-01Have one place where the Configuration is initializedThorbjørn Lindeijer1-44/+12
Also, removed the fallback to the standard config file path when a config file path is specified on the command line. Surely that's not what you would want to happen. Reviewed-by: Yohann Ferreira
2011-10-19Merge branch 'master' of github.com:mana/manaservYohann Ferreira1-18/+1
Conflicts: src/game-server/accountconnection.cpp
2011-10-19Have one place where the Logger is initializedThorbjørn Lindeijer1-18/+1
log_accountToStandardOutput and log_gameToStandardOutput have been merged together as log_toStandardOutput. Reviewed-by: Yohann Ferreira
2011-09-09Add persistent items support based on seeseekey's work.Yohann Ferreira4-0/+238
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-09-05Fixed size of mapid field in mysql database.Erik Schilling1-1/+1
Resolves: Mana-Mantis: #388. Reviewed-by: Bertram.
2011-08-30Made the db version an official pre-requisite.Yohann Ferreira2-6/+10
It was uneasy to not miss something when updating the db. And as the db version is somewhat corresponding to a certain protocol version, adding it in the protocol file sounds relevant to me, and helps when updating it.
2011-08-30Added missing sql update scripts.Yohann Ferreira1-1/+1
2011-08-11Merge branch 'master' of ↵Yohann Ferreira1-15/+27
git://gitorious.org/~bertram/mana/manaserv-equipment-fix into equipment-fix Conflicts: src/common/manaserv_protocol.h
2011-08-10login with random hashStefan Beller2-3/+64
The account server sends out a random number, which is additionally used for hashing the password. Reviewed by Bertram
2011-07-27Begun Applying the new equipment slot handling design.Yohann Ferreira1-15/+27
now, the equipment slots are independant from the inventory slots according to the inventory and equipment data. This will permit to avoid checking the equipment each time one touches the inventory and vice versa, and make the former delayed mode useless. Also, note that equipped items will be removed from inventory and readded once unequipped. The design will permit the following, even if not implemented yet: - To make equipment items stackable again, if wanted. - Have more than one item with the same id equipped on different slots using the itemInstance field. Note: I didn't add the database structure updates yet, to see whether other changes may later go along with those.
2011-06-14Fixing storing of changed passwordsStefan Dombrowski1-2/+2
Reviewed-by: Bertram
2011-05-30Routing party invite through the map serverStefan Dombrowski1-0/+5
The player sends party invites to the game server. If the invitee is within the visual range of the inviter, the game server forwards the invite to the chat server. Reviewed-by: Bjorn, Jaxad0127
2011-04-13Fixed swapping of equipment and inventory slotsThorbjørn Lindeijer1-3/+4
This was happening when retrieving characters from the database. Also made the query more explicit about which columns it requests. Reviewed-by: Yohann Ferreira
2011-04-13Fixed equipment duplication when updating it.Yohann Ferreira1-1/+7
Reviewed-by: Thorbjorn.
2011-04-02Some cleanups related to syncing from game to account serverThorbjørn Lindeijer1-7/+3
* 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-30Fixing selection of a character if lower slots are emptyStefan Dombrowski1-1/+1
This resolves http://bugs.manasource.org/view.php?id=321 Reviewed-by: Jaxad0127, VUT
2011-03-24Rely more on the functionality in XML::DocumentThorbjørn Lindeijer1-9/+2
By default XML::Document will use the ResourceManager to resolve the file name you pass to it. There is no point in disabling that functionality only to resolve it manually. Reviewed-by: Jared Adams
2011-03-20Moved defines.h and manaserv_protocol.h into 'common'Thorbjørn Lindeijer4-6/+6
Just seems a bit more organized to me.
2011-03-20Use of uint64_t requires including C99 header stdint.hThorbjørn Lindeijer1-0/+2
This is not standard C++... Reviewed-by: Freeyorp
2011-03-20General cleanups and code style fixesThorbjørn Lindeijer5-106/+88
A bunch of variables that were continuously requested from the configuration are now members of the AccountHandler. Reviewed-by: Freeyorp
2011-03-18Improved @ban commandPhilipp Sehmisch2-2/+5
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-17Micro-optimizations related to std::stringThorbjørn Lindeijer3-11/+13
* Rely on the fact that a std::string is empty by default * Use std::string::empty() rather than comparing to "" * Construct with std::string() rather than from "" Reviewed-by: Bertram
2011-03-15Moved some file-global variables into the AccountHandlerThorbjørn Lindeijer1-42/+40
Nicer as members where there is clear ownership, initialization and scope. Reviewed-by: Freeyorp
2011-03-15Introduced an AttributeValue class for convenience and readabilityThorbjørn Lindeijer3-29/+43
Easier to understand than a std::pair with its 'first' and 'second' members, and it also provides an implicit constructor so that AttributeValue is implicitly constructed from a double. Reviewed-by: Freeyorp