예제 #1
0
        public WorldFloorProvider(GameContent contentManager)
        {
            this.ContentManager = contentManager;

            this.Entries       = new Dictionary <ushort, FloorReference>();
            this.ById          = new Dictionary <ushort, Floor>();
            DynamicFloorFromID = new Dictionary <string, ushort>();
        }
예제 #2
0
 public static void Init(string basepath, ContentMode mode)
 {
     if (Get != null)
     {
         return;
     }
     Get = new GameContent(basepath, mode, null, true);
 }
예제 #3
0
 public static void InitBasic(string basepath, GraphicsDevice device)
 {
     if (Get != null)
     {
         return;
     }
     Get = new GameContent(basepath, ContentMode.CLIENT, device, false);
 }
예제 #4
0
 public static void Init(string basepath, GraphicsDevice device)
 {
     if (Get != null)
     {
         if (!Get.Inited)
         {
             Get.Init();
         }
         return;
     }
     Get = new GameContent(basepath, ContentMode.CLIENT, device, true);
 }
예제 #5
0
        public WorldWallProvider(GameContent contentManager)
        {
            this.ContentManager = contentManager;

            WallStyleToIndex = WallStyleIDs.ToDictionary(x => x, x => Array.IndexOf(WallStyleIDs, x));

            this.Entries      = new Dictionary <ushort, WallReference>();
            this.ById         = new Dictionary <ushort, Wall>();
            this.StyleById    = new Dictionary <ushort, WallStyle>();
            this.WallStyles   = new List <WallStyle>();
            DynamicWallFromID = new Dictionary <string, ushort>();
        }
예제 #6
0
        public UIGraphicsProvider(GameContent contentManager)
            : base(contentManager, new TextureCodec(MASK_COLORS), new Regex("uigraphics/.*\\.dat"))
        {
            _files[0x00000Cb800000002]  = "uigraphics/friendshipweb/friendshipwebalpha.tga";
            _files[0x00000Cbfb00000001] = "uigraphics/hints/hint_mechanicskill.bmp";

            _files[0x1AF0856DDBAC] = "uigraphics/chat/balloonpointersadbottom.bmp";
            _files[0x1B00856DDBAC] = "uigraphics/chat/balloonpointersadside.bmp";
            _files[0x1B10856DDBAC] = "uigraphics/chat/balloontilessad.bmp";

            _files[0x1972454856DDBAC] = "uigraphics/friendshipweb/f_web_inbtn.bmp";
            _files[0x3D3AEF0856DDBAC] = "uigraphics/friendshipweb/f_web_outbtn.bmp";
            //./uigraphics/eods/costumetrunk/eod_costumetrunkbodySkinBtn.bmp
            _pointers[0x0000028800000001] = 0x0000094600000001;
        }
예제 #7
0
        public void Init(GameContent content)
        {
            //load and build catalog
            ItemsByGUID     = new Dictionary <uint, ObjectCatalogItem>();
            ItemsByCategory = new List <ObjectCatalogItem> [30];
            for (int i = 0; i < 30; i++)
            {
                ItemsByCategory[i] = new List <ObjectCatalogItem>();
            }

            var packingslip = new XmlDocument();

            //very simple overide incase you don't want to use the TSO catalog or want to change it.
            if (File.Exists(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog.xml")))
            {
                packingslip.Load(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog.xml"));
            }
            else
            {
                packingslip.Load(content.GetPath("packingslips/catalog.xml"));
            }
            //If the community lot file exists, load it for uilotbutton.
            if (File.Exists(Path.Combine(FSOEnvironment.ContentDir, "patch/mtune/clots.txt")))
            {
                CLots = File.ReadAllText(Path.Combine(FSOEnvironment.ContentDir, "patch/mtune/clots.txt"), Encoding.UTF8);
            }

            var objectInfos = packingslip.GetElementsByTagName("P");

            foreach (XmlNode objectInfo in objectInfos)
            {
                sbyte Category = Convert.ToSByte(objectInfo.Attributes["s"].Value);
                uint  guid     = Convert.ToUInt32(objectInfo.Attributes["g"].Value, 16);
                if (Category < 0)
                {
                    continue;
                }
                var item = new ObjectCatalogItem()
                {
                    GUID         = guid,
                    Category     = Category,
                    Price        = Convert.ToUInt32(objectInfo.Attributes["p"].Value),
                    Name         = objectInfo.Attributes["n"].Value,
                    DisableLevel = Convert.ToByte(objectInfo.Attributes["r"]?.Value ?? "0")
                };
                ItemsByCategory[Category].Add(item);
                ItemsByGUID[guid] = item;
            }

            //load and build Content Objects into catalog
            if (File.Exists(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog_downloads.xml")))
            {
                var dpackingslip = new XmlDocument();

                dpackingslip.Load(Path.Combine(FSOEnvironment.ContentDir, "Objects/catalog_downloads.xml"));
                var downloadInfos = dpackingslip.GetElementsByTagName("P");

                foreach (XmlNode objectInfo in downloadInfos)
                {
                    sbyte dCategory = Convert.ToSByte(objectInfo.Attributes["s"].Value);
                    uint  dguid     = Convert.ToUInt32(objectInfo.Attributes["g"].Value, 16);
                    if (dCategory < 0)
                    {
                        continue;
                    }
                    var ditem = new ObjectCatalogItem()
                    {
                        GUID         = dguid,
                        Category     = dCategory,
                        Price        = Convert.ToUInt32(objectInfo.Attributes["p"].Value),
                        Name         = objectInfo.Attributes["n"].Value,
                        DisableLevel = Convert.ToByte(objectInfo.Attributes["r"]?.Value ?? "0")
                    };

                    ItemsByCategory[dCategory].Add(ditem);
                    ItemsByGUID[dguid] = ditem;
                }
            }
        }
예제 #8
0
 public IniProvider(GameContent content) : base(content, new IniCodec(), new Regex("^sys/.*\\.ini"))
 {
 }
예제 #9
0
 public AvatarTextureProvider(GameContent contentManager)
     : base(contentManager, new TextureCodec(), new Regex(".*/textures/.*\\.dat"))
 {
 }
예제 #10
0
 public CityMapsProvider(GameContent content)
 {
     this.Content = content;
 }
예제 #11
0
 public RackOutfitsProvider(GameContent contentManager)
 {
     this.Content = contentManager;
 }
예제 #12
0
 public WorldRoofProvider(GameContent contentManager) : base(contentManager, new TextureCodec(new uint[] { }, true),
                                                             new Regex(contentManager.TS1? "GameData/Roofs/.*\\.bmp" : "housedata/roofs/.*\\.jpg"))
 {
     UseTS1 = contentManager.TS1;
 }
예제 #13
0
 public WorldObjectProvider(GameContent contentManager) : base(contentManager)
 {
 }
예제 #14
0
 public AvatarAnimationProvider(GameContent contentManager)
     : base(contentManager, new AnimationCodec(), new Regex(".*/animations/.*\\.dat"))
 {
 }
예제 #15
0
 public WorldObjectGlobals(GameContent contentManager)
     : base(contentManager, new IffCodec(), new Regex(".*/globals/.*\\.iff"))
 {
 }
예제 #16
0
 public AvatarOutfitProvider(GameContent contentManager)
     : base(contentManager, new OutfitCodec(), new Regex(".*/outfits/.*\\.dat"))
 {
 }
예제 #17
0
 public Audio(GameContent contentManager)
 {
     this.ContentManager = contentManager;
 }
 public AvatarSkeletonProvider(GameContent contentManager)
     : base(contentManager, new SkeletonCodec(), new Regex(".*/skeletons/.*\\.dat"))
 {
 }
예제 #19
0
 public WorldGlobalProvider(GameContent contentManager)
 {
     this.ContentManager = contentManager;
 }
예제 #20
0
 public HandgroupProvider(GameContent contentManager)
     : base(contentManager, new HandgroupCodec(), new Regex(".*/hands/groups/.*\\.dat"))
 {
 }
예제 #21
0
 public AvatarMeshProvider(GameContent contentManager, GraphicsDevice device) : base(contentManager, new MeshCodec(), new Regex(".*/meshes/.*\\.dat"))
 {
 }
예제 #22
0
 public AvatarBindingProvider(GameContent contentManager)
     : base(contentManager, new BindingCodec(), new Regex(".*/bindings/.*\\.dat"))
 {
 }
예제 #23
0
 public AvatarCollectionsProvider(GameContent contentManager)
     : base(contentManager, new CollectionCodec(), new Regex(".*/collections/.*\\.dat"))
 {
 }
예제 #24
0
 public AvatarAppearanceProvider(GameContent contentManager)
     : base(contentManager, new AppearanceCodec(), new Regex(".*/appearances/.*\\.dat"))
 {
 }
예제 #25
0
 public AvatarPurchasables(GameContent contentManager)
     : base(contentManager, new PurchasableOutfitCodec(), new Regex(".*/purchasables/.*\\.dat"))
 {
 }