summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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.
2010-07-30Made the game-server compile again with CMake.Yohann Ferreira1-0/+8
2010-07-30Merge branch 'master' of gitorious.org:mana/manaservYohann Ferreira6-22/+173
Conflicts: src/game-server/itemmanager.cpp
2010-07-28Added back the forgotten Being::attackType enum in the server.Yohann Ferreira1-1/+15
It has to be in sync with the client, even now, and explains the return value of the Being::getAttackType() function.
2010-07-23Added a simple sanity check to avoid a gameserver crash at login.Yohann Ferreira1-5/+11
No review asked.
2010-07-23Fixing compatibility with cmake 2.6.0Renato Alves1-2/+2
The syntax IF ((condition) OR (condition)) is not accepted by cmake prior to 2.6.4. The patch should address this without affecting newer versions.
2010-07-22Upgraded Skill Map loading.Yohann Ferreira4-19/+151
- Added a new 'default' boolean parameter in mana-skills.xml. If set to true, unknown weapon types will be defaulted to the given value. - Added better checks on skill id and names and improved error reporting. - Corrected minor typos, and made small cleanups. Reviewed-by: jaxad0127
2010-07-10Add in stubs for scripted item effectsFreeyorp3-0/+41
2010-07-10New attribute system and major changes to many low-level areas.Freeyorp55-1929/+3389
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 Sehmisch16-30/+332
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-07-08Made Manaserv accept parameters enclosed with double-quotes.Yohann Ferreira1-3/+34
Reviewed-by: Jaxad0127. Resolves: Manasource-Mantis #22
2010-06-22Fixed the up down monster attack direction and comment trivial fixes.Philipp Sehmisch2-4/+4
Resolves: Manasource Mantis #144. Signed-off-by: Philipp Sehmisch <mana@crushnet.org>
2010-06-06Arbitrary cleanups and marked GameHandler::getClientByNameSlow constThorbjørn Lindeijer4-21/+18
2010-06-06More const correctness and small code cleanupsThorbjørn Lindeijer13-86/+65
2010-06-06Made methods of GuildManager const where appropriateThorbjørn Lindeijer2-42/+18
Also removed some pointless null pointer checks.
2010-06-06Made methods of the Guild class const where appropriateThorbjørn Lindeijer3-37/+24
2010-05-30Use XML::Document to automate memory cleanupThorbjørn Lindeijer11-153/+74
Makes the code a little nicer.
2010-05-30Copied basic Lua libs back from tmwserv-data and added dummy dataThorbjørn Lindeijer2-2/+4
The dummy data is currently mostly empty data though, so still nothing to see as far as the example content is concerned. Reviewed-by: Bertram
2010-05-29Use const std::string & to avoid a copyThorbjørn Lindeijer2-6/+5
2010-05-29Only skip the UTF-8 BOM for Lua scriptsThorbjørn Lindeijer11-49/+24
libxml2 should be able to handle files with a BOM fine. Reviewed-by: Bertram
2010-05-29Made the logLevel be taken from configuration for both servers.Yohann Ferreira2-51/+73
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-29Made disabling of HP regeneration during combat configurablePhilipp Sehmisch1-1/+2
Reviewed-by: Bertram
2010-05-28Added some more log infos, and made small cleanups.Yohann Ferreira7-34/+59
Reviewed-by: Thorbjorn, Jaxad0127
2010-05-28Modified the npc_trade() lua function to permit selling the whole player ↵Yohann Ferreira5-20/+133
inventory. It permits to open a sell box with every items in the player inventory as requested by Striker. Also added different return value support to both the buy selling functions, and made fixes where relevant. The test.lua script will be upgraded to show examples in a next commit. What's left to be done is to fix the inventory handling for both selling functions. (Sigh...) Concerns: Manasource mantis: #78, #101. Reviewed-by: Jaxad0127