Age | Commit message (Collapse) | Author | Files | Lines |
|
This was the final step to remove the hierachy with Entity on the top.
|
|
I did not really care too much about staying consistent with the use of
static_casts to Actors since they are only temporary anyway until Actor
is a component too.
|
|
Reviewed-by: Yohann Ferreira
|
|
Items also have positions, so the ItemComponent only makes sense as part of
an Actor. Later on it will probably be part of an entity that also has an
ActorComponent.
Since it was annoying to update all the places where items were created,
I've introduced a function for this.
The component types are now prefixed with "CT_" because I wanted to introduce
an 'Item' namespace which would otherwise be conflicting. The component types
enum isn't used much in the code so it can look a bit ugly.
Reviewed-by: Yohann Ferreira
|
|
This documentation used to be accurate, until Point was merged with the
Position class in commit 8ff3e6674c1d4fc05fc1ba87f42484689fca0879.
Also fixed a typo.
|
|
Same thing, but shorter.
|
|
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
|
|
|
|
Reviewed-by: bjorn
|
|
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
|
|
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
|
|
Previously, global function names were defined in the respective XML
definitions of items, monsters and status effects. This was reasonable when
they all had the same state, but now they're sharing the single global
Lua state.
Now the Lua API provides access to the ItemClass, MonsterClass and
StatusEffect instances, on which callbacks for both standard and custom
events can be explicitly set.
Reviewed-by: Erik Schilling
|
|
No more Lua state for each status effect, monster, item effect or map. All
scripts are loaded into the same state. This should be more efficient overall
and make it easier to implement dynamic reloading of the scripts in the
future.
Now, this introduces the problem of name collisions between different Lua
scripts. For now this is solved by using more specific function names, like
'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however
to get rid of these globals, and register these callbacks from the script,
so that they can be local functions without the danger of colliding with
other scripts.
Reviewed-by: Erik Schilling
Reviewed-by: Yohann Ferreira
|
|
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.
|
|
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.
|
|
This doesn't change anything yet.
|
|
Reviewed-by: Thorbjorn.
|
|
This splits the huge ItemManager::reload() into readEquipSlotsFile() and
readItemsFile(), the latter of which is further split up into multiple
functions for reading the different elements.
Just to keep the amount of nesting down and increase the readability.
Removes the need for huge eye-catching comment blocks.
Reviewed-by: Freeyorp
|
|
The @drop and @item commands can now accept an item name instead of an
item ID. In addition the amount can be omitted to create a single item.
|
|
Reviewed-by: Bertram
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|