mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
Added check on dynamic armor to abort if it no longer exists (error avoidance).
This commit is contained in:
Regular → Executable
+7
-11
@@ -1,18 +1,11 @@
|
||||
package script.item.armor;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.static_item;
|
||||
import script.library.utils;
|
||||
import script.library.buff;
|
||||
import script.library.armor;
|
||||
import script.library.combat;
|
||||
import script.library.static_item;
|
||||
import script.library.utils;
|
||||
import script.obj_id;
|
||||
import script.string_id;
|
||||
|
||||
public class dynamic_armor extends script.base_script
|
||||
{
|
||||
@@ -127,6 +120,9 @@ public class dynamic_armor extends script.base_script
|
||||
}
|
||||
public int OnGetAttributes(obj_id self, obj_id player, String[] names, String[] attribs) throws InterruptedException
|
||||
{
|
||||
if(self == null || self == obj_id.NULL_ID || !isIdValid(self) || !exists(self)){
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
int free = getFirstFreeIndex(names);
|
||||
if (free == -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user