summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Made sure the map is set for trigger scriptsErik Schilling2012-07-112-0/+2
| | | | | | Also unsetted maps after execution of scripts to make finding this mistakes easier. Reviewed-by: bjorn.
* Made kill count script bind capable of taking the monster name as argumentErik Schilling2012-07-101-2/+2
| | | | Reviewed-by: bjorn.
* Added bind for setting login callbackErik Schilling2012-07-084-0/+22
| | | | Reviewed-by: bjorn.
* Added script bind for getting specy id of a monster handleErik Schilling2012-07-071-0/+12
| | | | Reviewed-by: bjorn.
* Collisiondetection: Removing commented code.Stefan Beller2012-06-221-118/+0
| | | | Reviewed-by: Ablu
* Fixed handling of skillsErik Schilling2012-05-254-18/+10
| | | | | | | | | | | | | - 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.
* Removed no longer needed codeErik Schilling2012-05-202-24/+0
| | | | | | I forgot to remove this during my special cleanup Reviewed-by: bjorn.
* Don't send NPC text as fixed-length stringThorbjørn Lindeijer2012-05-061-3/+2
| | | | | | | | This is intended to be used only when the string length is known. The client was deriving the length from the remaining amount of data in the message, but that doesn't work in the new 'debug mode' of the protocol. Reviewed-by: Ben Longbons
* Some small optimizations in Lua helper functionsThorbjørn Lindeijer2012-05-061-6/+3
| | | | Reviewed-by: Ben Longbons
* Fixed type of returned value from MapReader::readMapThorbjørn Lindeijer2012-05-061-1/+1
| | | | GCC 4.7 warns about this, yay.
* Small GCC 4.7 compile fixThorbjørn Lindeijer2012-05-051-0/+1
| | | | | | Not entirely according to the standards since this is a C99 header, but that's better than not having it compile at all, or switching it entirely over to C++11 mode just now.
* Added debugging mode to the protocolThorbjørn Lindeijer2012-05-0512-99/+286
| | | | | | | | | | | | 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
* Fix compiler error in g++ (GCC) 4.7.0jurkan2012-05-011-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
* Fixed guild supportErik Schilling2012-04-1912-167/+251
| | | | | | | | | | | | | | | | | 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.
* Removed not needed trigger for specialupdate when INT attribute changed.Erik Schilling2012-04-181-4/+0
| | | | | | I removed this dependency a while ago. But forgot to remove this code. Reviewed-by: bjorn.
* Fixed compiler warning about non-virtual destructorThorbjørn Lindeijer2012-04-141-0/+2
| | | | | | | | None of the subclasses actually define a destructor that does anything, but this may change in the future. In any case it's good to get rid of the warning. Reviewed-by: Erik Schilling
* Introduced a Timeout class for counting down without countingThorbjørn Lindeijer2012-04-1412-142/+223
| | | | | | | | The timeout remembers a reference point of time against which it can check how much time is remaining. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
* Fixed issues with server behind routerErik Schilling2012-04-123-3/+11
| | | | | | Tested-by: jurkan. Reviewed-by: Bertram.
* Fixed Configuration::initialize() to return false when failing loadingErik Schilling2012-04-121-2/+2
| | | | Reviewed-by: Bertram.
* Adding monster::on_damage callbackStefan Beller2012-04-043-0/+33
| | | | Reviewed-by: bjorn
* Added mysql update script for the special commitErik Schilling2012-04-041-0/+11
| | | | | | Forgot to add this to git when doing the commit. Sorry. Reviewed-by: bjorn.
* Renamed Thing to EntityThorbjørn Lindeijer2012-04-0429-123/+121
| | | | | | | | 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
* CodeBlocks gameserver projectfile updatedPostremus2012-04-041-14/+36
| | | | | | Added scriptmanager.h, scriptmanager.cpp, specialmanager.h, specialmanager.cpp Reviewed-by: Ablu.
* Enhanced special supportErik Schilling2012-04-0426-199/+988
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Fixed Lua error reporting for NPC scriptsThorbjørn Lindeijer2012-03-301-3/+4
| | | | | | | | | | | | | | This was due to a naming conflict between the 'debug' function I had recently introduced and the 'debug' library provided by Lua. This caused problems when trying to use debug.traceback for printing a backtrace of the error. There's multiple ways to avoid the naming conflict. I opted for writing the related helper functions in all-caps. Also added an ERROR log function now. As Erik pointed out, there is no conflict anymore with Lua's 'error' function with the new naming style. Reviewed-by: Erik Schilling
* Some general cleanups and merged Being::perform() into update()Thorbjørn Lindeijer2012-03-269-129/+117
| | | | | | | | The main change here is to remove the separate calling of 'perform' on all beings, and rather rely on the beings to do whatever they were doing in that function when the virtual 'update' function is called. Reviewed-by: Yohann Ferreira
* Fixed restoring of persistent floor itemsThorbjørn Lindeijer2012-03-211-1/+1
| | | | | | | Only 1/4th of the floor items were being restored after a reboot of the game server. Reviewed-by: jurkan
* Fixed finding characters by nameThorbjørn Lindeijer2012-03-201-1/+1
| | | | | | | This was broken in ba66fbeda8ef9afb6c33eba66d109bac85ebf628 where we forgot to make sure to invert the condition when moving it into the function. Reviewed-by: Erik Schilling
* Made skill related function capable of taking the skill name as parameterErik Schilling2012-03-175-9/+43
| | | | Reviewed-by: bjorn.
* Added map update function, moved schedules there to keep map contextErik Schilling2012-03-175-44/+81
| | | | Reviewed-by: bjorn.
* Use the guild ID when setting guild member rightsThorbjørn Lindeijer2012-03-161-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
* Fixed remaining compiler warningsThorbjørn Lindeijer2012-03-166-11/+11
| | | | | | | These were unused parameters and one return type with an ignored 'const' qualifier. Reviewed-by: Yohann Ferreira
* Fixed Inventory::unequipItem functionThorbjørn Lindeijer2012-03-161-1/+1
| | | | | | | | Due to a misplaced semicolon, it always returned false after the first instance. This function is only used by the script function chr_unequip_item. Reviewed-by: Yohann Ferreira
* Fixed fastRemoveOne when the element isn't foundThorbjørn Lindeijer2012-03-161-1/+1
| | | | | | | For a non-empty vectors that did not contain the element to remove, the loop would go on forever because a size_t can't become smaller than 0. Fixed by simply iterating forwards.
* Fixed the version in the createTables.sql scriptsThorbjørn Lindeijer2012-03-163-6/+5
| | | | | | Forgot this in 1afbfb7e5fb5c133924ed8d376c6064575fc1c36. Reviewed-by: Bertram, Ablu.
* Fixed createTables scriptsErik Schilling2012-03-152-6/+6
|
* Updated enet to 1.3.3Thorbjørn Lindeijer2012-03-143-2/+10
| | | | The bugfix is not likely to affect us, but better to be up to date anyway.
* Added chr_kick() lua bindErik Schilling2012-03-141-2/+16
| | | | | | Another step towards scriptable @commands. Reviewed-by: bjorn.
* Added being_get_mapid lua bindErik Schilling2012-03-141-2/+18
| | | | | | Another step for being able to make @commands scriptable Reviewed-by: bjorn.
* Added get_character_by_name lua bindErik Schilling2012-03-145-48/+43
| | | | | | Step to be able to handle chatcommands by scripts. Reviewed-by: bjorn.
* Fixed problems with map-bound world state variablesThorbjørn Lindeijer2012-03-1310-64/+134
| | | | | | | | | | | | | | | | | | 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
* SQLite: Fixed SqLiteDataProvider::processSql handling of multiple rowsThorbjørn Lindeijer2012-03-131-5/+7
| | | | | | | | | | | When a prepared SQL statement would have returned multiple rows, this function would try to set the column header names multiple times which throws the AlreadySetException. Currently it doesn't seem that any prepared statements are meant to return multiple rows. Reviewed-by: Yohann Ferreira
* Added some convenience wrappers to libmana.luaThorbjørn Lindeijer2012-03-131-0/+25
| | | | | | | | | | | Global functions 'warn', 'info', 'debug' as shortcuts to the respective 'log' call, which also support passing multiple parameters at the same time, which will be separated by spaces. Global tables 'map' and 'world' which provide convenient read/write access to map and world state variables. Reviewed-by: Yohann Ferreira
* Fixed initial sending of global world variables to the game serverThorbjørn Lindeijer2012-03-131-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
* Added script bind to set walkmask for beingsErik Schilling2012-03-139-28/+63
| | | | | | TODO: Inform client about this change. Reviewed-by: bjorn.
* Removed "mana." from script function documentationThorbjørn Lindeijer2012-03-111-102/+99
| | | | Forgot to do this in the previous commit.
* Converted two Lua scripts from DOS to UNIX line endingsThorbjørn Lindeijer2012-03-112-132/+132
|
* Register Lua script API functions into the global namespaceThorbjørn Lindeijer2012-03-1119-224/+225
| | | | | | | | Scripts mostly execute the Mana script API, and it seems like just unnecessary verbosity to refer to the 'mana' table all the time. This table no longer exists now. Reviewed-by: Erik Schilling
* Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer2012-03-1113-119/+165
| | | | | | | | | | | | When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
* Removed deprecated NPC helper functionsThorbjørn Lindeijer2012-03-119-77/+68
| | | | Reviewed-by: Erik Schilling