Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Reviewed-by: bjorn.
|
|
* 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
|
|
Reviewed-by: Stefan Beller.
|
|
Previously each map had its own scope. They got merged now but the atinit
function was forgotten to adapt.
Reviewed-by: bjorn.
|
|
We do not need to calculate derived attributes of the derived attributes
but the base of the derived attribute.
Reviewed-by: bjorn.
|
|
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
|
|
Reviewed-by: bjorn
acked-by: Ablu
|
|
Reviewed-by: Stefan Beller.
|
|
Change is tested.
Mantis: #492.
Reviewed-by: Stefan Beller.
|
|
Prevents clientside desyncs.
Reviewed-by: Stefan Beller.
|
|
Reviewed-by: Ablu.
|
|
Acked-by: bjorn
|
|
Reviewed-by: bjorn
|
|
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Reviewed-by: Erik Schilling
|
|
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.
|
|
Reviewed-by: bjorn.
|
|
Also unsetted maps after execution of scripts to make finding this mistakes easier.
Reviewed-by: bjorn.
|
|
Reviewed-by: bjorn.
|
|
Reviewed-by: Ablu
|
|
- 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.
|
|
GCC 4.7 warns about this, yay.
|
|
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
|
|
I removed this dependency a while ago. But forgot to remove this code.
Reviewed-by: bjorn.
|
|
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
|
|
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
|
|
Tested-by: jurkan.
Reviewed-by: Bertram.
|
|
Reviewed-by: bjorn
|
|
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
|
|
- 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.
|
|
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
|
|
Only 1/4th of the floor items were being restored after a reboot of the game
server.
Reviewed-by: jurkan
|
|
This was broken in ba66fbeda8ef9afb6c33eba66d109bac85ebf628 where we forgot
to make sure to invert the condition when moving it into the function.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: bjorn.
|
|
Reviewed-by: bjorn.
|
|
These were unused parameters and one return type with an ignored 'const'
qualifier.
Reviewed-by: Yohann Ferreira
|
|
Due to a misplaced semicolon, it always returned false after the first
instance. This function is only used by the script function
chr_unequip_item.
Reviewed-by: Yohann Ferreira
|
|
Step to be able to handle chatcommands by scripts.
Reviewed-by: bjorn.
|
|
TODO: Inform client about this change.
Reviewed-by: bjorn.
|
|
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
|
|
Reviewed-by: bjorn.
|
|
Rather than wrapping NPC functions up in coroutines in the Lua side, they
are now managed on the C++ side as "script threads", which are essentially
the same thing.
The main purpose is that the server can now know whether any of these long
running script interactions are still active, which will probably be useful
when adding the ability to reload scripts.
Reviewed-by: Erik Schilling
|
|
Reviewed-by: PjotrOrial.
|
|
Usage:
@effect <id>
@effect <id> <char>
@effect <id> <x> <y>
Reviewed-by: Bertram.
|
|
mana.map_get_pvp() now returns one of the constants in libmana-constants.lua
Reviewed-by: Bertram.
|
|
This allows the script to let the character perform a scripted attack but
the character still gets xp and killed monsters give drops.
You can now call:
mana.being_damage(target, dmg, dmg_delta, accurancy, type, element, source,
skill)
While on it I also added checks to the being_damage function.
Reviewed-by: bjorn, Bertram.
|
|
The ScriptAction of the TriggerArea (which can be created by
mana.trigger_create) was still using a named global function for its
callback. Now it also uses a reference to a script function.
Since it was the last occurrence of a call to a global script function,
I've also removed the Script::prepare(std::string) overload.
Reviewed-by: Erik Schilling
Mantis-issue: 299
|
|
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
|
|
Reviewed-by: bjorn.
|