From 8319732829dee5dc268695d2638b54f28b38c0de Mon Sep 17 00:00:00 2001 From: AconiteGodOfSWG Date: Fri, 2 Apr 2021 11:41:55 -0400 Subject: [PATCH] Update buff.java --- .../compiled/game/script/library/buff.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sku.0/sys.server/compiled/game/script/library/buff.java b/sku.0/sys.server/compiled/game/script/library/buff.java index f74b45994..5e2ab2e12 100755 --- a/sku.0/sys.server/compiled/game/script/library/buff.java +++ b/sku.0/sys.server/compiled/game/script/library/buff.java @@ -1562,4 +1562,23 @@ public class buff extends script.base_script } return true; } + public static boolean removeAllDebuffs(obj_id target) throws InterruptedException + { + if (!isIdValid(target) || !exists(target)) + { + return false; + } + int[] buffs = getAllBuffs(target); + if (buffs == null || buffs.length == 0) + { + return true; + } + for (int b : buffs) { + buff_data bdata = combat_engine.getBuffData(b); + if (bdata.debuff == 1) { + removeBuff(target, b); + } + } + return true; + } }