summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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-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-18Merge git://gitorious.org/~bertram/mana/manaserv-equipment-fix into ↵Yohann Ferreira3-19/+17
equipment-fix
2011-08-18Change the unequip function to make use of the item instance id.Yohann Ferreira3-18/+16
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-11Merge branch 'master' of ↵Yohann Ferreira17-1137/+1189
git://gitorious.org/~bertram/mana/manaserv-equipment-fix into equipment-fix Conflicts: src/common/manaserv_protocol.h
2011-08-11Basically redid equip and unequip functions().Yohann Ferreira4-156/+270
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-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-04Change the changeEquipment() function nameYohann Ferreira2-7/+7
to something more meaningful.
2011-08-04Merge branch 'master' of git://gitorious.org/mana/manaservYohann Ferreira1-27/+100
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-04Merge branch 'master' of git://gitorious.org/mana/manaservYohann Ferreira1-159/+276
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-27Reworked the way equip slot info are loaded in a more logical way.Yohann Ferreira4-70/+83
2011-07-27Reviewed the removeFromSlot() function, fixing the unequip triggerYohann Ferreira1-5/+16
2011-07-27Fixed and completed the move() function.Yohann Ferreira2-22/+70
Moving and splitting items in the inventory window should be much more responsive now.
2011-07-27Reviewed the Inventory::remove() function.Yohann Ferreira2-9/+17
The unecessary equipment check was already removed, but the now useless force parameter is now also removed.
2011-07-27Reviewed the Inventory::insertion function.Yohann Ferreira1-5/+16
2011-07-27Finished the inventory check, by dropping itemsYohann Ferreira1-3/+19
in oversized inventories.
2011-07-27First revision of the Inventory::initialize() code.Yohann Ferreira1-26/+38
The inventory part is done. The equipment one will only handle equipment triggers for now.
2011-07-27Forgot to update the gamehandler.cpp file.Yohann Ferreira1-8/+8
2011-07-27Changed the protocol a bit to use int16 instead of 8.Yohann Ferreira2-449/+449
This is in preparation of fixes for issues: #373, and 379. Equip and inventory related packets are the only ones changed.
2011-07-27Begun Applying the new equipment slot handling design.Yohann Ferreira8-89/+117
now, the equipment slots are independant from the inventory slots according to the inventory and equipment data. This will permit to avoid checking the equipment each time one touches the inventory and vice versa, and make the former delayed mode useless. Also, note that equipped items will be removed from inventory and readded once unequipped. The design will permit the following, even if not implemented yet: - To make equipment items stackable again, if wanted. - Have more than one item with the same id equipped on different slots using the itemInstance field. Note: I didn't add the database structure updates yet, to see whether other changes may later go along with those.
2011-07-27Removed the inventory delay mode for now.Yohann Ferreira4-282/+90
I said I wouldn't do it, but I change my mind. Here is why: The delay mode is used in the trading code, and in the inventory code for lua only. In the lua part, the delay mode is useless as it is used only when the script is requesting removal of more items than owned. This is something that can't be handled well anyway, as for the script part, even when the character was still keeping its items. Plus, it's not actually an error, IMHO. In the trading code, it made sense. But the next commit will bring design changes making the inventory items and the equipment items not linked anymore. Hence, making it impossible to trade equipped items, for instance, which is a good thing IMHO. It will also remove the need of a delayed inventory mode in that case. The two cases where it is used will disappear, making it useless. Last but no least, the part watching for equipment changes in the commit() function is not something easy to debug without first having a proper and working base. (checking of two multimaps changes, for instance). We can add it back once the code has been fully debugged for the most skilled among us. And yes, I am sure of what I'm currently doing. For now the whole inventory and trading code is in need of review but it already was, anyway.
2011-07-27Small random code format cleanups, and documentation fixes.Yohann Ferreira5-79/+50
This doesn't change anything yet.
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.
2011-05-01Changed the server to look for the skills.xml file.Yohann Ferreira1-1/+1
This, instead of the mana-skills.xml file, to follow latest client changes.
2011-04-27Added a simple crafting systemPhilipp Sehmisch6-0/+143
A client can craft something using the @craft command. The command needs a list of item names and amounts. The gameserver checks if the character has these items in the inventory and then passes the list together with the character handle to the lua script function on_craft in the script file scripts/crafting.lua. This function can then be used to evaluate if the list is a valid crafting combination and when this is the case take or give items. Implemented two example crafting scripts there, one which enforces exact item order and amount and one which doesn't. Both are disabled per default and one needs to be enabled by uncommenting a line. Also gave the player group permission to use the @craft command in permissions.xml and added two new items (wood and iron) required for the example crafting combination. Resolves: #333 Reviewed-by: bcs86, Bertram