internal ClassicFactory(UODataManager data) { Data = data; if (data.DataType.HasFlag(UODataType.UseUopFiles)) throw new NotImplementedException(); //IDataContainer uop = new UopContainer(GetPath("AnimationSequence.uop"), data.RealTime); //var sequence = new byte[uop.EntryLength][]; //for (var i = 0U; i < uop.EntryLength; ++i) // sequence[i] = uop[i]; MulContainer virtualcontainer = null; virtualcontainer = MulContainer.GetVirtual(null, GetPath("tiledata.mul"), data.RealTime); container_LandData = new MulContainer(virtualcontainer, 0, (_LandLength>>5), (uint)(data.DataType.HasFlag(UODataType.UseNewDatas) ? 964 : 836)); container_ItemData = new MulContainer(virtualcontainer, (_LandLength>>5)* (uint)(data.DataType.HasFlag(UODataType.UseNewDatas) ? 964 : 836), 0, (uint)(data.DataType.HasFlag(UODataType.UseNewDatas) ? 1316 : 1188)); if (!String.IsNullOrEmpty(GetPath("artidx.mul")) && !String.IsNullOrEmpty(GetPath("art.mul"))) { virtualcontainer = MulContainer.GetVirtual(GetPath("artidx.mul"), GetPath("art.mul"), data.RealTime); container_LandTile = new MulContainer(virtualcontainer, 0, _LandLength); container_ItemTile = new MulContainer(virtualcontainer, _LandLength, 0); } if (!String.IsNullOrEmpty(GetPath("texidx.mul")) && !String.IsNullOrEmpty(GetPath("texmaps.mul"))) container_LandTexm = new MulContainer(GetPath("texidx.mul"), GetPath("texmaps.mul"), data.RealTime); if (!String.IsNullOrEmpty(GetPath("gumpidx.mul")) && !String.IsNullOrEmpty(GetPath("gumpart.mul"))) container_GumpData = new MulContainer(GetPath("gumpidx.mul"), GetPath("gumpart.mul"), data.RealTime); //container_ItemAnim = new MulContainer(0, GetPath("animdata.mul"), realtime); var animationcontainer = new List<IDataContainer>(16); if (!String.IsNullOrEmpty(GetPath("anim.idx")) && !String.IsNullOrEmpty(GetPath("anim.mul"))) animationcontainer.Add(new MulContainer(GetPath("anim.idx"), GetPath("anim.mul"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("anim2.idx")) && !String.IsNullOrEmpty(GetPath("anim2.mul"))) animationcontainer.Add(new MulContainer(GetPath("anim2.idx"), GetPath("anim2.mul"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("anim3.idx")) && !String.IsNullOrEmpty(GetPath("anim3.mul"))) animationcontainer.Add(new MulContainer(GetPath("anim3.idx"), GetPath("anim3.mul"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("anim4.idx")) && !String.IsNullOrEmpty(GetPath("anim4.mul"))) animationcontainer.Add(new MulContainer(GetPath("anim4.idx"), GetPath("anim4.mul"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("anim5.idx")) && !String.IsNullOrEmpty(GetPath("anim5.mul"))) animationcontainer.Add(new MulContainer(GetPath("anim5.idx"), GetPath("anim5.mul"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("animationframe1.uop"))) animationcontainer.Add(new UopContainer(GetPath("animationframe1.uop"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("animationframe2.uop"))) animationcontainer.Add(new UopContainer(GetPath("animationframe2.uop"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("animationframe3.uop"))) animationcontainer.Add(new UopContainer(GetPath("animationframe3.uop"), data.RealTime)); if (!String.IsNullOrEmpty(GetPath("animationframe4.uop"))) animationcontainer.Add(new UopContainer(GetPath("animationframe4.uop"), data.RealTime)); container_Animation = animationcontainer.ToArray(); var maps = data.DataOptions.majorFacet.Length; container_Map = new IDataContainer[maps]; container_Sta = new IDataContainer[maps]; //container_MapDif = new IDataContainer[maps]; //container_StaDif = new IDataContainer[maps]; //container_Facet = new IDataContainer[maps]; for (int m = 0; m < maps; ++m) { string path1, path2, x = data.DataType.HasFlag(UODataType.UseExtFacet) ? "x" : String.Empty; container_Map[m] = !String.IsNullOrEmpty(path2=GetPath("map{0}{1}.mul",m,x)) ? new MulContainer(196, path2, data.RealTime) : null; container_Sta[m] = (!String.IsNullOrEmpty(path1=GetPath("staidx{0}{1}.mul",m,x)) && !String.IsNullOrEmpty(path2=GetPath("statics{0}{1}.mul",m,x))) ? new MulContainer(path1, path2, data.RealTime) : null; //container_Facet[m] = !String.IsNullOrEmpty(path2 = GetPath("facet0{0}.mul", m)) ? new MulContainer(1, path2, data.RealTime) : null; } /* container_Map = new IDataContainer[6]; container_Sta = new IDataContainer[6]; container_MapDif = new IDataContainer[6]; container_StaDif = new IDataContainer[6]; container_Facet = new IDataContainer[6]; for (var i = 0; i < container_UniFont.Length; ++i) container_Map[i] = new MulContainer(0, Path.Combine(folder, String.Format("unifont{0}.mul", i), true)); */ //container_UniFont = new IDataContainer[13]; //for (var i = 0; i < container_UniFont.Length; ++i) // container_UniFont[i] = new MulContainer(0, Path.Combine(folder, String.Format("unifont{0}.mul", i), true)); }
public static IDataContainer CreateVirtualMul(string idxFile, string mulFile) { return(MulContainer.GetVirtual(idxFile, mulFile, true)); }