summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2011-02-08Implemented LUA binding to get the gender of a characterPhilipp Sehmisch1-0/+17
The function is named mana.chr_get_gender. It returns 0 for male and 1 for female. libmana-constants.lua defines the variables GENDER_MALE and GENDER_FEMALE with these values. Also made the banker NPC refer to the gender of the player character. Reviewed-by: Jaxad0127
2011-01-30Revert "Fixed the money handling."Jared Adams5-34/+7
This reverts commit b2209cbe93aa12dcd4e4e3b9a7cd8b13ed5713e9. Money should be handled through attributes, not magic numbers.
2011-01-31Fixed the money handling.Yohann Ferreira5-7/+34
- At character's attributes recalculation when necessary. - In the lua scripting functions.
2011-01-30Made the code tell a bit more when a monster is lacking values.Yohann Ferreira1-14/+30
2011-01-30Trivial code format fixes in monstermanager.cpp.Yohann Ferreira1-28/+45
2011-01-30Added the missing Magical dodge monster property.Yohann Ferreira1-0/+2
Now this can be loaded with the 'magic-evade' xml tag.
2011-01-30Made the monsters' attributes compute fine again.Yohann Ferreira3-10/+59
As a consequence, the monsters can spawn again. Reviewed-by: Freeyorp.
2011-01-26Add an heartbeat time flag in the statistics file.Yohann Ferreira4-58/+101
This way, any kind of external service can know about the running state of each servers, even if only the account server is updating the statistics because: 1. When the account server is running, each <gameserver> tag is a running game server. Otherwise, it's not listed. 2. Whenever the account server stops running, the stat file isn't updated anymore and so the <heartbeat> tag isn't. 3. Game servers without any contact with an account server will try to reconnect to the account server and kick out every players so they aren't considered as running in that case. Reviewed-by: Crush. Resolves: Mana-mantis #270.
2011-01-25Upgraded the manaserv protocol version to 1.Yohann Ferreira1-1/+1
Yeah, I know Jaxad, we're not releasing but as agreed with Thorbjorn, the protocol is incompatible even when moving, so better get rid of old clients early.
2011-01-22Fix the default slot values when upgrading the database to version 14.Yohann Ferreira2-2/+2
Reviewed-by: Cody. Resolves: Mana-Mantis #284.
2011-01-22Made the being direction be updated only at the end of the movement.Yohann Ferreira1-3/+3
This saves a bit of cpu and make use of pixel points where tile points where used before and could lead to discrepancies. Reviewed-by: Thorbjorn.
2011-01-11Made the servers report their protocol version.Yohann Ferreira5-5/+13
As the protocol version isn't something the maintainers should set, I removed the net_clientVersion irrelevant option, replaced by the corresponding define PROTOCOL_VERSION in the manaserv_protocol.h file. A corresponding change in the client will be made. N.B.: Now, the Enet version is also reported in the log. Reviewed-by: Jaxad.
2011-01-10Removing default argument values from Map definitionStefan Dombrowski1-2/+1
The default argument values had no effect, because they are not in the declaration. Updating the codeblock project, because protocol.h had been renamed. Reviewed-by: Bertram
2011-01-09Fix being direction discrepancies by syncing the BeingDirection.Yohann Ferreira7-21/+118
The server was actually using the bitmask enum while the the client still sent another one, creating discrepancies. A second problem is that the being direction was not properly initialized and not updated while it was moving. Reviewed-by: Jaxad.
2011-01-09Removed the superfluous point struct.Yohann Ferreira15-39/+29
It was too close from the Position class and it leads to making the server handle one or another type through the code. Still bugged me many times while making changes. Reviewed-by: Jaxad.
2011-01-06Get rid of the server tick magic number.Yohann Ferreira6-15/+19
Reviewed-by: CodyMartin.
2011-01-03Got rid of the superfluous DEFAULT_TILE_HEIGHT/WIDTH.Yohann Ferreira4-10/+10
We've got DEFAULT_TILE_LENGTH in defines.h for that. Trivial fix.
2011-01-03Change Actor::mActionTime to mMoveTime member to reflect more its actual use.Yohann Ferreira3-12/+14
Trivial.
2011-01-03Added missing using namespace clauses. Cmake's fault, I guess. ;)Yohann Ferreira3-0/+6
Trivial.
2011-01-03Cleaned up and document a bit more the speed conversion functions.Yohann Ferreira5-13/+28
Trivial fix.
2011-01-03Namespaced the manaserv protocol to ease the porting of the enums.Yohann Ferreira6-0/+12
Trivial.
2010-12-29Corrected the database version of newly created databases.Yohann Ferreira2-2/+2
Trivial fix.
2010-12-29protocol.h -> manaserv_protocol.h to avoid conflicts with mysql files.Yohann Ferreira11-10/+10
Resolves: Mana-Mantis #278.
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 Sehmisch1-0/+42
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 Sehmisch8-7/+154
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 Sehmisch1-2/+11
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 Adams1-15/+120
@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.