summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-11-24 19:04:01 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-11-24 19:04:01 -0800
commit6af0112e304be73e7e4ee9332c8280bd46ea0fd0 (patch)
treef6de2a4d5c169e2f81640d2c70d7501d941a7997 /src
parent1e43bfe979ff9971778b8202c638dc580f45f572 (diff)
downloadtmwa-6af0112e304be73e7e4ee9332c8280bd46ea0fd0.tar.gz
tmwa-6af0112e304be73e7e4ee9332c8280bd46ea0fd0.tar.bz2
tmwa-6af0112e304be73e7e4ee9332c8280bd46ea0fd0.tar.xz
tmwa-6af0112e304be73e7e4ee9332c8280bd46ea0fd0.zip
Do not consume components if casting aborts due to hidev13.11.24
Diffstat (limited to 'src')
-rw-r--r--src/map/magic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/magic.cpp b/src/map/magic.cpp
index 0602dfa..fd848f5 100644
--- a/src/map/magic.cpp
+++ b/src/map/magic.cpp
@@ -48,6 +48,8 @@ int magic_message(dumb_ptr<map_session_data> caster, XString source_invocation)
{
if (pc_isdead(caster))
return 0;
+ if (bool(caster->status.option & Option::HIDE))
+ return 0; // No spellcasting while hidden
int power = caster->matk1;
@@ -81,8 +83,6 @@ int magic_message(dumb_ptr<map_session_data> caster, XString source_invocation)
FPRINTF(stderr, "Found spell `%s', triggered = %d\n", spell_,
effects != NULL);
#endif
- if (bool(caster->status.option & Option::HIDE))
- return 0; // No spellcasting while hidden
MAP_LOG_PC(caster, "CAST %s %s",
spell->name, effects ? "SUCCESS" : "FAILURE");