Skip to content

Commit

Permalink
updated itenplz fix to use mob flag instead of string comparison. Mor…
Browse files Browse the repository at this point in the history
…e efficient.

Credit to @hello for figuring this out :)
  • Loading branch information
asuratva committed May 15, 2024
1 parent b770e11 commit 8054dfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/script-fun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8054dfe

Please sign in to comment.