コード例 #1
0
ファイル: ShineNPC.cs プロジェクト: Canic/Zepheus_2k15
 public static ShineNPC Load(DataTableReaderEx reader)
 {
     ShineNPC info = new ShineNPC
     {
         MobName = reader.GetString("MobName"),
         Map = reader.GetString("Map"),
         Coord_X = reader.GetInt32("Coord-X"),
         Coord_Y = reader.GetInt32("Coord-Y"),
         Direct = reader.GetInt16("Direct"),
         NPCMenu = reader.GetByte("NPCMenu"),
         Role = reader.GetString("Role"),
         RoleArg0 = reader.GetString("RoleArg0"),
     };
     return info;
 }
コード例 #2
0
ファイル: LinkTable.cs プロジェクト: Canic/Zepheus_2k15
 public static LinkTable Load(DataTableReaderEx reader)
 {
     LinkTable info = new LinkTable
     {
         argument = reader.GetString("argument"),
         MapServer = reader.GetString("MapServer"),
         MapClient = reader.GetString("MapClient"),
         Coord_X = reader.GetInt32("Coord-X"),
         Coord_Y = reader.GetInt32("Coord-Y"),
         Direct = reader.GetInt16("Direct"),
         LevelFrom = reader.GetInt16("LevelFrom"),
         LevelTo = reader.GetInt16("LevelTo"),
         Party = reader.GetByte("Party"),
     };
     return info;
 }
コード例 #3
0
ファイル: DataProvider.cs プロジェクト: Canic/Zepheus_2k15
        private void LoadDrops()
        {
            DropGroups = new Dictionary<string, DropGroupInfo>();
            try
            {
                //first we load the dropgroups
                using (var groupfile = new ShineReader(folder + @"\ItemDropGroup.txt"))
                {
                    var table = groupfile["ItemDropGroup"];
                    using (var reader = new DataTableReaderEx(table))
                    {
                        while (reader.Read())
                        {
                            DropGroupInfo info = DropGroupInfo.Load(reader);
                            if (DropGroups.ContainsKey(info.GroupID))
                            {
                                //Log.WriteLine(LogLevel.Warn, "Duplicate DropGroup ID found: {0}.", info.GroupID);
                                continue;
                            }
                            DropGroups.Add(info.GroupID, info);
                        }
                    }
                }

                //now we load the actual drops
                int dropcount = 0;
                using (var tablefile = new ShineReader(folder + @"\ItemDropTable.txt"))
                {
                    var table = tablefile["ItemGroup"];
                    using (var reader = new DataTableReaderEx(table))
                    {
                        while (reader.Read())
                        {
                            string mobid = reader.GetString("MobId");
                            MobInfo mob;
                            if (MobsByName.TryGetValue(mobid, out mob))
                            {
                                mob.MinDropLevel = (byte)reader.GetInt16("MinLevel");
                                mob.MaxDropLevel = (byte)reader.GetInt16("MaxLevel");
                                for (int i = 1; i <= 45; ++i)
                                {
                                    string dropgroup = reader.GetString("DrItem" + i);
                                    if (dropgroup.Length <= 2) continue;
                                    DropGroupInfo group;
                                    if (DropGroups.TryGetValue(dropgroup, out group))
                                    {
                                        float rate = reader.GetInt32("DrItem" + i + "R") / 100000f;
                                        DropInfo info = new DropInfo(group, rate);
                                        mob.Drops.Add(info);
                                        ++dropcount;
                                    }
                                    else
                                    {
                                        //this seems to happen a lot so disable this for the heck of it.
                                        // Log.WriteLine(LogLevel.Warn, "Could not find DropGroup {0}.", dropgroup);
                                    }
                                }
                            }
                            else Log.WriteLine(LogLevel.Warn, "Could not find mobname: {0} for drop.", mobid);
                        }
                    }
                }
                Log.WriteLine(LogLevel.Info, "Loaded {0} DropGroups, with {1} drops in total.", DropGroups.Count, dropcount);
            }
            catch (Exception ex)
            {
                Log.WriteLine(LogLevel.Exception, "Error loading DropTable: {0}", ex);
            }
        }
コード例 #4
0
ファイル: FiestaBaseStat.cs プロジェクト: Canic/Zepheus_2k15
 public static FiestaBaseStat Load(DataTableReaderEx reader, Job job)
 {
     FiestaBaseStat info = new FiestaBaseStat
     {
         Job = job,
         Level = reader.GetInt32("Level"),
         Strength = reader.GetInt32("Strength"),
         Endurance = reader.GetInt32("Constitution"),
         Intelligence = reader.GetInt32("Intelligence"),
         Dexterity = reader.GetInt32("Dexterity"),
         Spirit = reader.GetInt32("MentalPower"),
         SoulHP = reader.GetInt32("SoulHP"),
         MAXSoulHP = reader.GetInt32("MAXSoulHP"),
         PriceHPStone = reader.GetInt32("PriceHPStone"),
         SoulSP = reader.GetInt32("SoulSP"),
         MAXSoulSP = reader.GetInt32("MAXSoulSP"),
         PriceSPStone = reader.GetInt32("PriceSPStone"),
         AtkPerAP = reader.GetInt32("AtkPerAP"),
         DmgPerAP = reader.GetInt32("DmgPerAP"),
         MaxPwrStone = reader.GetInt32("MaxPwrStone"),
         NumPwrStone = reader.GetInt32("NumPwrStone"),
         PricePwrStone = reader.GetInt32("PricePwrStone"),
         PwrStoneWC = reader.GetInt32("PwrStoneWC"),
         PwrStoneMA = reader.GetInt32("PwrStoneMA"),
         MaxGrdStone = reader.GetInt32("MaxGrdStone"),
         NumGrdStone = reader.GetInt32("NumGrdStone"),
         PriceGrdStone = reader.GetInt32("PriceGrdStone"),
         GrdStoneAC = reader.GetInt32("GrdStoneAC"),
         GrdStoneMR = reader.GetInt32("GrdStoneMR"),
         PainRes = reader.GetInt32("PainRes"),
         RestraintRes = reader.GetInt32("RestraintRes"),
         CurseRes = reader.GetInt32("CurseRes"),
         ShockRes = reader.GetInt32("ShockRes"),
         MaxHP = (UInt32)reader.GetInt16("MaxHP"),
         MaxSP = (UInt32)reader.GetInt16("MaxSP"),
         CharTitlePt = reader.GetInt32("CharTitlePt"),
         SkillPwrPt = reader.GetInt32("SkillPwrPt"),
     };
     return info;
 }