/* */ package NET.worlds.scape; /* */ /* */ import NET.worlds.core.IniFile; /* */ import NET.worlds.network.Cache; /* */ import NET.worlds.network.CacheFile; /* */ import NET.worlds.network.NetUpdate; /* */ import NET.worlds.network.URL; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class PendingCacheDrone /* */ extends PendingDrone /* */ { /* 23 */ static String upgradeDir = IniFile.gamma().getIniString("avatarDir", /* 24 */ "avatar/"); /* */ /* */ /* */ /* */ /* */ public PendingCacheDrone(PosableDrone _drone, URL _url) /* */ { /* 31 */ super(_drone, _url); /* */ } /* */ /* */ static /* */ { /* 25 */ if (!upgradeDir.endsWith("/")) { /* 26 */ upgradeDir += "/"; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 43 */ nativeInit(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public static void downloadSeqFile(String seqFileName, boolean force, int nativeNotifyObject) /* */ { /* 55 */ seqFileName = seqFileName.toLowerCase(); /* */ /* 57 */ if (!PosableDroneLoader.usingCache()) /* */ { /* 59 */ notifySeqLoaded(nativeNotifyObject, ".\\avatars\\" + seqFileName); /* 60 */ return; /* */ } /* */ /* 63 */ String path = NetUpdate.getUpgradeServerURL() + /* 64 */ upgradeDir + seqFileName; /* */ /* 66 */ if (force) /* */ { /* 68 */ CacheFile cf = Cache.getFile(URL.make(path)); /* 69 */ cf.waitUntilLoaded(); /* 70 */ if (cf.error()) /* */ { /* */ /* */ /* 74 */ return; /* */ } /* */ /* 77 */ notifySeqLoaded(nativeNotifyObject, cf.getLocalName()); /* */ } /* */ else /* */ { /* 81 */ new SeqFile(nativeNotifyObject, URL.make(path)); /* */ } /* */ } /* */ /* */ public static String getAvatarDatPath() /* */ { /* 87 */ if (!PosableDroneLoader.usingCache()) { /* 88 */ return ".\\avatars\\avatars.dat"; /* */ } /* 90 */ if (IniFile.gamma().getIniInt("localavatarsdat", 0) == 1) { /* 91 */ return ".\\avatars\\avatars.dat"; /* */ } /* */ /* 94 */ String datURL = NetUpdate.getUpgradeServerURL() + /* 95 */ upgradeDir + "avatars.dat"; /* 96 */ CacheFile cf = Cache.getFile(URL.make(datURL)); /* 97 */ cf.waitUntilLoaded(); /* 98 */ if (cf.error()) /* */ { /* */ /* */ /* 102 */ return null; /* */ } /* */ /* 105 */ return cf.getLocalName(); /* */ } /* */ /* */ public synchronized void download(URL avURL) {} /* */ /* */ public static native void nativeInit(); /* */ /* */ public static native void nativeDestroy(); /* */ /* */ public static synchronized native void notifySeqLoaded(int paramInt, String paramString); /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PendingCacheDrone.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */