mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-01-17 00:05:07 -05:00
Update buff.java
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user