diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-24 22:09:54 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-24 22:31:00 -0700 |
commit | dc0762c547cab250d4fe081706930582a27c0b46 (patch) | |
tree | 82b00bc460af9543769e4769521b2fc73fdb2437 /src/map/magic-stmt.hpp | |
parent | c093f4cce643e245ab2048e0782237744208eb9f (diff) | |
download | tmwa-dc0762c547cab250d4fe081706930582a27c0b46.tar.gz tmwa-dc0762c547cab250d4fe081706930582a27c0b46.tar.bz2 tmwa-dc0762c547cab250d4fe081706930582a27c0b46.tar.xz tmwa-dc0762c547cab250d4fe081706930582a27c0b46.zip |
Conform magic headers to the decl/def rule
Diffstat (limited to 'src/map/magic-stmt.hpp')
-rw-r--r-- | src/map/magic-stmt.hpp | 68 |
1 files changed, 66 insertions, 2 deletions
diff --git a/src/map/magic-stmt.hpp b/src/map/magic-stmt.hpp index 0e687a6..08c2b28 100644 --- a/src/map/magic-stmt.hpp +++ b/src/map/magic-stmt.hpp @@ -1,8 +1,9 @@ #ifndef TMWA_MAP_MAGIC_STMT_HPP #define TMWA_MAP_MAGIC_STMT_HPP -// magic-stmt.hpp - dummy header to make Make dependencies work. +// magic-stmt.hpp - Imperative commands for the magic backend. // -// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> +// Copyright © 2004-2011 The Mana World Development Team +// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com> // // This file is part of The Mana World (Athena server) // @@ -21,4 +22,67 @@ # include "fwd.hpp" +# include "../range/fwd.hpp" + +# include "../mmo/dumb_ptr.hpp" + +# include "skill.t.hpp" + +struct op_t +{ + ZString name; + ZString signature; + int (*op)(dumb_ptr<env_t> env, Slice<val_t> arga); +}; + +/** + * Retrieves an operation by name + * @param name The name to look up + * @return An operation of that name, or NULL, and a function index + */ +op_t *magic_get_op(ZString name); + +/** + * Removes the shroud from a character + * + * \param character The character to remove the shroud from + */ +void magic_unshroud(dumb_ptr<map_session_data> character); + +/** + * Notifies a running spell that a status_change timer triggered by the spell has expired + * + * \param invocation The invocation to notify + * \param bl_id ID of the PC for whom this happened + * \param sc_id ID of the status change entry that finished + * \param supplanted Whether the status_change finished normally (0) or was supplanted by a new status_change (1) + */ +void spell_effect_report_termination(BlockId invocation, BlockId bl_id, + StatusChange sc_id, int supplanted); + +/** + * Execute a spell invocation and sets up timers to finish + */ +void spell_execute(dumb_ptr<invocation> invocation); + +/** + * Continue an NPC script embedded in a spell + */ +void spell_execute_script(dumb_ptr<invocation> invocation); + +/** + * Stops all magic bound to the specified character + * + */ +void magic_stop_completely(dumb_ptr<map_session_data> c); + +/** + * Attacks with a magical spell charged to the character + * + * Returns 0 if there is no charged spell or the spell is depleted. + */ +int spell_attack(BlockId caster, BlockId target); + +void spell_free_invocation(dumb_ptr<invocation> invocation); + #endif // TMWA_MAP_MAGIC_STMT_HPP |