summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-21Allow includes in configuration file.Erik Schilling1-6/+35
You can now use <include file="myconfig.xml" /> to include a configuration file into the main configuration. Reviewed-by: Bjorn.
2011-11-13Added the background parameter values to the equip.xml file.Yohann Ferreira1-10/+10
Reviewed-by: Thorbjorn Lindeijer
2011-11-12Prevented the equipment to remove the item when something went wrong.Yohann Ferreira1-10/+12
Reviewed-by: Thorbjorn Lindeijer.
2011-11-12Made the server warn the player when equip/unequip failed.Yohann Ferreira1-4/+15
Reviewed-by: Erik Schilling
2011-11-07Removed unused singleton templateThorbjørn Lindeijer2-72/+0
Looks unlikely that we'll be using this. Anyway, it can be found in the git history if so. Reviewed-by: Yohann Ferreira
2011-11-07Merged three global script states into oneThorbjørn Lindeijer9-68/+62
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
2011-11-07Small cleanups in utils::TimerThorbjørn Lindeijer4-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
2011-11-02Added @permissions commandErik Schilling2-18/+48
Added @permissions <character> which lists the permissions of a player. Made @givepermission giving feedback on success. Reviewed-by: Thorbjørn Lindeijer.
2011-11-01Removed some superfluous new character initializationsThorbjørn Lindeijer1-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
2011-11-01Removed the inventory checkThorbjørn Lindeijer1-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
2011-11-01Have one place where the Configuration is initializedThorbjørn Lindeijer4-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
2011-11-01Renamed the db update 15 to 18 as requested by Bjorn.Yohann Ferreira5-6/+6
2011-11-01Merge github.com:mana/manaservYohann Ferreira14-23/+73
Conflicts: src/game-server/character.cpp src/scripting/lua.cpp
2011-11-01dos2unix src/common/manaserv_protocol.hYohann Ferreira1-448/+448
2011-10-26End the confusion about the missing upgrade scriptThorbjørn Lindeijer2-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
2011-10-23Made @money functional again.Erik Schilling1-6/+5
Reviewed-by: Thorbjørn Lindeijer.
2011-10-23Add jurkan to AUTHORS file.seeseekey1-0/+1
2011-10-23Added function to determine the script engine by the file name extensionjurkan6-11/+60
Reviewed-by: Bjorn, Bertram.
2011-10-22Added a default skill id getter in the skill manager.Yohann Ferreira2-1/+5
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.
2011-10-22Fixed the get_level doxygen documentation.Yohann Ferreira1-1/+1
Thanks to Ablu.
2011-10-22Officially added the being gender to the protocol.Yohann Ferreira4-6/+33
Reviewed-by: o11c.
2011-10-22Added the chr_get_level script function.Yohann Ferreira2-0/+19
Reviewed-by: Ablu.
2011-10-22Added the chr_set_gender() script function.Yohann Ferreira1-0/+20
Reviewed-by: Ablu.
2011-10-22.find() -> .value due to recent API changes.Yohann Ferreira1-1/+1
2011-10-22Merge branch 'master' of github.com:mana/manaservYohann Ferreira5-7/+13
2011-10-20Return a const & from NameMap to avoid potential deep copiesThorbjørn Lindeijer5-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
2011-10-19Merge branch 'master' of github.com:mana/manaservYohann Ferreira22-392/+540
Conflicts: src/game-server/accountconnection.cpp
2011-10-19Synced the manaserv.xml.example file with latest changesYohann Ferreira1-0/+5
on the log system.
2011-10-19Have one place where the Logger is initializedThorbjørn Lindeijer4-38/+21
log_accountToStandardOutput and log_gameToStandardOutput have been merged together as log_toStandardOutput. Reviewed-by: Yohann Ferreira
2011-10-19Added license header templateThorbjørn Lindeijer1-0/+20
Should be used when adding new files. Rather than individual copyright on files, the Mana server will use the same copyright everywhere. Reviewed-by: Yohann Ferreira
2011-10-19Took interpreting the objects out of the map readerThorbjørn Lindeijer8-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
2011-10-19Prevent server crash by not having beings talk after spawn for nowThorbjørn Lindeijer1-7/+12
At the moment it is the responsibility of the script to make sure any references to beings passed into script functions are valid. This means you can't schedule delayed scripts like the one making maggots say 'Roaaarrrr!!!', since the being might have been removed before the script gets executed. In the case of this bug the maggots are removed by some script code testing 'mana.monster_remove'. We should of course fix the way actor handles are used in Lua so that scripts can't end up crashing the server. Mantis-issue: 384 Reviewed-by: Yohann Ferreira
2011-10-19Removed inappropriate assignment to mOld in Being::findPathThorbjørn Lindeijer1-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
2011-10-19Mention MySQL as an optional dependencyThorbjørn Lindeijer1-4/+10
Reviewed-by: Ablu
2011-10-19Made get_beings_in_circle capable of taking a being as argument.Erik Schilling1-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.
2011-10-15Added script bindings for reading map objectsErik Schilling6-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
2011-09-29Don't log private chat messages.Yohann Ferreira1-8/+0
This is against privacy rules of most servers anyway. Resolves: Mana-Mantis #392.
2011-09-28Started to fix the autoattack system.Yohann Ferreira5-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.
2011-09-28Added a default skill id getter in the skill manager.Yohann Ferreira2-1/+5
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.
2011-09-28Fixed the items.xml fileYohann Ferreira1-14/+17
The file is now setting the correct attack for the given weapons. I also updated the auto attack parameter to correspond the ones needed in the code.
2011-09-28Added the chr_set_gender() script function.Yohann Ferreira1-0/+20
2011-09-28Officially added the being gender to the protocol.Yohann Ferreira3-5/+29
2011-09-28Added the chr_get_level script function.Yohann Ferreira2-0/+19
2011-09-28Merge github.com:mana/manaservYohann Ferreira5-16/+18
Conflicts: src/game-server/inventory.cpp src/game-server/inventory.h src/game-server/item.h src/game-server/main-game.cpp src/game-server/skillmanager.cpp src/utils/point.h
2011-09-28Clarified the role of initialize() and reload() functions in the monsterYohann Ferreira2-6/+8
and item managers. ack-by: o11c. note: The managers still need to auto deinit when already loaded. This will be done in another trivial commit.
2011-09-28Fixed mem leak on the item and monster manager unloading processYohann Ferreira3-8/+16
Reviewed-by: o11c. Note: the initialize/reload() api problem will be fixed in another commit.
2011-09-28Added a bit more precision on the conditions used in the ↵Yohann Ferreira2-2/+6
TriggerArea::update() function.
2011-09-28Rewrote the skill manager the same way as the item manager.Yohann Ferreira2-128/+149
This will permit better handling of both skills names and id. This is needed to start reworking on the auto-attack system.
2011-09-28Turned the skill manager into a class.Yohann Ferreira3-7/+24
Ack-by: o11c.
2011-09-28Made the npc_create() function use insertion enqueueing.Yohann Ferreira1-4/+1
As the server was exitting when the insertion was failing anyway, and because the GameState::update() doesn't allow actor insertion while the update process, it was then pretty weird to not use an enqueued insertion for it. Plus, it fixes an assertion failure when scheduling an npc creation. Resolves: Mana-Mantis #360. Reviewed-by: o11c.