summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2012-07-17Merge branch 'master' into lpc2012Erik Schilling1-0/+1
Conflicts: src/game-server/character.h
2012-07-17Added lua bind to send text effect particle to clientsErik Schilling1-0/+1
Change is tested. Reviewed-by: bjorn.
2012-07-07Work on (Auto)Attack system.Erik Schilling1-9/+40
During the implementation bjorn and I agreed to limit the number of attacks that can be used in the same tick to one. This makes a lot of stuff easier and the client cannot display two frames at the same time Things done: - Implemented setting of attacks when equipping/unequipping items - Single place where the xml attack node is parsed - Finished attack logic - Unified the attack handling of monsters and characters - Added a global cooldown after attack use (not only for next use of same attack) - Removed the temponary attributes for the monster attack values - Priorities for all attacks - Rewrote the attack core: - Attacks now have this attributes: - warmup -> time a attack needs after starting it to actually deal the damage - cooldown -> time a attack needs after dealing damage before another attack can be used - reuse -> time before the same attack can be used again - If no attack is performed at the moment the following is done: - make a list with all ready attacks - check for attack that has the necessarily range and highest priority - start this attack (inform client about it) - when warmup is finished -> trigger damage - when cooldown is finished -> allow to use other (or the same if reusetimer allows) attacks TODO: - sync client with this to allow better timed animations
2012-07-07Rename AutoAttack to AttackErik Schilling1-1/+1
2012-05-25Fixed handling of skillsErik Schilling1-1/+1
- Removed possibility of skills getting mixed with attributes - Made the server sending the level of the current skill on exp change (currently the client could calculate it itself, but it allows more flexibillity in future this way) - Fixed reading of skills out of the database (for some reason the status effects were added as skills) ** Needs clientside patch as well (coming soon) ** Reviewed-by: Bertram.
2012-05-05Added debugging mode to the protocolThorbjørn Lindeijer1-5/+18
Allows inspection of message data. It is off by default since it consumes additional bandwidth, but it can be turned on using the net_debugMode option in manaserv.xml. Currently the option only affects outgoing data for each host individually. In particular, enabling this debug mode for the server does not automatically make the client annotate its messages. Reviewed-by: Erik Schilling
2012-04-19Fixed guild supportErik Schilling1-2/+4
List of things fixed: - fixed having multiple guild support everywhere - implemented kick code (untested due to missing kick possiblity in client) - fixed giving owner rights to next member when owner leaves guild - fixed potentional segmention fault when trying to access deleted guild after all members left - fixed saving right changes to database - made searching for guilds faster a bit (at least when having many guilds) TODO: + Fix conflict between guild and normal channels + Fix being able to leave guild channel without leaving guild itself + Add kick possiblity to client Reviewed-by: bjorn.
2012-04-12Fixed Configuration::initialize() to return false when failing loadingErik Schilling1-2/+2
Reviewed-by: Bertram.
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-3/+3
In preparation for using an entity/component system for the entities in the game world, this name will be more recognizable and easier to talk about. Reviewed-by: Yohann Ferreira
2012-04-04Enhanced special supportErik Schilling1-2/+3
- Made the current charge being saved. - Added script binds: - chr_set_special_recharge_speed - chr_get_special_recharge_speed - chr_set_special_mana - chr_get_special_mana - get_special_info - Added special info lua class. Functions: - name - needed_mana - rechargeable - on_use - on_recharged - category Further the engine no longer sets charge to 0 after using of specials this allows more flexbilillity (like failing specials). Changes on the xml database: - recharge renamed to rechargeable (needed by client and server) - needed - the needed mana to trigger a special (server only) - rechargespeed - the defailt recharge speed in mana per tick (server only) - target - the type of target (either being or point) (server and client) I also made the lua engine pushing nil instead of a 0 light userdata when the pointer was 0. Database update needed. Change is tested. Mana-Mantis: #167, #156 Reviewed-by: bjorn.
2012-03-13Fixed problems with map-bound world state variablesThorbjørn Lindeijer1-1/+1
Due to a wrong primary key, which covered only the state name, it was impossible to use the same state name on different maps. This has now been fixed. Another problem was that the map variables were being included in the global variables, because the related database query did not filter on the map_id column properly. While fixing that, the map_id column now allows explicitly marking a state variable as global (with the value 0) or system variables (with the value -1). System variables are currently not accessible from scripts, but that could be changed later. Reviewed-by: Yohann Ferreira Reviewed-by: Erik Schilling
2012-03-11Removed the create_npc wrapper and the last two NPC callbacksThorbjørn Lindeijer1-2/+2
When creating an NPC, you now provide its optional talk and update functions directly rather than them being stored in a table on the Lua side and then called in response to a global callback. Also fixed an issue with a missing gender parameter to the delayed NPC creation callback used by NPCs defined on the map (found by Erik while reviewing this patch). Reviewed-by: Erik Schilling
2012-02-25Merged the example client and server dataThorbjørn Lindeijer1-6/+3
It's easier to just talk about world data and to modify it as a whole. If there is really a need to separate it, a project can still choose to do that (and in whatever suitable way). There is no need to enforce this separation or to do it in our example. Reviewed-by: Erik Schilling
2012-02-02Added a way to specify the min and max attributes values.Yohann Ferreira1-32/+0
This can now be done in attributes.xml through the minimum and maximum attribute parameters. I also changed the AttributeInfo struct as requested by bjorn. Reviewed-by: Erik Schilling, Thorbjørn Lindeijer
2012-01-21Made @announce fully functionalErik Schilling1-2/+2
- Added announcements having senders now. - Removed /announcement support. Reviewed-by: Bjorn.
2012-01-02Made all beings capable of having a genderErik Schilling2-2/+39
Reviewed-by: o11c, bjorn, Bertram.
2011-12-03Allowed larger item amounts for mysql database.Erik Schilling1-1/+1
Changed range of amount to unsigned int(10). Sqlite update scripts is empty since no change was required here. Reviewed-by: Bertram.
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-01Have one place where the Configuration is initializedThorbjørn Lindeijer2-6/+15
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 Ferreira1-1/+1
2011-11-01Merge github.com:mana/manaservYohann Ferreira1-2/+0
Conflicts: src/game-server/character.cpp src/scripting/lua.cpp
2011-11-01dos2unix src/common/manaserv_protocol.hYohann Ferreira1-448/+448
2011-10-22Officially added the being gender to the protocol.Yohann Ferreira1-1/+13
Reviewed-by: o11c.
2011-09-28Started to fix the autoattack system.Yohann Ferreira1-0/+11
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-28Officially added the being gender to the protocol.Yohann Ferreira1-0/+12
2011-09-28Small random code format cleanups, and documentation fixes.Yohann Ferreira1-1/+1
This doesn't change anything yet. Reviewed-by: o11c.
2011-09-09Add persistent items support based on seeseekey's work.Yohann Ferreira1-2/+4
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-08-30Made the db version an official pre-requisite.Yohann Ferreira1-1/+4
It was uneasy to not miss something when updating the db. And as the db version is somewhat corresponding to a certain protocol version, adding it in the protocol file sounds relevant to me, and helps when updating it.
2011-08-19Merge git://gitorious.org/~bertram/mana/manaserv-equipment-fix into ↵Yohann Ferreira2-20/+3
equipment-fix Conflicts: example/serverdata/scripts/maps/desert.lua
2011-08-19Removed the now useless SpriteLayer enum from the protocol.Yohann Ferreira1-17/+0
2011-08-19Changed the sprite layer protocol to supportYohann Ferreira1-2/+2
an arbitrary number of layers. (up to 255).
2011-08-19Used the client base to make a final bugfix on the server code.Yohann Ferreira1-1/+1
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-18Merge git://gitorious.org/~bertram/mana/manaserv-equipment-fix into ↵Yohann Ferreira1-2/+2
equipment-fix
2011-08-18Change the unequip function to make use of the item instance id.Yohann Ferreira1-2/+2
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-11Merge branch 'master' of ↵Yohann Ferreira2-453/+495
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 Ferreira2-2/+8
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-10login with random hashStefan Beller1-0/+2
The account server sends out a random number, which is additionally used for hashing the password. Reviewed by Bertram
2011-07-27Changed the protocol a bit to use int16 instead of 8.Yohann Ferreira1-445/+445
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 Ferreira1-5/+41
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-27Small random code format cleanups, and documentation fixes.Yohann Ferreira1-1/+1
This doesn't change anything yet.
2011-06-19Making party invite functionalStefan Dombrowski1-6/+4
* 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 Ferreira1-1/+1
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-05-30Routing party invite through the map serverStefan Dombrowski1-3/+5
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-16Starting to fix party inviteStefan Dombrowski1-2/+2
Reviewed-by: Bjorn
2011-04-18Made the server send the being position each 5 seconds.Yohann Ferreira1-1/+1
This will permit the client the make position resyncs when necessary, and make use of the MOVING_POSITION and DESTINATION where relevant. Reviewed-by: Thorbjorn.
2011-04-16Removing unused enum EMAILCHG_EXISTS_EMAILStefan Dombrowski1-5/+0
The protocol uses ERRMSG_EMAIL_ALREADY_EXISTS instead.
2011-04-02Some cleanups related to syncing from game to account serverThorbjørn Lindeijer1-2/+1
* Remove SYNC_END_OF_BUFFER since the end of a message can already be identified by no more data being available. * Consistently prefix ++ rather than postfix ++ when incrementing mSyncMessages. * Made SYNC_BUFFER_SIZE into constants rather than defines, and moved them into the .cpp file since they're not used anywhere else. * Just use 1 and 0 to indicate online status. No point in writing it like 0x01 and 0x00. * Merged some duplicated documentation for AccountConnection::syncChanges. Reviewed-by: Jared Adams
2011-03-24Rely more on the functionality in XML::DocumentThorbjørn Lindeijer1-10/+2
By default XML::Document will use the ResourceManager to resolve the file name you pass to it. There is no point in disabling that functionality only to resolve it manually. Reviewed-by: Jared Adams
2011-03-23Fixed problems with loading XML files containing Windows newlinesThorbjørn Lindeijer1-24/+4
By using xmlParseFile instead of xmlParseMemory, the system-dependent newlines should be handled automatically. The .tmx.gz files should still be supported, but instead of manually decompressing them the xmlParseFile function should take care of that. It also fixes the leaking of XML documents in both the SkillManager as well as the PermissionManager, since they now rely on XML::Document, which cleans up automatically. Reviewed-by: Stefan Dombrowski