summaryrefslogtreecommitdiff
path: root/src/game-server
AgeCommit message (Collapse)AuthorFilesLines
2011-11-02Added @permissions commandErik Schilling1-18/+47
Added @permissions <character> which lists the permissions of a player. Made @givepermission giving feedback on success. Reviewed-by: Thorbjørn Lindeijer.
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 Lindeijer1-44/+12
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-01Merge github.com:mana/manaservYohann Ferreira6-20/+51
Conflicts: src/game-server/character.cpp src/scripting/lua.cpp
2011-10-23Made @money functional again.Erik Schilling1-6/+5
Reviewed-by: Thorbjørn Lindeijer.
2011-10-23Added function to determine the script engine by the file name extensionjurkan4-11/+41
Reviewed-by: Bjorn, Bertram.
2011-10-22Added a default skill id getter in the skill manager.Yohann Ferreira1-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.
2011-10-22Officially added the being gender to the protocol.Yohann Ferreira2-5/+19
Reviewed-by: o11c.
2011-10-22.find() -> .value due to recent API changes.Yohann Ferreira1-1/+1
2011-10-22Merge branch 'master' of github.com:mana/manaservYohann Ferreira4-5/+5
2011-10-20Return a const & from NameMap to avoid potential deep copiesThorbjørn Lindeijer4-5/+5
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 Ferreira11-349/+317
Conflicts: src/game-server/accountconnection.cpp
2011-10-19Have one place where the Logger is initializedThorbjørn Lindeijer1-18/+1
log_accountToStandardOutput and log_gameToStandardOutput have been merged together as log_toStandardOutput. 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-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-15Added script bindings for reading map objectsErik Schilling3-154/+124
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-28Started to fix the autoattack system.Yohann Ferreira4-46/+36
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 Ferreira1-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.
2011-09-28Officially added the being gender to the protocol.Yohann Ferreira2-5/+17
2011-09-28Merge github.com:mana/manaservYohann Ferreira4-14/+16
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-28Fixed the trigger area declared within map files.Yohann Ferreira1-1/+5
The bug was pretty generic, as the contains() method of the Rectangle class wasn't checking against left and top sides according to the client view point. I also documented the call site. Resolves: Mana-Mantis #317. Reviewed-by: o11c.
2011-09-28Small random code format cleanups, and documentation fixes.Yohann Ferreira4-78/+49
This doesn't change anything yet. Reviewed-by: o11c.
2011-09-15Added chatcommand to get position of a character.Erik Schilling1-0/+33
Add chatcommand @getpos <character> which return the mapid and location of the character. Part of: Mana-Mantis: #385. Reviewed-by: Bertram.
2011-09-13Avoid crashing the game server when the last argument is quoted.Yohann Ferreira1-1/+9
Resolves: Mana-Mantis #386 Reviewed-by: o11c.
2011-09-09Add persistent items support based on seeseekey's work.Yohann Ferreira3-9/+99
Also made some random changes where useful, including: - Code formatting fixes, - Design fix about the fact that only the game config option should be checked. - Fixed the size of the values sent and receive to follow the rest of the development. - Fixed variables names to make them show what they are, and not why they are used. Resolves: Mana-Mantis #142.
2011-09-08Merge github.com:mana/manaservYohann Ferreira1-1/+1
Conflicts: src/account-server/storage.cpp src/game-server/mapreader.cpp src/sql/mysql/createTables.sql
2011-09-05Added possibility for using monster name in SPAWN map objects.Erik Schilling1-14/+41
2011-09-04Added possibility for using monster name in SPAWN map objects.Erik Schilling1-14/+41
Reviewed-by: Bertram.
2011-09-02Prevented char from picking up items when inventory is full.Erik Schilling1-9/+14
Resolves: Mana-Mantis: #379. Reviewed-by: Bertram.
2011-09-01Added chatcommand to get position of a character.Erik Schilling1-0/+33
Add chatcommand @getpos <character> which return the mapid and location of the character. Part of: Mana-Mantis: #385.
2011-09-01Prevented char from picking up items when inventory is full.Erik Schilling1-9/+14
Resolves: Mana-Mantis: #379.
2011-08-30As requested, changed the trigger 'existence' to 'in-inventory'.Yohann Ferreira1-2/+2
2011-08-30Avoid crashing the game server when the last argument is quoted.Yohann Ferreira1-1/+9
Resolves: Mana-Mantis #386
2011-08-26Fixed mem leak on the item and monster manager unloading processYohann Ferreira3-3/+11
2011-08-26Rewrote the skill manager the same way as the item manager.Yohann Ferreira3-131/+169
This will permit better handling of both skills names and id. This is needed to start reworking on the auto-attack system.
2011-08-26Added a bit more precision on the conditions used in the ↵Yohann Ferreira2-2/+6
TriggerArea::update() function.
2011-08-26Fixed the trigger area declared within map files.Yohann Ferreira1-1/+5
The bug was pretty generic, as the contains() method of the Rectangle class wasn't checking against left and top sides according to the client view point. Resolves: Mana-Mantis #317.
2011-08-19Changed the sprite layer protocol to supportYohann Ferreira4-57/+64
an arbitrary number of layers. (up to 255).
2011-08-19Used the client base to make a final bugfix on the server code.Yohann Ferreira4-132/+147
Made the server handle only one slot type requirement since it's irrelevant to have more anyway. Plus, it simplifies the code for both equipping/unequipping. I also added a dagger to show how equipping/unequipping is working.
2011-08-18Change the unequip function to make use of the item instance id.Yohann Ferreira2-16/+14
It will make the client capable to tell which item is to be unequipped when there are several item equipped within a slot type, for instance. The client has now yet to be upgraded to follow the new protocol.
2011-08-18Fixed a crash when dealing with unknown equipped items.Yohann Ferreira1-1/+1
2011-08-11Basically redid equip and unequip functions().Yohann Ferreira2-154/+262
I made the system handle the fact that equipment item are completely unlinked to the inventory items. Equip items now have a unique itemInstance number permitting to equip the same item type multiple time when the slot capacity is wide enough to do so. I also prepared the functions to welcome in the near tests against scripted equipment. The equip process is known to be working server-side but the unequip process has yet to be reviewed, even if implemented.
2011-08-10Changed ItemEquipInfo to only be a pair of unsigned.Yohann Ferreira3-14/+12
Previously it was a list of pair ofunsigned int, used to get the equipment slot requirements. It didn't make sense as the ItemEquipsInfo was already a list of it. So you had to manage with a list of list and that ended up being irrelevant to the need. I had to disable the equip function to permit compilation. This will be fixed in my next commit.
2011-08-10Fixed getting slot id per name.Yohann Ferreira2-6/+20
2011-08-04Change the changeEquipment() function nameYohann Ferreira2-7/+7
to something more meaningful.