예제 #1
0
        public override int GetFileSize(string path)
        {
            if (Main.netMode != 1)
            {
                return(0);
            }
            ModContainer instance = ModLoader.GetMod("ServerSideCharacter") as ModContainer;

            instance.FileSizeEvent.Reset();
            ModPacket request = instance.GetPacket();

            request.Write((byte)PacketType.FileSize);
            request.Write(path);
            request.Send();
            instance.FileSizeEvent.WaitOne();
            return(instance.FileSize);
        }
예제 #2
0
 public override void Unload()
 {
     instance = null;
 }
예제 #3
0
 public override void Load()
 {
     instance = this;
 }