summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2011-10-22Officially added the being gender to the protocol.Yohann Ferreira3-6/+32
Reviewed-by: o11c.
2011-10-22Added the chr_get_level script function.Yohann Ferreira1-0/+18
Reviewed-by: Ablu.
2011-10-22Added the chr_set_gender() script function.Yohann Ferreira1-0/+20
Reviewed-by: Ablu.
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-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-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-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-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.
2011-09-28Fixed the trigger area declared within map files.Yohann Ferreira2-3/+7
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 Ferreira5-79/+50
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-05Fixed size of mapid field in mysql database.Erik Schilling4-2/+16
Resolves: Mana-Mantis: #388. Reviewed-by: Bertram.
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-08-23Allowed map names in chr_warp function.Erik Schilling1-2/+6
Resolves: Mana-Mantis #293. Reviewed-by: Bertram.
2011-08-19Created function to make getting monsters easier in scripts.Erik Schilling3-14/+16
2011-08-18Added LUA function for changing anger of monsters.Erik Schilling1-0/+30
You now can change the anger of a monster to a being using mana.monster_change_anger(monster, being, anger) Resolves: Mana-Mantis #366.
2011-08-10login with random hashStefan Beller3-3/+66
The account server sends out a random number, which is additionally used for hashing the password. Reviewed by Bertram
2011-08-10Made chr_inv_count and npc_trade capable of taking a name or an id.Erik Schilling1-3/+36
Resolves: Mana-Mantis #318. Reviewed-by: Bertram.
2011-08-04Added new LUA functions used to get items and monster names.Erik Schilling1-0/+37
mana.monster_get_name(id) and mana.item_get_name(id) can be used to get the name of an item or a monster if only an id is given. Reviewed-by: Bertram.
2011-08-04Allowed names of items and monsters in scripts - part 1.Erik Schilling1-27/+63
You can now use either the name or the id of the item in the LUA functions chr_inv_change, monster_create, item_drop. Part of: Mana-Mantis #318. Reviewed-by: Bertram.
2011-08-03Unified the lua.cpp documentation.Yohann Ferreira1-162/+200
I also changed the chatmessage function to chat_message to follow the coding standard.
2011-08-03Added is_walkable lua function.Erik Schilling1-0/+30
mana.is_walkable(x, y) can now be used to check wether the pixel on the current map is walkable or not. Reviewed-by: Bertram.
2011-08-03Added monster_remove lua function.Erik Schilling1-0/+25
mana.monster_remove(monster) can now be used to remove a monster from a map. Resolves: Mana-Mantis #352. Reviewed-by: Bertram.
2011-08-03Added get_map_property lua function.Erik Schilling1-0/+24
mana.get_map_prpoperty(string) can now be used to read a property from a map file. String is the property name. Resolves: Mana-Mantis #353. Reviewed-by: Bertram.
2011-07-04Added new lua function for calculating distances.Ablu1-0/+32
You can now call mana.get_distance(being1, being2) or mana.get_distance(x1, y1, x2, y2) for calculating distances. Reviewed-by: Jaxad0127, Bertram. Resolves: Mana-Mantis #370.
2011-07-02Added LUA function get_beings_in_rectangle.Ablu1-0/+39
Reviewed-by: Bertram. Resolves: Mana-Mantis #369.
2011-06-27Added Lua function for logging.Ablu1-0/+16
You can now call mana.log(loglevel, message) to log messages with scripts. For loglevel you can use the new constants defined in libmana-constants.lua Resolves: Mana-Mantis #359
2011-06-24Fixed autoattacks basic handling.Yohann Ferreira4-15/+59
The server is now using the autoattacks system to perform damage based on the attack's timer. I also added a default bare knuckle attack when the character is unequipped. As a result, maggots can be killed again with bare hands now. Known issues left: This isn't tested against equipment changes for now, and the client isn't in sync with the attacks speed. Reviewed-by: Crush.
2011-06-19Making party invite functionalStefan Dombrowski7-192/+141
* An invite expires after 60 seconds. * For protection of the server memory each player can invite a maximum of 10 characters within the 60 second timeframe. Reviewed-by: Bjorn
2011-06-17Changed the attack message to send the attack id.Yohann Ferreira4-7/+8
This is more precise than sending the attack type, that can be guessed by the client anyway when the type parameter will be added in the <attack> tag. This is the server part of Mana issue: #363. Reviewed-by: Bjorn.
2011-06-14Fixing storing of changed passwordsStefan Dombrowski1-2/+2
Reviewed-by: Bertram
2011-06-02Fixed crash when handling unequipThorbjørn Lindeijer1-5/+13
* The 'itp' parameter is no longer simply ignored (seems to be a small optimization in Inventory::remove) * Avoid incrementing an invalid iterator, fixing a crash (problem found by Stefan Dombrowski) * Use the right inventory index in the call to changeEquipment, which previously was using "it", which would be equal to "it_end" there. Reviewed-by: Stefan Dombrowski
2011-05-30Routing party invite through the map serverStefan Dombrowski7-35/+82
The player sends party invites to the game server. If the invitee is within the visual range of the inviter, the game server forwards the invite to the chat server. Reviewed-by: Bjorn, Jaxad0127
2011-05-26Allow monsters to drop multiple itemsStefan Dombrowski2-27/+12
Before at most one item was droped and the sum of all probablilites was limited to 100%. Also in the example data drops are changed to existing items.
2011-05-26Fixing negative being positionsStefan Dombrowski1-1/+4
Reviewed-by: Jaxad0127
2011-05-17Fixed an item dupe bugAngelo Castellani1-4/+15
Listed: http://bugs.manasource.org/view.php?id=324 Reviewed-by: Yohann Ferreira Reviewed-by: Jared Adams
2011-05-16Starting to fix party inviteStefan Dombrowski3-9/+19
Reviewed-by: Bjorn
2011-05-15Removed unused variableThorbjørn Lindeijer1-3/+1
2011-05-15Fixed compile with GCC 4.6Thorbjørn Lindeijer2-1/+2
* Include cstddef to be able to use size_t * Replace NULL with 0 since NULL doesn't happen to be defined in any included header file
2011-05-01Renamed the mana-status-effects.xml to status-effects.xmlYohann Ferreira1-1/+1
In fact, the client never prefixed that file. Hence, the server doesn't have to.