summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-10-17Dehardcode the tileWidth and height, except for the speed conversion.Yohann Ferreira11-52/+92
The speed conversion needs a standard tile length anyway and can be improved later once the movement code will start to handle beings size. Reviewed-by: Crush.
2010-10-17Fix hp regeneration units.Freeyorp1-2/+2
Reviewed-by: Bertram
2010-10-17Get rid of some unneeded direct calls to setBase for attributes.Freeyorp1-8/+5
setAttribute should be used for this, which also calls updateDerivedAttributes as needed. Reviewed-by: Bertram
2010-10-17Synchronise defaults between configuration file and source.Freeyorp3-3/+3
Reviewed-by: Bertram
2010-10-14Hopefully fix the logging rotation this time.Yohann Ferreira3-25/+89
Added an extension to the ResMan::exist() function in order to get file existence even not in search path. Reviewed-by: CodyMartin.
2010-09-29Add log file rotation support based on ExceptionFault's work.Yohann Ferreira5-19/+212
This patch adds options to enable log rotations base on files size and or change of date. Note: Zip support will be added in a second commit. Reviewed-by: CodyMartin, Thorbjorn.
2010-09-27SQLite: Do a proper upgrade of the mana_characters tableThorbjørn Lindeijer1-11/+80
We can't leave the obsolete columns around since they are marked as NOT NULL, so insertion to the table fails if no values are provided for them. With SQLite, our only option is to create the table and copy the data over, which is what the update script now does. The script was modified so that it is fine to run it again on a database that was already updated to version 11 before.
2010-09-22Added options to disable the server log to standard output to the minimum.Yohann Ferreira2-19/+26
Also made some small cleanups. Resolves: Mana-Mantis #241 Reviewed-by: Jaxad0127.
2010-09-22Centralized the servers' exit values.Yohann Ferreira6-42/+79
Also made random code format clean-ups. Resolves: Mana-Mantis #217 Reviewed-by: Jaxad0127.
2010-09-19Small fixes.Freeyorp4-16/+11
There is no longer any need to send attribute change information for character or correction point changes to the account server. This is now handled elsewhere in a dedicated function. The account server was already doing this but the game server hadn't been updated. This wasn't causing any major problems since this data was being sent at the end of the packet. Update documentation for the functions accordingly. Also adjust a misplaced opening curly brace in attribute calculation which could cause modifiers to be applied wrongly in certain cases. Reviewed-by: Kage
2010-09-16Changed maxSkillCap to game_maxSkillCap as I forgot in last commit.Yohann Ferreira1-42/+54
Also made some random code format cleaups. Trivial fix.
2010-09-15Fixed characters not being returned at character selection when using MySQL.Yohann Ferreira2-12/+12
The table mana_char_equips wasn't created due to an SQL error, this led the account server to not return the player's characters. Seen in the logs: [19:40:41] [ERR] (DALStorage::getCharacter #1) SQL query failure: Table 'bertram.mana_char_equips' doesn't exist [19:40:41] [ERR] Failed to get character 11 for account 1. Resolves: Manasource mantices: 189, 230. Reviewed-by: Thorbjorn.
2010-09-15Reordered the manaserv.xml.example file and made related code cleanups.Yohann Ferreira9-39/+55
Reviewed-by: Thorbjorn.
2010-09-12Added script to update SQLite database to version 11Thorbjørn Lindeijer1-0/+39
Will not drop the attribute columns since this is not supported by SQLite. I'm just leaving them around for now and see if it causes any problems.
2010-09-12Fixed removal of hardcoded attributes in the MySQL update scriptThorbjørn Lindeijer1-7/+7
It was trying to remove them from the wrong table.
2010-09-08Centralized stringToBool conversion.Yohann Ferreira13-120/+161
Also moved the trim() function into the utils namespace where it belongs more, and made some random code cleanups. Reviewed-by: Thorbjorn.
2010-09-07Added config options to set stats and log files and paths.Yohann Ferreira2-27/+34
Also turned the absence of an inter-server password into a fatal error while documenting it in the manaserv.xml example file. Reviewed-by: Jaxad0127.
2010-09-06Added <points> tag handling in attributes.xml.Yohann Ferreira2-47/+90
Reviewed-by: Freeyorp, Thorbjorn.
2010-08-31Added a --config manaserv.xml file path options to both servers.Yohann Ferreira2-48/+140
Now, it's possible to set a different config filename and path on the command line. Reviewed-by: Jaxad, Kage.
2010-08-30Change primary and secondary tags in attributes.xml from stats and stat to ↵Freeyorp2-4/+4
attributes and attribute respectively.
2010-08-30Added @mute chat command.Philipp Sehmisch4-4/+69
The @mute command stops another character from talking in the public chat for a specified amount of seconds. It doesn't survive a reconnect of the client, but I don't think that this is necessary because a mute by a GM is usually intended as a slap on the wrist with more severe consequences to follow (like @ban).
2010-08-29Merge branch 'testing'Freeyorp58-1926/+3479
Conflicts: src/account-server/storage.cpp src/game-server/being.cpp src/game-server/being.hpp src/game-server/character.cpp src/game-server/character.hpp src/game-server/gamehandler.cpp src/game-server/inventory.cpp src/scripting/lua.cpp src/sql/mysql/createTables.sql src/sql/sqlite/createTables.sql
2010-08-22Some coding style tweaksThorbjørn Lindeijer3-20/+16
2010-08-22Pass a script name to Lua for proper reporting of error locationsThorbjørn Lindeijer5-10/+14
Now the Lua file name shows up in the error message and stack traceback, or the map file and object name in case of a script embedded in a map file.
2010-08-22Rename some stuff to conform to naming conventionsThorbjørn Lindeijer6-33/+31
2010-08-22Print out a backtrace when a Lua error is raisedThorbjørn Lindeijer2-20/+26
The backtrace is printed by using debug.traceback as error handler when calling Lua functions. At the moment it still looks pretty ugly since Lua is not aware of the file names of the scripts (to be fixed). Reviewed-by: Jared Adams
2010-08-22Print out the actual error message in case of a syntax errorThorbjørn Lindeijer1-3/+7
Should help to locate the problem. Reviewed-by: Jared Adams
2010-08-22Another small simplificationThorbjørn Lindeijer1-7/+1
2010-08-22Avoid collision with type 'int' in SQL queryThorbjørn Lindeijer1-12/+7
Was causing the account server to crash when using MySQL backend. Mantis-issue: 188 Reviewed-by: Yohann Ferreira
2010-08-22Changed the location of configuration, logs and statsThorbjørn Lindeijer4-101/+47
Instead of searching for the configuration file in ~/.manaserv.xml, the file is now expected to be in the working directory of the server. The logs and statistics will also be written there. This should make it easier to run differently configured servers on the same machine, and should also be a bit more straight-forward to setup. Reviewed-by: Yohann Ferreira
2010-08-21Fixed version in database table creation filesThorbjørn Lindeijer2-2/+2
Forgotten in commit 81db92232e50d47a318c94bc34fb63b67493559a
2010-08-21Perform more detailed argument checking in Lua functionsThorbjørn Lindeijer1-154/+101
Based on helper functions in the auxiliary library. Reviewed-by: Yohann Ferreira
2010-08-18Change references from database version 10 to version 11 to reflect changes ↵Freeyorp4-4/+4
made to mainline
2010-08-15Add included enet to CMakeBernd Wachter1-3/+8
2010-08-14Set the database ID of a new character immediately after creating it.Freeyorp1-3/+3
(Ooops.)
2010-08-13Fix enet check macros.Freeyorp2-3/+3
Not a good idea to have #if checks in a #ifdef check. Trivial fix.
2010-08-09Fix enet version checkJared Adams2-3/+15
Reviewed-by: Chuck Miller
2010-08-07Worked around a typo in the update script from version 7 to 8Thorbjørn Lindeijer2-2/+3
2010-08-07Also provide an update script for MySQLThorbjørn Lindeijer1-0/+3
2010-08-07Fixed index creation on mana_char_kill_stats tableThorbjørn Lindeijer3-2/+11
Reviewed-by: Philipp Sehmisch
2010-08-07Fixed typoThorbjørn Lindeijer1-1/+1
2010-08-07Revert "Added a method of updating the passwords of an existing database"Thorbjørn Lindeijer2-50/+0
Assumed to be no longer necessary. This reverts commit a09d4aa14c6a7b4486080b4cfbe1c76c4fae6fd2.
2010-08-07Renamed modifiedAttribute to updateDerivedAttributesThorbjørn Lindeijer6-17/+17
This describes the purpose of the method better.
2010-08-04Merge branch 'master' of gitorious.org:mana/manaservYohann Ferreira2-0/+21
2010-08-03Add sanity checks for hp when hp or max hp change.Freeyorp1-0/+6
Reviewed-by: Bertram.
2010-08-03Allow default values for attributes at character creation time.Freeyorp3-8/+41
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-02Fix enet version checkJared Adams2-13/+7
Tested-by: BaseBallBoy
2010-08-02Changed the stat file name to attributes.xml.Yohann Ferreira5-14/+20
I also made it required to start properly since it's now the case. Reviewed-by: Jaxad0127.
2010-08-02Add support for enet 1.3Jared Adams2-0/+27
Reviewed-by: Yohann Ferreira
2010-07-30Fixed a little mistake done in Monster::setAttribute.Yohann Ferreira1-4/+4
It was using at() for setting. Also I changed the unsigned int to int as the default returned was -1 in the MonsterManager::reload() function.