Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|