Skip to content

Commit

Permalink
Creature remove condition by condition param
Browse files Browse the repository at this point in the history
  • Loading branch information
MillhioreBT committed Mar 20, 2024
1 parent ad13b58 commit 68d25b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/luacreature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,9 @@ int luaCreatureRemoveCondition(lua_State* L)
bool force = false;

if (isUserdata(L, 2)) {
condition = getUserdata<Condition>(L, 2);
auto tmpCondition = getUserdata<const Condition>(L, 2);
force = getBoolean(L, 3, false);
condition = creature->getCondition(tmpCondition->getType(), tmpCondition->getId(), tmpCondition->getSubId());
} else {
ConditionType_t conditionType = getInteger<ConditionType_t>(L, 2);
ConditionId_t conditionId = getInteger<ConditionId_t>(L, 3, CONDITIONID_COMBAT);
Expand Down

0 comments on commit 68d25b2

Please sign in to comment.