summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-29protocol.h -> manaserv_protocol.h to avoid conflicts with mysql files.Yohann Ferreira11-10/+10
Resolves: Mana-Mantis #278.
2010-12-29Updated the manaserv.xml to reflect latest functionalities.Yohann Ferreira1-10/+13
Trivial fix.
2010-12-29Moved parts needing to be in sync with the client in protocol.h.Yohann Ferreira7-65/+70
Trivial fix.
2010-12-29Made the server handle properly the characters slots.Yohann Ferreira12-73/+241
I turned the vector storing character data into a map, keeping the character's slot. Fixed a memleak along the way. Reviewed-by: Crush.
2010-12-27Implemented @log and @logsay commands.Philipp Sehmisch2-0/+44
The @log command is the equivalent to tmwAthena's @l. It allows to log a text as a transaction for documentation purpose. The @logsay command works like @t on tmwAthena. It says something in public chat while also logging it as a separate trasaction. Reviewed-by: Thorbjorn
2010-12-27Added @kick and @kill commands.Philipp Sehmisch6-1/+77
@kick disconnects the client connection of a character. The new error- code 11 (ERRMSG_ADMINISTRATIVE_LOGOFF) is not supported by the client yet. It will show a generic "The connection to server was lost" message instead. @kill kills the character by setting its HP to 0. Added @kick transaction code I forgot in last commit. Considering that this was just minutes ago I think that noone updated his database yet. So I don't think that a new database version is justified for this. Reviewed-by: Bertram
2010-12-27Transaction logging of various command, new transaction codes and style fix.Philipp Sehmisch9-7/+156
The @mute, @goto, @attribute and @announce commands now logs transactions to the database. Added new transaction codes to database. I've preliminarily added a lot of codes for not yet supported commands so that we needn't do a database update with every single commit which implements one. Also using the equivalent "say" helper function in place of the "GameState::sayTo" method in the command handler. Reviewed-by: Kage
2010-12-17Implemented @die chat commandPhilipp Sehmisch2-2/+12
The @die chat command kills the evoking character by setting its hit points to 0. The example permissions.xml assigns it to the "tester" rights group and not "players" because server admins who are not aware of this command might run into trouble when they assume that players don't have a method to teleport to their spawn point voluntarily. Resolves: mantis ticket #192 Reviewed-by: Jaxad0127
2010-12-17Fixed a compiler warning.Philipp Sehmisch1-1/+1
2010-12-16Added last missing try catch implementation in storage.cppYohann Ferreira1-103/+175
Resolves: Mana-mantis #269. Reviewed-by: Jaxad0127.
2010-12-16Use bound values for Storage::flush() since it leaked sensitive info.Yohann Ferreira1-7/+19
(Readable in the log with debug level.) Reviewed-by: Jaxad0127.
2010-12-16Fix existing binding use in storage.cpp.Yohann Ferreira1-55/+98
Reviewed-by: Jaxad0127.
2010-12-16Deharcoded the host and port options for each servers.Yohann Ferreira4-13/+56
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-12-16Standardized the current errors thrown.Yohann Ferreira3-110/+139
Reviewed-by: Jaxad0127.
2010-12-15Fix string comparison in map readingJared Adams1-14/+14
2010-12-15Fix compareStrI functionJared Adams1-1/+7
It now takes length into consideration. Reviewed-by: Chuck Miller
2010-12-15Allow names and types in map files to be of any caseJared Adams1-14/+14
Trivial fix, so no review.
2010-12-14Dummy commit since it seems my private repo didn't want to updateYohann Ferreira1-0/+1
the public one.
2010-12-14Remove an outdated comment talking about subversion tagging.Yohann Ferreira1-3/+1
2010-12-14Removed the code preventing from being able to sync items with id < 500.Yohann Ferreira1-4/+1
Instead, let's use the actual rule: Id > 0. Trivial fix.
2010-12-14Second round of small random cleanups on storage.Yohann Ferreira2-63/+59
Trivial also.
2010-12-14Small random hacking cleanups.Yohann Ferreira1-163/+189
Trivial.
2010-12-13Moved storage doc from .cpp to .h and updated it.Yohann Ferreira2-248/+311
Since it's what is done for the other files in the project. Trivial fix.
2010-12-08Fix return codes for many lua functionsFreeyorp1-6/+6
Reviewed-by: Bertram
2010-12-08Minor cleanup in a number of script functionsFreeyorp1-30/+6
Reviewed-by: Bertram
2010-12-08Fix many compiler warnings.Freeyorp10-33/+31
Reviewed-by: Bertram
2010-12-06Improve warp commandsJared Adams2-15/+121
@warp no longer takes a character. @charwarp was added to handle that ('#' still means the player). Both can take a map name, map id (preceded by '#') or '#' for the player's current map. Logging of warp commands now logs destination map and player warped (for @charwarp).
2010-11-18Made the server return the number of slots in the login/register responses.Yohann Ferreira2-5/+16
Reviewed-by: CodyMartin.
2010-11-15Upgrade database version to 12 as it should have been from the latest update.Yohann Ferreira3-3/+3
Trivial fix.
2010-11-15Updating C::B projectStefan Dombrowski6-12/+28
* Adding missing protocol.h * Switching debugger symbols and compiler optimization on * Show the Mana icon for executable files
2010-11-14Fix a potential memleak related to binds when disconnecting with MySQL.Yohann Ferreira2-5/+16
Trivial fix.
2010-11-14Simplified the use of binding when using MySQL.Yohann Ferreira2-47/+82
This permits to avoid a memleak with the former vector form and to use the 'place' variable when binding. The badly prepared statements are also a bit better handled now. With this patch, IMHO, the MySQL support is in shape. Reviewed-by: Jaxad0127.
2010-11-14Finally fix the logPerDay log option.Yohann Ferreira1-6/+17
The static std::string date variable had two nasty problems. Would it have been static or be named 'date', and it would have not worked right. I also made the logger add the proper date on the archived log when changing the current day. Resolved: TMW-Mantis #530. Reviewed-by: Jaxad0127.
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira145-691/+730
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.
2010-11-13Add a warning about the experimental state of PostgreSQL support.Yohann Ferreira1-0/+1
Trivial fix.
2010-11-13Readd the calculation of base attributes at character's login.Yohann Ferreira1-0/+3
Reviewed-by: CodyMartin.
2010-11-10Fix code indentation in the sql related files.Yohann Ferreira5-100/+107
Trivial fix.
2010-11-09Fixed unregistering on the server-side.Yohann Ferreira2-9/+20
When registering or logging, The client is hashing the password for sending it safely. And the server is hashing it also to store it the same way. Hence, the password ends hashed twice, which is correct because the server can't trust the client anyway. At unregister attempt, the server wasn't hashing the password before comparing it. Also while on it, I made the corresponding SQL query use the try catch method and only delete the account in memory when it's also done on the Db. Reviewed-by: thorbjorn, Freeyorp.
2010-11-04Fully shift being scope attributes into being.Freeyorp4-66/+115
Also split updateDerivedAttributes and remove the calc check workaround. Reviewed-by: Bertram.
2010-11-04Fix some errors in dispelling non-timed attributesFreeyorp3-17/+48
Reviewed-by: Bertram.
2010-11-04[PATCH 1/3] Alter the way attribute dependencies are updated.Yohann Ferreira1-32/+50
Also fix movement speed dependency. Reviewed-by: Bertram
2010-11-03Renamed write{Byte,Short,Long} to writeInt{8,16,32}Thorbjørn Lindeijer18-525/+523
Mainly for consistency with the client, and the general consensus was that these numbered versions were clearer.
2010-11-02Trivial code convention fix, promised to thorbjorn ;)Yohann Ferreira1-2/+4
2010-11-02Some random code cleanups.Yohann Ferreira4-72/+112
Also renamed MonsterClass::getType() to getId() since it was misleading with the use of ThingType::getType() and didn't represent the actual meaning, IMHO. Trivial.
2010-11-01Prevented a crash in the monster loading code.Yohann Ferreira2-1/+12
The server was trying to insert attributes value not in monster scope. The monster code is to be rewritten anyway. Resolves: Mana-Mantis #212.
2010-10-30Have the PerformTransaction class automatically handle nestingThorbjørn Lindeijer7-84/+91
No need to fiddle around with "startTransaction" booleans now that the helper class is a little more intelligent. When the database is already performing a transaction, no new one will be started.
2010-10-30Introduced a helper class for performing transactionsThorbjørn Lindeijer4-14/+54
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 Lindeijer2-11/+21
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-26Documented the net_clientDataUrl optionThorbjørn Lindeijer1-1/+9
2010-10-26Some none-changesThorbjørn Lindeijer1-75/+33
Mainly merging a lot of short lines and removing pointless comments that are just repeating what the code says.