summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/PendingCacheDrone.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/PendingCacheDrone.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/PendingCacheDrone.java')
-rw-r--r--NET/worlds/scape/PendingCacheDrone.java132
1 files changed, 132 insertions, 0 deletions
diff --git a/NET/worlds/scape/PendingCacheDrone.java b/NET/worlds/scape/PendingCacheDrone.java
new file mode 100644
index 0000000..29b60f5
--- /dev/null
+++ b/NET/worlds/scape/PendingCacheDrone.java
@@ -0,0 +1,132 @@
+/* */ 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
+ */ \ No newline at end of file