summaryrefslogtreecommitdiff
path: root/src/game-server/being.h
AgeCommit message (Collapse)AuthorFilesLines
2013-02-01Added emote support.Yohann Ferreira1-0/+14
2013-01-09Replaced EventListener with signals based on libsigc++Thorbjørn Lindeijer1-4/+6
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
2013-01-09Replaced 'unsigned int' with 'unsigned'Thorbjørn Lindeijer1-13/+13
Same thing, but shorter.
2013-01-08Work on (Auto)Attack system.Erik Schilling1-9/+33
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
2013-01-08Rename AutoAttack to AttackErik Schilling1-2/+2
2012-04-14Introduced a Timeout class for counting down without countingThorbjørn Lindeijer1-30/+4
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
2012-04-04Renamed Thing to EntityThorbjørn Lindeijer1-1/+1
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-03-26Some general cleanups and merged Being::perform() into update()Thorbjørn Lindeijer1-6/+1
The main change here is to remove the separate calling of 'perform' on all beings, and rather rely on the beings to do whatever they were doing in that function when the virtual 'update' function is called. Reviewed-by: Yohann Ferreira
2012-01-02Made all beings capable of having a genderErik Schilling1-0/+8
Reviewed-by: o11c, bjorn, Bertram.
2011-06-17Changed the attack message to send the attack id.Yohann Ferreira1-3/+4
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-04-15Fixed crash on first map updateThorbjørn Lindeijer1-0/+4
The crash happened when it was trying to move an NPC from its old zone to its new zone. The old zone was based on the old position, which was (0,0). That crashed since its zone didn't match its old position, but its new one. This fix makes sure to update the old position to be in sync with the zone, by resetting it after being inserted into the MapComposite. Reviewed-by: Yohann Ferreira
2011-03-15Eliminated one version of Being::performAttackThorbjørn Lindeijer1-1/+0
There was a version taking an attack range, but the range was always the same as the one specified in the Damage class.
2011-01-09Fix being direction discrepancies by syncing the BeingDirection.Yohann Ferreira1-3/+10
The server was actually using the bitmask enum while the the client still sent another one, creating discrepancies. A second problem is that the being direction was not properly initialized and not updated while it was moving. Reviewed-by: Jaxad.
2010-12-29Moved parts needing to be in sync with the client in protocol.h.Yohann Ferreira1-44/+3
Trivial fix.
2010-12-08Fix many compiler warnings.Freeyorp1-2/+3
Reviewed-by: Bertram
2010-11-14Renamed .hpp files into .h for consistency.Yohann Ferreira1-0/+373
Also added an header to the autoattack.{h,cpp} files. Big but trivial fix.