summaryrefslogtreecommitdiffstats
path: root/src/game-server
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved attribute (re)calculation to the scriptsErik Schilling2013-02-046-176/+70
| | | | | | | | | | | | | | | | | | | | | | This introduces two callbacks: - on_update_derived_attribute -> Called to recalculate other derived attributes. - on_recalculate_base_attribute -> Called to recalculate a base attribute (only called for characters. However the function passed as callback can be useful for recalculating the derived attributes as well) Monsters no longer block recalculation of attributes except HP and Speed. I saw no sense to keep this. Fixed constant value in libmana-constants.lua Dropped bool type of the recalculation functions. It would be difficult to keep it while pushing all to the script engine and it was unused anyway. All in all this adds a LOT more flexibillity to projects since they can now adapt all attributes in the way they want.
* Random cleanup of attribute codeErik Schilling2013-02-043-19/+28
| | | | Did this during trying to understand the code
* Modifications to allow crosscompiling with mingwErik Schilling2013-02-031-0/+1
| | | | Reviewed-by: bjorn.
* Silenced to Wreorder warnings.Yohann Ferreira2013-02-012-3/+3
|
* Added emote support.Yohann Ferreira2013-02-019-2/+192
|
* Silenced some eclipse warningsErik Schilling2013-01-297-3/+19
|
* Fixed setting current map for npc update functionErik Schilling2013-01-151-0/+2
|
* Small simplification in Monster::diedThorbjørn Lindeijer2013-01-101-4/+4
|
* Used a typedef to make callback syntax more readableThorbjørn Lindeijer2013-01-101-11/+8
|
* Small documentation updates for Point and RectangleThorbjørn Lindeijer2013-01-101-1/+1
| | | | | | | This documentation used to be accurate, until Point was merged with the Position class in commit 8ff3e6674c1d4fc05fc1ba87f42484689fca0879. Also fixed a typo.
* Made sure in-inventory trigger is called at pickupErik Schilling2013-01-101-1/+9
| | | | | | Also added checks for invalid item and zero amount Reviewed-by: bjorn.
* Replaced EventListener with signals based on libsigc++Thorbjørn Lindeijer2013-01-0913-313/+134
| | | | | | | | | | | | | This replaces the rather hard to understand event dispatcher with a probably even harder to understand templated library, but fortunately we can rely on the available documentation. Hopefully it will also help with the readability of our code and with adding additional signals to other classes. Added libsigc++ to README and Travis CI configuration. Reviewed-by: Erik Schilling
* Replaced 'unsigned int' with 'unsigned'Thorbjørn Lindeijer2013-01-0924-160/+160
| | | | Same thing, but shorter.
* Fixed syntax error (added missing '{')Thorbjørn Lindeijer2013-01-081-0/+1
|
* Added Vulnerabilities for monstersErik Schilling2013-01-083-1/+28
| | | | | | | You can now actually use the already used node in the monsters.xml Monsters can have different vulnerabillities against elements: <vulnerabillity element="earth" factor="2.0" /> This will double damage of the element earth to this monster.
* Work on (Auto)Attack system.Erik Schilling2013-01-0815-465/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename AutoAttack to AttackErik Schilling2013-01-088-47/+47
|
* Moved order of sending genderErik Schilling2012-10-111-3/+1
| | | | | | | | | Gender is shared. There is no reason in duplicating code *Breaks compatbility with old clients* *Requires clientside patch* Reviewed-by: Stefan Beller.
* Extended warnings for parsing warpsErik Schilling2012-09-221-1/+1
| | | | Reviewed-by: bjorn.
* Fixed marking map as activatedErik Schilling2012-09-222-19/+40
| | | | | | | | The patch that allowed to use map objects as warp targets broke this. During run of map initalize mActive was still false. This broke creating objects (npc, triggers) in atinit. Reviewed-by: bjorn.
* Allow map objects as warp targetsErik Schilling2012-09-023-14/+57
| | | | | | | | | | | | | | | | This patch allows map objects as warp targets. For use: - Create object in tiled with type="WARP_DEST" - Set name to anything you want - Create usual WARP object - Leave out the DEST_{X,Y} part - Add DEST_NAME property with the name of the first object This requires the game server to parse all maps at startup. Change is tested. Reviewed-by: bjorn.
* Dropped .gz suffix for mapsErik Schilling2012-09-021-2/+0
| | | | Reviewed-by: bjorn.
* Fixed issues with removing attribute modifiersThorbjørn Lindeijer2012-08-101-4/+5
| | | | | | | | | | | | | | * AttributeModifiersEffect::remove was not calling updateMod with the 'value' parameter, causing it to have no effect at all for Stackable modifiers. * The cached value of the changed modifier effect was not being recalculated when removing modifiers, because it started one layer too high (there's an inconsistency here: AttributeModifiersEffect::add updates this cached value while AttributeModifiersEffect::remove doesn't). Reviewed-by: Erik Schilling
* Allow monster name in <drop> tagErik Schilling2012-08-061-3/+17
| | | | Reviewed-by: Stefan Beller.
* Fixed the atinit functionErik Schilling2012-08-051-0/+2
| | | | | | | Previously each map had its own scope. They got merged now but the atinit function was forgotten to adapt. Reviewed-by: bjorn.
* Fixed recalculation of base attributesErik Schilling2012-08-051-7/+7
| | | | | | | We do not need to calculate derived attributes of the derived attributes but the base of the derived attribute. Reviewed-by: bjorn.
* Remove resetEffects; move it to destructor in ItemClass.Stefan Beller2012-08-052-18/+20
| | | | Reviewed-by: bjorn
* Fixup segfault at shutdown of gameserver.Stefan Beller2012-08-051-5/+1
| | | | | | | | The objects of ItemEffectInfo class, which are hold in mDispells are definitly in mEffects as well, because they are added in in addEffect as the same pointer. Reviewed-by: Erik Schilling
* Correct updating the old position of beings.Stefan Beller2012-08-051-4/+4
| | | | | Reviewed-by: bjorn acked-by: Ablu
* Prevent characters from using specials after deathErik Schilling2012-08-041-0/+6
| | | | Reviewed-by: Stefan Beller.
* Fixed dead characters being able to use items.Erik Schilling2012-08-031-0/+4
| | | | | | | | Change is tested. Mantis: #492. Reviewed-by: Stefan Beller.
* Made the character not colliding with monsters.Erik Schilling2012-08-031-1/+1
| | | | | | Prevents clientside desyncs. Reviewed-by: Stefan Beller.
* Correct further int lengthes.Stefan Beller2012-08-021-2/+2
| | | | Reviewed-by: Ablu.
* Gameserver raise attribute: correct integer size.Stefan Beller2012-07-311-1/+1
| | | | Acked-by: bjorn
* Make Attributes modifiable by client again.Stefan Beller2012-07-311-1/+2
| | | | Reviewed-by: bjorn
* Fix Inventory::getNewEquipItemInstance to yield really unique ids.Stefan Beller2012-07-311-9/+8
| | | | | Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Reviewed-by: Erik Schilling
* Added lua binds for issuing request of quest variable + bind for trying to ↵Erik Schilling2012-07-173-11/+67
| | | | | | | | | | | read them The difference to the old chr_get_quest bind is that this allows querying quest vars from non npc functions as well. Change is tested. Reviewed-by: bjorn.
* Added script binds to get full monster anger list + drop anger of monstersErik Schilling2012-07-171-0/+3
| | | | Reviewed-by: bjorn.
* Made sure the map is set for trigger scriptsErik Schilling2012-07-111-0/+1
| | | | | | Also unsetted maps after execution of scripts to make finding this mistakes easier. Reviewed-by: bjorn.
* Added bind for setting login callbackErik Schilling2012-07-083-0/+14
| | | | Reviewed-by: bjorn.
* Collisiondetection: Removing commented code.Stefan Beller2012-06-221-118/+0
| | | | Reviewed-by: Ablu
* Fixed handling of skillsErik Schilling2012-05-252-9/+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.
* Fixed type of returned value from MapReader::readMapThorbjørn Lindeijer2012-05-061-1/+1
| | | | GCC 4.7 warns about this, yay.
* Added debugging mode to the protocolThorbjørn Lindeijer2012-05-052-0/+5
| | | | | | | | | | | | 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
* Removed not needed trigger for specialupdate when INT attribute changed.Erik Schilling2012-04-181-4/+0
| | | | | | I removed this dependency a while ago. But forgot to remove this code. Reviewed-by: bjorn.
* Fixed compiler warning about non-virtual destructorThorbjørn Lindeijer2012-04-141-0/+2
| | | | | | | | None of the subclasses actually define a destructor that does anything, but this may change in the future. In any case it's good to get rid of the warning. Reviewed-by: Erik Schilling
* Introduced a Timeout class for counting down without countingThorbjørn Lindeijer2012-04-1410-142/+219
| | | | | | | | The timeout remembers a reference point of time against which it can check how much time is remaining. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
* Fixed issues with server behind routerErik Schilling2012-04-121-1/+3
| | | | | | Tested-by: jurkan. Reviewed-by: Bertram.
* Adding monster::on_damage callbackStefan Beller2012-04-042-0/+24
| | | | Reviewed-by: bjorn
* Renamed Thing to EntityThorbjørn Lindeijer2012-04-0419-90/+88
| | | | | | | | 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