diff options
author | asuratva <asuratva@proton.me> | 2024-05-15 12:25:43 +0530 |
---|---|---|
committer | asuratva <asuratva@proton.me> | 2024-05-15 12:39:05 +0530 |
commit | 8054dfe5c1f66cacca3d0d93a6479434d2240400 (patch) | |
tree | 64eca131fd7f5ed38357de5be42532a582273101 /src/map/script-fun.cpp | |
parent | b770e11f539de8b86a6e042d357e248fc25845b2 (diff) | |
download | tmwa-8054dfe5c1f66cacca3d0d93a6479434d2240400.tar.gz tmwa-8054dfe5c1f66cacca3d0d93a6479434d2240400.tar.bz2 tmwa-8054dfe5c1f66cacca3d0d93a6479434d2240400.tar.xz tmwa-8054dfe5c1f66cacca3d0d93a6479434d2240400.zip |
updated itenplz fix to use mob flag instead of string comparison. More efficient.
Credit to @Hello for figuring this out :)
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r-- | src/map/script-fun.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 8d5bf94..9346963 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -3735,9 +3735,9 @@ void builtin_issummon(ScriptState *st) { dumb_ptr<mob_data> md = map_id_is_mob(wrap<BlockId>(conv_num(st, &AARG(0)))); int val = 0; - if (md && md->name.contains_seq("Summon"_s)) + if (md) { - val = 1; + val |= (md->mode & MobMode::SUMMONED); } push_int<ScriptDataInt>(st->stack, val); |