summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed use of checkstring method in the script functionsErik Schilling2012-01-251-4/+7
| | | | | | luaL_checkstring might not return so the destructor of string will not be called. Reviewed-by: Bjorn.
* Added announce(text [, sender]) lua functionErik Schilling2012-01-221-4/+18
| | | | | | | The function will cause a global announcement. If no sender ist set "Server" will be used. Reviewed-by: Bjorn.
* Removed logging of chatErik Schilling2012-01-222-15/+0
| | | | Reviewed-by: Bertram
* Made @announce fully functionalErik Schilling2012-01-215-47/+40
| | | | | | | - Added announcements having senders now. - Removed /announcement support. Reviewed-by: Bjorn.
* Added the chr_get_inventory and chr_get_equipment functions.Yohann Ferreira2012-01-181-0/+137
| | | | | | | | | | | Those will make the scripters able to get a full view of the current player's possessions. Use with care. + Fixes following Ablu's review. Resolves: Mana-Mantis #207. Reviewed-by: Ablu
* Fixed the chr_inv_count function to handle equipment.Yohann Ferreira2012-01-183-16/+48
| | | | | | | | | | | | | | | the function can now count in the inventory and/or the player's equipment. I also fixed the script function and added a use case in the example map. + Fixes after Ablu's review. + 2nd fix after Ablu's review: Fix the inventory remove behaviour. Resolves: Mana-Mantis #288 Reviewed-by: Ablu
* Made the lua item_drop script function returns whether it succeeded.Yohann Ferreira2012-01-161-4/+4
| | | | | | Part of Mana-Mantis #339. Reviewed-by: Ablu
* Added several script warnings on errors.Yohann Ferreira2012-01-161-7/+10
| | | | | | As requested by Ablu. Reviewed-by: Ablu.
* Made the game server execute the chr_respawn_accept script evenYohann Ferreira2012-01-104-19/+52
| | | | | | | | | | | | | | | | | | | in case of disconnection. I made the Character::disconnected() function handle that case, permitting also to centralize GameState::remove() calls there. I also made the GameState::enqueueWarp() function test whether the Character pointer is about to be deleted, so that the warp can be handled directly to avoid a crash. Last but not least, I also made the Character::update() function not update the Character specials and hp to avoid discrepancies seen in the client. Resolves: Mana-Mantis #309. Reviewed-by: Ablu.
* Random small fixes linked to lua c++ scripting functions.Yohann Ferreira2012-01-101-10/+39
| | | | Reviewed-by: Ablu
* Added unequip lua script functions.Yohann Ferreira2012-01-103-0/+111
| | | | | | | | | | You can unequip using the slot or an item id. + Fixes from Ablu's review. Resolves: Mana-Mantis #350. Reviewed-by: Ablu.
* Added equip lua script functions.Yohann Ferreira2012-01-103-1/+87
| | | | | | | | | | One per inventory slot, one per item id or name. + Fixes from 2 Ablu's reviews. Reviewed-by: Ablu. 1st part of Mana-Mantis #339, 350.
* Fixed code not getting executed since it was behind a returnErik Schilling2012-01-031-1/+1
| | | | Reviewed-by: o11c.
* Made all beings capable of having a genderErik Schilling2012-01-0212-44/+91
| | | | Reviewed-by: o11c, bjorn, Bertram.
* Added @skills command which lists all skillsErik Schilling2011-12-041-0/+41
| | | | Reviewed-by: o11c.
* Allowed larger item amounts for mysql database.Erik Schilling2011-12-035-4/+20
| | | | | | | Changed range of amount to unsigned int(10). Sqlite update scripts is empty since no change was required here. Reviewed-by: Bertram.
* Allow includes in configuration file.Erik Schilling2011-11-211-6/+35
| | | | | | | You can now use <include file="myconfig.xml" /> to include a configuration file into the main configuration. Reviewed-by: Bjorn.
* Prevented the equipment to remove the item when something went wrong.Yohann Ferreira2011-11-121-10/+12
| | | | Reviewed-by: Thorbjorn Lindeijer.
* Made the server warn the player when equip/unequip failed.Yohann Ferreira2011-11-121-4/+15
| | | | Reviewed-by: Erik Schilling
* Removed unused singleton templateThorbjørn Lindeijer2011-11-071-71/+0
| | | | | | | Looks unlikely that we'll be using this. Anyway, it can be found in the git history if so. Reviewed-by: Yohann Ferreira
* Merged three global script states into oneThorbjørn Lindeijer2011-11-077-68/+38
| | | | | | | | | | | | | | | | | These scripts could trivially share one script state, since the methods called on them from the server are not overlapping. This does leave them open to access each other's global variables, but that's the problem with global variables. The one remaining global script file name is now configurable, so that it may also be set to a script in a different scripting language. The two related script options are: script_mainFile (default: scripts/main.lua) script_defaultEngine (default: lua) - renamed from defaultScriptEngine Reviewed-by: jurkan Reviewed-by: Yohann Ferreira
* Small cleanups in utils::TimerThorbjørn Lindeijer2011-11-074-21/+21
| | | | | | | | * Not nice to pass boolean parameter to constructor for preventing the timer from running on creation. Just call 'start' on it explicitly. * getTimeInMillisec could be made static. Reviewed-by: Yohann Ferreira
* Added @permissions commandErik Schilling2011-11-021-18/+47
| | | | | | | Added @permissions <character> which lists the permissions of a player. Made @givepermission giving feedback on success. Reviewed-by: Thorbjørn Lindeijer.
* Removed some superfluous new character initializationsThorbjørn Lindeijer2011-11-011-13/+0
| | | | | | | | | | The level, character points and correction points are already initialized by the Character constructor. The ATTR_GP attribute is either not present, or obtained default value from mDefaultAttributes. In both cases it makes no sense to set it to 0. Reviewed-by: Yohann Ferreira
* Removed the inventory checkThorbjørn Lindeijer2011-11-011-46/+0
| | | | | | | | | | | | We can't arbitrarily remove inventory items on initialization, and shouldn't have to, because what's in the DB was correct when it was stored. Also, there should be no need to check the inventory after inserting items, since the insert method should already make sure not to insert items when there is no space. Reviewed-by: Yohann Ferreira
* Have one place where the Configuration is initializedThorbjørn Lindeijer2011-11-014-94/+39
| | | | | | | | Also, removed the fallback to the standard config file path when a config file path is specified on the command line. Surely that's not what you would want to happen. Reviewed-by: Yohann Ferreira
* Renamed the db update 15 to 18 as requested by Bjorn.Yohann Ferreira2011-11-015-6/+6
|
* Merge github.com:mana/manaservYohann Ferreira2011-11-0112-23/+71
|\ | | | | | | | | | | Conflicts: src/game-server/character.cpp src/scripting/lua.cpp
| * End the confusion about the missing upgrade scriptThorbjørn Lindeijer2011-10-262-0/+0
| | | | | | | | | | | | | | | | Version 15 was skipped, and we'll never go back. Renamed the 15_to_16 update scripts to 14_to_16 to avoid confusing everybody who wants to update their DBs. Reviewed-by: Yohann Ferreira
| * Made @money functional again.Erik Schilling2011-10-231-6/+5
| | | | | | | | Reviewed-by: Thorbjørn Lindeijer.
| * Added function to determine the script engine by the file name extensionjurkan2011-10-236-11/+60
| | | | | | | | Reviewed-by: Bjorn, Bertram.
| * Added a default skill id getter in the skill manager.Yohann Ferreira2011-10-221-0/+4
| | | | | | | | | | | | | | | | I also added a link to the skillmanager object in its header file. This will later be used to get info from elsewhere than the server main loop. Reviewed-by: Bjorn.
| * Fixed the get_level doxygen documentation.Yohann Ferreira2011-10-221-1/+1
| | | | | | | | Thanks to Ablu.
| * Officially added the being gender to the protocol.Yohann Ferreira2011-10-223-6/+32
| | | | | | | | Reviewed-by: o11c.
| * Added the chr_get_level script function.Yohann Ferreira2011-10-221-0/+18
| | | | | | | | Reviewed-by: Ablu.
| * Added the chr_set_gender() script function.Yohann Ferreira2011-10-221-0/+20
| | | | | | | | Reviewed-by: Ablu.
* | dos2unix src/common/manaserv_protocol.hYohann Ferreira2011-11-011-448/+448
| |
* | .find() -> .value due to recent API changes.Yohann Ferreira2011-10-221-1/+1
| |
* | Merge branch 'master' of github.com:mana/manaservYohann Ferreira2011-10-225-7/+13
|\|
| * Return a const & from NameMap to avoid potential deep copiesThorbjørn Lindeijer2011-10-205-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | When I introduced NameMap it was only used with pointers, but now it is also used with std::string so it probably makes sense to keep a default- constructed value around so that a reference can be returned rather than a copy. NameMap::find was renamed to NameMap::value to make it more clear that it doesn't return an iterator, like std::map::find. Reviewed-by: Yohann Ferreira Reviewed-by: Ben Longbons
* | Merge branch 'master' of github.com:mana/manaservYohann Ferreira2011-10-1918-381/+493
|\| | | | | | | | | Conflicts: src/game-server/accountconnection.cpp
| * Have one place where the Logger is initializedThorbjørn Lindeijer2011-10-194-38/+21
| | | | | | | | | | | | | | log_accountToStandardOutput and log_gameToStandardOutput have been merged together as log_toStandardOutput. Reviewed-by: Yohann Ferreira
| * Took interpreting the objects out of the map readerThorbjørn Lindeijer2011-10-198-216/+229
| | | | | | | | | | | | | | The map reader is now only concerned with parsing the XML, whereas the MapComposite turns some of the objects into Warps, Spawns and NPCs. Reviewed-by: Yohann Ferreira
| * Removed inappropriate assignment to mOld in Being::findPathThorbjørn Lindeijer2011-10-191-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | Being::findPath doesn't change the position of a being, and so should not be syncing mOld to the current position. When invoked on the wrong moment, this could cause MapComposite::update to fail to realize that a being has moved into another zone. Also removed some other usages of mOld that were not necessary, to make its purpose clearer and make a potential cleanup easier. Reviewed-by: Yohann Ferreira
| * Made get_beings_in_circle capable of taking a being as argument.Erik Schilling2011-10-191-3/+16
| | | | | | | | | | Instead of giving the x, y coordinates of the circle you can give a being which is in the center of the circle.
| * Added script bindings for reading map objectsErik Schilling2011-10-156-155/+264
| | | | | | | | | | | | | | | | | | | | | | map_get_objects([string filter]): returns all object of the current map optionally filtered by type. map_get_object_property(handle object, string key): returns the value of the property of the object. map_get_object_bounds(handle object): returns x, y, width, height of an object. map_get_object_name(handle object): returns name of an object. map_get_object_type(handle object): returns type of an object. Mantis-issue: 397 Reviewed-by: Thorbjørn Lindeijer
| * Don't log private chat messages.Yohann Ferreira2011-09-291-8/+0
| | | | | | | | | | | | This is against privacy rules of most servers anyway. Resolves: Mana-Mantis #392.
* | Started to fix the autoattack system.Yohann Ferreira2011-09-285-46/+47
| | | | | | | | | | | | | | | | I simply made the default autoattack look for the default skill and add exp to it when killing monsters. Now the player can earn xp again even if it's not well handled between two logins.
* | Added a default skill id getter in the skill manager.Yohann Ferreira2011-09-281-0/+4
| | | | | | | | | | | | I also added a link to the skillmanager object in its header file. This will later be used to get info from elsewhere than the server main loop.
* | Added the chr_set_gender() script function.Yohann Ferreira2011-09-281-0/+20
| |