コード例 #1
0
        private void HandlePets(WzDirectory pDir)
        {
            string tmp = exDir;

            exDir += Path.DirectorySeparatorChar + pDir.Name; // Pet
            foreach (var item in pDir.GetChildImages())       // 5000000.img
            {
                exDir += Path.DirectorySeparatorChar + item.Name + Path.DirectorySeparatorChar;
                int itemid = Convert.ToInt32(item.Name.Remove(item.Name.IndexOf('.')));
                currentID = itemid;
                if (item["info"] != null)
                {
                    ExportIfExists(exDir, item["info"]["icon"], "info");
                    ExportIfExists(exDir, item["info"]["iconRaw"], "info");
                    ExportIfExists(exDir, item["info"]["iconD"], "info"); // Dead pets
                    ExportIfExists(exDir, item["info"]["iconRawD"], "info");
                    ItemInformation.Instance.HandleInfo(currentID, item["info"].ToSubProperty());
                }
                if (item["stand0"] != null)
                {
                    ExportIfExists(exDir, item["stand0"]["0"], "stand0");
                    SaveVector(item["stand0"]["0"]["origin"] as WzVectorProperty, "stand0.0");
                }

                exDir = RemoveFromBackDirSlash(exDir);
                exDir = RemoveFromBackDirSlash(exDir);
            }
            exDir = RemoveFromBackDirSlash(exDir);
        }
コード例 #2
0
ファイル: CharacterWz.cs プロジェクト: Rudigus/HeavenBase
 public int GetFamiliarQuantity()
 {
     return(FamiliarDirectory.GetChildImages().Count);
 }
コード例 #3
0
ファイル: CharacterWz.cs プロジェクト: Rudigus/HeavenBase
 public int GetEquipQuantity()
 {
     return(EquipDirectory.GetChildImages().Count);
 }
コード例 #4
0
        private void HandleItemCategory(WzDirectory pDir)
        {
            string tmp = exDir;

            exDir += Path.DirectorySeparatorChar + pDir.Name; // Etc
            foreach (var collection in pDir.GetChildImages()) // 0400.img
            {
                exDir += Path.DirectorySeparatorChar + collection.Name;
                bool isNebuliteDir = collection.Name == "0306.img";
                foreach (var item in collection.WzProperties.Where(p => { return(p is WzSubProperty); })) // 04000000
                {
                    exDir += Path.DirectorySeparatorChar + item.Name + Path.DirectorySeparatorChar;

                    currentID = Convert.ToInt32(item.Name);

                    if (item["info"] != null)
                    {
                        ExportIfExists(exDir, item["info"]["icon"], "info");
                        ExportIfExists(exDir, item["info"]["iconRaw"], "info");
                        ExportIfExists(exDir, item["info"]["iconD"], "info");
                        ExportIfExists(exDir, item["info"]["iconRawD"], "info");
                        ItemInformation.Instance.HandleInfo(currentID, item["info"].ToSubProperty());
                    }
                    if (item["spec"] != null)
                    {
                        if (item["spec"]["slotCount"] != null)
                        {
                            SQLStrings.Instance.AppendRow("item_spec", currentID, "slotcount", item["spec"]["slotCount"].ToInt().ToString());
                        }
                        if (item["spec"]["slotPerLine"] != null)
                        {
                            SQLStrings.Instance.AppendRow("item_spec", currentID, "slotperline", item["spec"]["slotPerLine"].ToInt().ToString());
                        }
                        if (item["spec"]["type"] != null)
                        {
                            SQLStrings.Instance.AppendRow("item_spec", currentID, "type", item["spec"]["type"].ToInt().ToString());
                        }
                    }
                    if (item["effect"] != null)
                    {
                        foreach (var stance in CharacterExtractor.STANCES)
                        {
                            if (item["effect"][stance] != null)
                            {
                                HandleHairStyle(exDir, item["effect"][stance].ToSubProperty(), "effect." + stance);
                            }
                        }
                    }
                    if (isNebuliteDir && item["socket"] != null)
                    {
                        // Extract moar options
                        string description = item["socket"]["string"] != null ? item["socket"]["string"].ToStringValue() : "";

                        string optionlist = "";
                        foreach (var option in item["socket"]["option"].WzProperties)
                        {
                            if (optionlist != "")
                            {
                                optionlist += ';';
                            }
                            optionlist += option["optionString"].ToStringValue() + '=' + option["level"].ToInt();
                        }

                        SqlFileItemSocket.Instance.AppendRow(currentID, description, optionlist);
                    }

                    exDir = RemoveFromBackDirSlash(exDir);
                    exDir = RemoveFromBackDirSlash(exDir);
                }
                exDir = RemoveFromBackDirSlash(exDir);
            }
            exDir = RemoveFromBackDirSlash(exDir);
        }