summaryrefslogtreecommitdiff
path: root/src/map/magic.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-07-23 23:55:41 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-08-05 17:41:35 -0700
commita7f64f0b39cb7141f16608c171b20bee452fd024 (patch)
tree6ceb293db3488161d4d5a620536560506e63134f /src/map/magic.cpp
parent7abac74323e2566173ea586e9acadac1ebf59098 (diff)
downloadtmwa-a7f64f0b39cb7141f16608c171b20bee452fd024.tar.gz
tmwa-a7f64f0b39cb7141f16608c171b20bee452fd024.tar.bz2
tmwa-a7f64f0b39cb7141f16608c171b20bee452fd024.tar.xz
tmwa-a7f64f0b39cb7141f16608c171b20bee452fd024.zip
In magic, use Variant for all the old anonymous nested unions
Diffstat (limited to 'src/map/magic.cpp')
-rw-r--r--src/map/magic.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/map/magic.cpp b/src/map/magic.cpp
index bc46f86..a0238b5 100644
--- a/src/map/magic.cpp
+++ b/src/map/magic.cpp
@@ -42,8 +42,6 @@ namespace tmwa
{
namespace magic
{
-#undef DEBUG
-
/// Return a pair of strings, {spellname, parameter}
/// Parameter may be empty.
static
@@ -97,18 +95,13 @@ int magic_message(dumb_ptr<map_session_data> caster, XString source_invocation)
int near_miss;
dumb_ptr<env_t> env =
spell_create_env(&magic_conf, spell, caster, power, parameter);
- effect_set_t *effects;
+ const effect_set_t *effects;
if (bool(spell->flags & SPELL_FLAG::NONMAGIC) || (power >= 1))
effects = spell_trigger(spell, caster, env, &near_miss);
else
effects = nullptr;
-#ifdef DEBUG
- FPRINTF(stderr, "Found spell `%s', triggered = %d\n"_fmt, spell_,
- effects != nullptr);
-#endif
-
MAP_LOG_PC(caster, "CAST %s %s"_fmt,
spell->name, effects ? "SUCCESS"_s : "FAILURE"_s);