本文整理汇总了C#中InIReader类 的典型用法代码示例。如果您正苦于以下问题:C# InIReader类的具体用法?C# InIReader怎么用?C# InIReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InIReader类 属于命名空间,在下文中一共展示了InIReader类 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: LoadCustomAI
public CustomAI LoadCustomAI(string mobName)
{
if (mobName.Length <= 0) return null;
try
{
InIReader Reader = new InIReader(@".\Custom\Unique AIs\" + mobName + ".ini");
CustomAI mobAI = new CustomAI();
mobAI.Name = mobName;
#region Loading the Bools
mobAI.SetXY = Reader.ReadBoolean("Bools", "SetXY", mobAI.SetXY);
mobAI.MapSpecific = Reader.ReadBoolean("Bools", "MapSpecific", mobAI.MapSpecific);
mobAI.AnnounceSpawn = Reader.ReadBoolean("Bools", "AnnounceSpawn", mobAI.AnnounceSpawn);
mobAI.AnnounceDrop = Reader.ReadBoolean("Bools", "AnnounceDrop", mobAI.AnnounceDrop);
mobAI.AnnounceDeath = Reader.ReadBoolean("Bools", "AnnounceDeath", mobAI.AnnounceDeath);
mobAI.UseMassAttack = Reader.ReadBoolean("Bools", "UseMassAttack", mobAI.UseMassAttack);
mobAI.UseSpecialAttack = Reader.ReadBoolean("Bools", "UseSpecialAttack", mobAI.UseSpecialAttack);
mobAI.UseMeleeAttack = Reader.ReadBoolean("Bools", "UseMeleeAttack", mobAI.UseMeleeAttack);
mobAI.UseRangeAttack = Reader.ReadBoolean("Bools", "UseRangeAttack", mobAI.UseRangeAttack);
mobAI.UseMagicAttack = Reader.ReadBoolean("Bools", "UseMagicAttack", mobAI.UseMagicAttack);
mobAI.Target = Reader.ReadBoolean("Bools", "Target", mobAI.Target);
mobAI.UseKillTimer = Reader.ReadBoolean("Bools", "UseKillTimer", mobAI.UseKillTimer);
mobAI.IgnorePets = Reader.ReadBoolean("Bools", "IgnorePets", mobAI.IgnorePets);
mobAI.DamagePetsMore = Reader.ReadBoolean("Bools", "DamagePetsMore", mobAI.DamagePetsMore);
mobAI.CanPara = Reader.ReadBoolean("Bools", "CanPara", mobAI.CanPara);
mobAI.CanGreen = Reader.ReadBoolean("Bools", "CanGreen", mobAI.CanGreen);
mobAI.CanRed = Reader.ReadBoolean("Bools", "CanRed", mobAI.CanRed);
mobAI.Spawn_Slaves = Reader.ReadBoolean("Bools", "SpawnSlaves", mobAI.Spawn_Slaves);
#endregion
#region Loading the Kill Timer
if (mobAI.UseKillTimer)
{
mobAI.KillTimer = Reader.ReadString("Strings", "KillTimer", mobAI.KillTimer);
if (mobAI.killTimer.Length > 0)
{
string[] timeString = mobAI.KillTimer.Split(' ');
string[] dateString = timeString[0].Split('-');
dateString[0] = dateString[0].Replace("(", "");
mobAI.LastKillDay = Convert.ToInt32(dateString[0]);
mobAI.LastKillMonth = Convert.ToInt32(dateString[1]);
mobAI.LastKillYear = Convert.ToInt32(dateString[2]);
dateString[1] = dateString[1].Replace("(", "");
dateString[1] = dateString[1].Replace(")", "");
string[] tempString = timeString[1].Split(':');
if (tempString[0].Contains("("))
tempString[0] = tempString[0].Replace("(", "");
if (tempString[1].Contains(")"))
tempString[1] = tempString[1].Replace(")", "");
mobAI.LastKillHour = Convert.ToInt32(tempString[0]);
mobAI.LastKillMinute = Convert.ToInt32(tempString[1]);
}
mobAI.RespawnDay = Reader.ReadInt32("Ints", "RespawnDays", mobAI.RespawnDay);
mobAI.RespawnMonth = Reader.ReadInt32("Ints", "RespawnMonths", mobAI.RespawnMonth);
mobAI.RespawnYear = Reader.ReadInt32("Ints", "RespawnYears", mobAI.RespawnYear);
mobAI.RespawnHour = Reader.ReadInt32("Ints", "RespawnHours", mobAI.RespawnHour);
mobAI.RespawnMinute = Reader.ReadInt32("Ints", "RespawnMinutes", mobAI.RespawnMinute);
}
#endregion
if (mobAI.MapSpecific)
mobAI.MapName = Reader.ReadString("Strings", "MapName", mobAI.MapName);
#region Loading the announcers
if (mobAI.AnnounceSpawn)
mobAI.SpawnMessage = Reader.ReadString("Strings", "SpawnMessage", mobAI.SpawnMessage);
if (mobAI.AnnounceDeath)
mobAI.DeadMessage = Reader.ReadString("Strings", "DeathMessage", mobAI.DeadMessage);
if (mobAI.AnnounceDrop)
mobAI.ItemMessage = Reader.ReadString("Strings", "ItemMessage", mobAI.ItemMessage);
#endregion
if (SetXY)
{
mobAI.MapX = Reader.ReadInt32("Ints", "MapX", mobAI.MapX);
mobAI.MapY = Reader.ReadInt32("Ints", "MapY", mobAI.MapY);
}
#region Loading the Attacks
if (mobAI.UseMassAttack)
{
mobAI.MassAttackEffect = Reader.ReadInt32("Ints", "MassAttackEffect", mobAI.MassAttackEffect);
mobAI.MassAttackDamage = Reader.ReadInt32("Damage", "MassAttackDamage", mobAI.MassAttackDamage);
}
if (mobAI.UseSpecialAttack)
{
mobAI.SpecialAttackEffect = Reader.ReadInt32("Ints", "SpecialAttackEffect", mobAI.SpecialAttackEffect);
mobAI.SpecialAttackDamage = Reader.ReadInt32("Damage", "SpecialAttackDamage", mobAI.SpecialAttackDamage);
}
if (mobAI.UseMeleeAttack)
{
mobAI.MeleeAttackEffect = Reader.ReadInt32("Ints", "MeleeAttackEffect", mobAI.MeleeAttackEffect);
mobAI.MeleeAttackDamage = Reader.ReadInt32("Damage", "MeleeAttackDamage", mobAI.MeleeAttackDamage);
}
if (mobAI.UseRangeAttack)
{
mobAI.RangeAttackEffect = Reader.ReadInt32("Ints", "RangeAttackEffect", mobAI.RangeAttackEffect);
mobAI.RangeAttackDamage = Reader.ReadInt32("Damage", "RangeAttackDamage", mobAI.RangeAttackDamage);
}
//.........这里部分代码省略.........
开发者ID:Pete107, 项目名称:Mir2, 代码行数:101, 代码来源:CustomAI.cs
示例2: SaveGuildSettings
public static void SaveGuildSettings()
{
File.Delete(ConfigPath + @".\GuildSettings.ini");
InIReader reader = new InIReader(ConfigPath + @".\GuildSettings.ini");
reader.Write("Guilds", "MinimumLevel", Guild_RequiredLevel);
reader.Write("Guilds", "ExpRate", Guild_ExpRate);
reader.Write("Guilds", "PointPerLevel", Guild_PointPerLevel);
reader.Write("Guilds", "TotalBuffs", Guild_BuffList.Count);
reader.Write("Guilds", "WarTime", Guild_WarTime);
reader.Write("Guilds", "WarCost", Guild_WarCost);
int i = 0;
for (i = 0; i < Guild_ExperienceList.Count; i++)
{
reader.Write("Exp", "Level-" + i.ToString(), Guild_ExperienceList[i]);
}
for (i = 0; i < Guild_MembercapList.Count; i++)
{
reader.Write("Cap", "Level-" + i.ToString(), Guild_MembercapList[i]);
}
for (i = 0; i < Guild_CreationCostList.Count; i++)
{
reader.Write("Required-" + i.ToString(), "ItemName", Guild_CreationCostList[i].ItemName);
reader.Write("Required-" + i.ToString(), "Amount", Guild_CreationCostList[i].Amount);
}
for (i = 0; i < Guild_BuffList.Count; i++)
{
Guild_BuffList[i].Save(reader, i);
}
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:30, 代码来源:Settings.cs
示例3: GuildBuffInfo
public GuildBuffInfo(InIReader reader, int i)
{
Id = reader.ReadInt32("Buff-" + i.ToString(), "Id",0);
Icon = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0);
name = reader.ReadString("Buff-" + i.ToString(), "Name","");
LevelRequirement = reader.ReadByte("Buff-" + i.ToString(), "LevelReq",0);
PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq",1);
TimeLimit = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit",0);;
ActivationCost = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost",0);
BuffAc = reader.ReadByte("Buff-" + i.ToString(), "BuffAc",0);
BuffMac = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC",0);
BuffDc = reader.ReadByte("Buff-" + i.ToString(), "BuffDc",0);
BuffMc = reader.ReadByte("Buff-" + i.ToString(), "BuffMc",0);
BuffSc = reader.ReadByte("Buff-" + i.ToString(), "BuffSc",0);
BuffMaxHp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp",0);
BuffMaxMp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp",0);
BuffMineRate = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate",0);
BuffGemRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate",0);
BuffFishRate = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate",0);
BuffExpRate = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate",0);
BuffCraftRate = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate",0);
BuffSkillRate = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate",0);
BuffHpRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen",0);
BuffMPRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen",0);
BuffAttack = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack",0);
BuffDropRate = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate",0);
BuffGoldRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate",0);
}
开发者ID:thedeaths, 项目名称:official-mir2c-, 代码行数:28, 代码来源:Common.cs
示例4: SaveRandomItemStats
public static void SaveRandomItemStats()
{
File.Delete(ConfigPath + @".\RandomItemStats.ini");
InIReader reader = new InIReader(ConfigPath + @".\RandomItemStats.ini");
RandomItemStat stat;
for (int i = 0; i < RandomItemStatsList.Count; i++)
{
stat = RandomItemStatsList[i];
reader.Write("Item" + i.ToString(), "MaxDuraChance", stat.MaxDuraChance);
reader.Write("Item" + i.ToString(), "MaxDuraStatChance", stat.MaxDuraStatChance);
reader.Write("Item" + i.ToString(), "MaxDuraMaxStat", stat.MaxDuraMaxStat);
reader.Write("Item" + i.ToString(), "MaxAcChance", stat.MaxAcChance);
reader.Write("Item" + i.ToString(), "MaxAcStatChance", stat.MaxAcStatChance);
reader.Write("Item" + i.ToString(), "MaxAcMaxStat", stat.MaxAcMaxStat);
reader.Write("Item" + i.ToString(), "MaxMacChance", stat.MaxMacChance);
reader.Write("Item" + i.ToString(), "MaxMacStatChance", stat.MaxMacStatChance);
reader.Write("Item" + i.ToString(), "MaxMACMaxStat", stat.MaxMacMaxStat);
reader.Write("Item" + i.ToString(), "MaxDcChance", stat.MaxDcChance);
reader.Write("Item" + i.ToString(), "MaxDcStatChance", stat.MaxDcStatChance);
reader.Write("Item" + i.ToString(), "MaxDcMaxStat", stat.MaxDcMaxStat);
reader.Write("Item" + i.ToString(), "MaxMcChance", stat.MaxMcChance);
reader.Write("Item" + i.ToString(), "MaxMcStatChance", stat.MaxMcStatChance);
reader.Write("Item" + i.ToString(), "MaxMcMaxStat", stat.MaxMcMaxStat);
reader.Write("Item" + i.ToString(), "MaxScChance", stat.MaxScChance);
reader.Write("Item" + i.ToString(), "MaxScStatChance", stat.MaxScStatChance);
reader.Write("Item" + i.ToString(), "MaxScMaxStat", stat.MaxScMaxStat);
reader.Write("Item" + i.ToString(), "AccuracyChance", stat.AccuracyChance);
reader.Write("Item" + i.ToString(), "AccuracyStatChance", stat.AccuracyStatChance);
reader.Write("Item" + i.ToString(), "AccuracyMaxStat", stat.AccuracyMaxStat);
reader.Write("Item" + i.ToString(), "AgilityChance", stat.AgilityChance);
reader.Write("Item" + i.ToString(), "AgilityStatChance", stat.AgilityStatChance);
reader.Write("Item" + i.ToString(), "AgilityMaxStat", stat.AgilityMaxStat);
reader.Write("Item" + i.ToString(), "HpChance", stat.HpChance);
reader.Write("Item" + i.ToString(), "HpStatChance", stat.HpStatChance);
reader.Write("Item" + i.ToString(), "HpMaxStat", stat.HpMaxStat);
reader.Write("Item" + i.ToString(), "MpChance", stat.MpChance);
reader.Write("Item" + i.ToString(), "MpStatChance", stat.MpStatChance);
reader.Write("Item" + i.ToString(), "MpMaxStat", stat.MpMaxStat);
reader.Write("Item" + i.ToString(), "StrongChance", stat.StrongChance);
reader.Write("Item" + i.ToString(), "StrongStatChance", stat.StrongStatChance);
reader.Write("Item" + i.ToString(), "StrongMaxStat", stat.StrongMaxStat);
reader.Write("Item" + i.ToString(), "MagicResistChance", stat.MagicResistChance);
reader.Write("Item" + i.ToString(), "MagicResistStatChance", stat.MagicResistStatChance);
reader.Write("Item" + i.ToString(), "MagicResistMaxStat", stat.MagicResistMaxStat);
reader.Write("Item" + i.ToString(), "PoisonResistChance", stat.PoisonResistChance);
reader.Write("Item" + i.ToString(), "PoisonResistStatChance", stat.PoisonResistStatChance);
reader.Write("Item" + i.ToString(), "PoisonResistMaxStat", stat.PoisonResistMaxStat);
reader.Write("Item" + i.ToString(), "HpRecovChance", stat.HpRecovChance);
reader.Write("Item" + i.ToString(), "HpRecovStatChance", stat.HpRecovStatChance);
reader.Write("Item" + i.ToString(), "HpRecovMaxStat", stat.HpRecovMaxStat);
reader.Write("Item" + i.ToString(), "MpRecovChance", stat.MpRecovChance);
reader.Write("Item" + i.ToString(), "MpRecovStatChance", stat.MpRecovStatChance);
reader.Write("Item" + i.ToString(), "MpRecovMaxStat", stat.MpRecovMaxStat);
reader.Write("Item" + i.ToString(), "PoisonRecovChance", stat.PoisonRecovChance);
reader.Write("Item" + i.ToString(), "PoisonRecovStatChance", stat.PoisonRecovStatChance);
reader.Write("Item" + i.ToString(), "PoisonRecovMaxStat", stat.PoisonRecovMaxStat);
reader.Write("Item" + i.ToString(), "CriticalRateChance", stat.CriticalRateChance);
reader.Write("Item" + i.ToString(), "CriticalRateStatChance", stat.CriticalRateStatChance);
reader.Write("Item" + i.ToString(), "CriticalRateMaxStat", stat.CriticalRateMaxStat);
reader.Write("Item" + i.ToString(), "CriticalDamageChance", stat.CriticalDamageChance);
reader.Write("Item" + i.ToString(), "CriticalDamageStatChance", stat.CriticalDamageStatChance);
reader.Write("Item" + i.ToString(), "CriticalDamageMaxStat", stat.CriticalDamageMaxStat);
reader.Write("Item" + i.ToString(), "FreezeChance", stat.FreezeChance);
reader.Write("Item" + i.ToString(), "FreezeStatChance", stat.FreezeStatChance);
reader.Write("Item" + i.ToString(), "FreezeMaxStat", stat.FreezeMaxStat);
reader.Write("Item" + i.ToString(), "PoisonAttackChance", stat.PoisonAttackChance);
reader.Write("Item" + i.ToString(), "PoisonAttackStatChance", stat.PoisonAttackStatChance);
reader.Write("Item" + i.ToString(), "PoisonAttackMaxStat", stat.PoisonAttackMaxStat);
reader.Write("Item" + i.ToString(), "AttackSpeedChance", stat.AttackSpeedChance);
reader.Write("Item" + i.ToString(), "AttackSpeedStatChance", stat.AttackSpeedStatChance);
reader.Write("Item" + i.ToString(), "AttackSpeedMaxStat", stat.AttackSpeedMaxStat);
reader.Write("Item" + i.ToString(), "LuckChance", stat.LuckChance);
reader.Write("Item" + i.ToString(), "LuckStatChance", stat.LuckStatChance);
reader.Write("Item" + i.ToString(), "LuckMaxStat", stat.LuckMaxStat);
reader.Write("Item" + i.ToString(), "CurseChance", stat.CurseChance);
}
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:77, 代码来源:Settings.cs
示例5: SaveMines
public static void SaveMines()
{
File.Delete(ConfigPath + @".\Mines.ini");
InIReader reader = new InIReader(ConfigPath + @".\Mines.ini");
MineSet Mine;
for (int i = 0; i < MineSetList.Count; i++)
{
Mine = MineSetList[i];
reader.Write("Mine" + i.ToString(), "Name", Mine.Name);
reader.Write("Mine" + i.ToString(), "SpotRegenRate", Mine.SpotRegenRate);
reader.Write("Mine" + i.ToString(), "MaxStones", Mine.MaxStones);
reader.Write("Mine" + i.ToString(), "HitRate", Mine.HitRate);
reader.Write("Mine" + i.ToString(), "DropRate", Mine.DropRate);
reader.Write("Mine" + i.ToString(), "TotalSlots", Mine.TotalSlots);
for (int j = 0; j < Mine.Drops.Count; j++)
{
MineDrop Drop = Mine.Drops[j];
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-ItemName", Drop.ItemName);
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", Drop.MinSlot);
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxSlot", Drop.MaxSlot);
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MinDura", Drop.MinDura);
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxDura", Drop.MaxDura);
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-BonusChance", Drop.BonusChance);
reader.Write("Mine" + i.ToString(), "D" + j.ToString() + "-MaxBonusDura", Drop.MaxBonusDura);
}
}
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:28, 代码来源:Settings.cs
示例6: LoadEXP
public static void LoadEXP()
{
long exp = 100;
InIReader reader = new InIReader(ConfigPath + @".\ExpList.ini");
for (int i = 1; i <= 500; i++)
{
exp = reader.ReadInt64("Exp", "Level" + i, exp);
ExperienceList.Add(exp);
}
//ArcherSpells - Elemental system
reader = new InIReader(ConfigPath + @".\OrbsExpList.ini");
for (int i = 1; i <= 4; i++)
{
exp = i * 50;//default exp value
exp = reader.ReadInt64("Exp", "Orb" + i, exp);
OrbsExpList.Add(exp);
exp = i * 2;//default defense value
exp = reader.ReadInt64("Def", "Orb" + i, exp);
OrbsDefList.Add(exp);
exp = i * 4;//default power value
exp = reader.ReadInt64("Att", "Orb" + i, exp);
OrbsDmgList.Add(exp);
}
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:26, 代码来源:Settings.cs
示例7: SaveBaseStats
public static void SaveBaseStats()
{
File.Delete(ConfigPath + @".\BaseStats.ini");
InIReader reader = new InIReader(ConfigPath + @".\BaseStats.ini");
for (int i = 0; i < ClassBaseStats.Length; i++)
{
reader.Write(BaseStatClassNames[i], "HpGain", ClassBaseStats[i].HpGain);
reader.Write(BaseStatClassNames[i], "HpGainRate", ClassBaseStats[i].HpGainRate);
reader.Write(BaseStatClassNames[i], "MpGainRate", ClassBaseStats[i].MpGainRate);
reader.Write(BaseStatClassNames[i], "BagWeightGain", ClassBaseStats[i].BagWeightGain);
reader.Write(BaseStatClassNames[i], "WearWeightGain", ClassBaseStats[i].WearWeightGain);
reader.Write(BaseStatClassNames[i], "HandWeightGain", ClassBaseStats[i].HandWeightGain);
reader.Write(BaseStatClassNames[i], "MinAc", ClassBaseStats[i].MinAc);
reader.Write(BaseStatClassNames[i], "MaxAc", ClassBaseStats[i].MaxAc);
reader.Write(BaseStatClassNames[i], "MinMac", ClassBaseStats[i].MinMac);
reader.Write(BaseStatClassNames[i], "MaxMac", ClassBaseStats[i].MaxMac);
reader.Write(BaseStatClassNames[i], "MinDc", ClassBaseStats[i].MinDc);
reader.Write(BaseStatClassNames[i], "MaxDc", ClassBaseStats[i].MaxDc);
reader.Write(BaseStatClassNames[i], "MinMc", ClassBaseStats[i].MinMc);
reader.Write(BaseStatClassNames[i], "MaxMc", ClassBaseStats[i].MaxMc);
reader.Write(BaseStatClassNames[i], "MinSc", ClassBaseStats[i].MinSc);
reader.Write(BaseStatClassNames[i], "MaxSc", ClassBaseStats[i].MaxSc);
reader.Write(BaseStatClassNames[i], "StartAgility", ClassBaseStats[i].StartAgility);
reader.Write(BaseStatClassNames[i], "StartAccuracy", ClassBaseStats[i].StartAccuracy);
reader.Write(BaseStatClassNames[i], "StartCriticalRate", ClassBaseStats[i].StartCriticalRate);
reader.Write(BaseStatClassNames[i], "StartCriticalDamage", ClassBaseStats[i].StartCriticalDamage);
reader.Write(BaseStatClassNames[i], "CritialRateGain", ClassBaseStats[i].CritialRateGain);
reader.Write(BaseStatClassNames[i], "CriticalDamageGain", ClassBaseStats[i].CriticalDamageGain);
}
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:31, 代码来源:Settings.cs
示例8: SaveMail
public static void SaveMail()
{
File.Delete(ConfigPath + @".\MailSystem.ini");
InIReader reader = new InIReader(ConfigPath + @".\MailSystem.ini");
reader.Write("AutoSend", "Gold", MailAutoSendGold);
reader.Write("AutoSend", "Items", MailAutoSendItems);
reader.Write("Rates", "FreeWithStamp", MailFreeWithStamp);
reader.Write("Rates", "CostPer1k", MailCostPer1KGold);
reader.Write("Rates", "InsurancePerItem", MailItemInsurancePercentage);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:10, 代码来源:Settings.cs
示例9: LoadRefine
public static void LoadRefine()
{
if (!File.Exists(ConfigPath + @".\RefineSystem.ini"))
{
SaveRefine();
return;
}
InIReader reader = new InIReader(ConfigPath + @".\RefineSystem.ini");
OnlyRefineWeapon = reader.ReadBoolean("Config", "OnlyRefineWeapon", OnlyRefineWeapon);
RefineBaseChance = reader.ReadByte("Config", "BaseChance", RefineBaseChance);
RefineTime = reader.ReadInt32("Config", "Time", RefineTime);
RefineIncrease = reader.ReadByte("Config", "StatIncrease", RefineIncrease);
RefineCritChance = reader.ReadByte("Config", "CritChance", RefineCritChance);
RefineCritIncrease = reader.ReadByte("Config", "CritIncrease", RefineCritIncrease);
RefineWepStatReduce = reader.ReadByte("Config", "WepStatReducedChance", RefineWepStatReduce);
RefineItemStatReduce = reader.ReadByte("Config", "ItemStatReducedChance", RefineItemStatReduce);
RefineCost = reader.ReadInt32("Config", "RefineCost", RefineCost);
RefineOreName = reader.ReadString("Ore", "OreName", RefineOreName);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:21, 代码来源:Settings.cs
示例10: SaveFishing
public static void SaveFishing()
{
File.Delete(ConfigPath + @".\FishingSystem.ini");
InIReader reader = new InIReader(ConfigPath + @".\FishingSystem.ini");
reader.Write("Rates", "Attempts", FishingAttempts);
reader.Write("Rates", "SuccessStart", FishingSuccessStart);
reader.Write("Rates", "SuccessMultiplier", FishingSuccessMultiplier);
reader.Write("Rates", "Delay", FishingDelay);
reader.Write("Rates", "MonsterSpawnChance", FishingMobSpawnChance);
reader.Write("Game", "Monster", FishingMonster);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:11, 代码来源:Settings.cs
示例11: LoadMail
public static void LoadMail()
{
if (!File.Exists(ConfigPath + @".\MailSystem.ini"))
{
SaveMail();
return;
}
InIReader reader = new InIReader(ConfigPath + @".\MailSystem.ini");
MailAutoSendGold = reader.ReadBoolean("AutoSend", "Gold", MailAutoSendGold);
MailAutoSendItems = reader.ReadBoolean("AutoSend", "Items", MailAutoSendItems);
MailFreeWithStamp = reader.ReadBoolean("Rates", "FreeWithStamp", MailFreeWithStamp);
MailCostPer1KGold = reader.ReadUInt32("Rates", "CostPer1k", MailCostPer1KGold);
MailItemInsurancePercentage = reader.ReadUInt32("Rates", "InsurancePerItem", MailItemInsurancePercentage);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:15, 代码来源:Settings.cs
示例12: LoadFishing
public static void LoadFishing()
{
if (!File.Exists(ConfigPath + @".\FishingSystem.ini"))
{
SaveFishing();
return;
}
InIReader reader = new InIReader(ConfigPath + @".\FishingSystem.ini");
FishingAttempts = reader.ReadInt32("Rates", "Attempts", FishingAttempts);
FishingSuccessStart = reader.ReadInt32("Rates", "SuccessStart", FishingSuccessStart);
FishingSuccessMultiplier = reader.ReadInt32("Rates", "SuccessMultiplier", FishingSuccessMultiplier);
FishingDelay = reader.ReadInt64("Rates", "Delay", FishingDelay);
FishingMobSpawnChance = reader.ReadInt32("Rates", "MonsterSpawnChance", FishingMobSpawnChance);
FishingMonster = reader.ReadString("Game", "Monster", FishingMonster);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:16, 代码来源:Settings.cs
示例13: SaveAwakeAttribute
public static void SaveAwakeAttribute()
{
File.Delete(ConfigPath + @".\AwakeningSystem.ini");
InIReader reader = new InIReader(ConfigPath + @".\AwakeningSystem.ini");
reader.Write("Attribute", "SuccessRate", Awake.AwakeSuccessRate);
reader.Write("Attribute", "HitRate", Awake.AwakeHitRate);
reader.Write("Attribute", "MaxUpgradeLevel", Awake.MaxAwakeLevel);
reader.Write("IncreaseValue", "WeaponValue", Awake.Awake_WeaponRate);
reader.Write("IncreaseValue", "HelmetValue", Awake.Awake_HelmetRate);
reader.Write("IncreaseValue", "ArmorValue", Awake.Awake_ArmorRate);
for (int i = 0; i < 4; i++)
{
reader.Write("Value", "ChanceMax_" + ((ItemGrade)(i + 1)).ToString(), Awake.AwakeChanceMax[i]);
}
if (Awake.AwakeMaterials.Count == 0)
{
for (int i = 0; i < (int)AwakeType.HPMP; i++)
{
for (int j = 0; j < 4; j++)
{
reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material1", 1);
reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material2", 1);
}
}
}
else
{
for (int i = 0; i < (int)AwakeType.HPMP; i++)
{
List<byte>[] value = Awake.AwakeMaterials[i];
for (int j = 0; j < value[0].Count; j++)
{
reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material1", value[0][j]);
reader.Write("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material2", value[1][j]);
}
Awake.AwakeMaterials.Add(value);
}
}
for (int c = 0; c < 4; c++)
{
reader.Write("Materials_IncreaseValue", "Materials_" + ((ItemGrade)(c + 1)).ToString(), Awake.AwakeMaterialRate[c]);
}
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:49, 代码来源:Settings.cs
示例14: Save
public bool Save(CustomAI mobToSave)
{
if (mobToSave == null || mobToSave.Name.Length <= 0)
return false;
InIReader Writer = new InIReader(@".\Custom\Unique AIs\" + mobToSave.Name + ".ini");
Writer.Write("Bools", "SetXY", mobToSave.SetXY);
Writer.Write("Bools", "MapSpecific", mobToSave.MapSpecific);
Writer.Write("Bools", "AnnounceSpawn", mobToSave.AnnounceSpawn);
Writer.Write("Bools", "AnnounceDrop", mobToSave.AnnounceDrop);
Writer.Write("Bools", "AnnounceDeath", mobToSave.AnnounceDeath);
Writer.Write("Bools", "UseMassAttack", mobToSave.UseMassAttack);
Writer.Write("Bools", "UseSpecialAttack", mobToSave.UseSpecialAttack);
Writer.Write("Bools", "UseMeleeAttack", mobToSave.UseMeleeAttack);
Writer.Write("Bools", "UseRangeAttack", mobToSave.UseRangeAttack);
Writer.Write("Bools", "Target", mobToSave.Target);
Writer.Write("Bools", "UseKillTimer", mobToSave.UseKillTimer);
Writer.Write("Bools", "IgnorePets", mobToSave.IgnorePets);
Writer.Write("Bools", "DamagePetsMore", mobToSave.DamagePetsMore);
Writer.Write("Bools", "CanPara", mobToSave.CanPara);
Writer.Write("Bools", "CanGreen", mobToSave.CanGreen);
Writer.Write("Bools", "CanRed", mobToSave.CanRed);
Writer.Write("Bools", "SpawnSlaves", mobToSave.Spawn_Slaves);
if (mobToSave.MapSpecific)
Writer.Write("Strings", "MapName", mobToSave.MapName);
if (mobToSave.AnnounceSpawn)
Writer.Write("Strings", "SpawnMessage", mobToSave.SpawnMessage);
if (mobToSave.AnnounceDeath)
Writer.Write("Strings", "DeathMessage", mobToSave.DeadMessage);
if (mobToSave.AnnounceDrop)
Writer.Write("Strings", "ItemMessage", mobToSave.ItemMessage);
if (mobToSave.SetXY)
{
Writer.Write("Ints", "MapX", mobToSave.MapX);
Writer.Write("Ints", "MapY", mobToSave.MapY);
}
if (mobToSave.UseMassAttack)
{
Writer.Write("Ints", "MassAttackEffect", mobToSave.MassAttackEffect);
Writer.Write("Damage", "MassAttackDamage", mobToSave.MassAttackDamage);
}
if (mobToSave.UseSpecialAttack)
{
Writer.Write("Ints", "SpecialAttackEffect", mobToSave.SpecialAttackEffect);
Writer.Write("Damage", "SpecialAttackDamage", mobToSave.SpecialAttackDamage);
}
if (mobToSave.UseMeleeAttack)
{
Writer.Write("Ints", "MeleeAttackEffect", mobToSave.MeleeAttackEffect);
Writer.Write("Damage", "MeleeAttackDamage", mobToSave.MeleeAttackDamage);
}
if (mobToSave.UseRangeAttack)
{
Writer.Write("Ints", "RangeAttackEffect", mobToSave.RangeAttackEffect);
Writer.Write("Damage", "RangeAttackDamage", mobToSave.RangeAttackDamage);
}
if (mobToSave.UseMagicAttack)
{
Writer.Write("Ints", "MagicAttackEffect", mobToSave.MagicAttackEffect);
Writer.Write("Damage", "MagicAttackDamage", mobToSave.MagicAttackDamage);
}
if (mobToSave.Target)
{
Writer.Write("Strings", "TargetClass", mobToSave.TargetClass); //Default = Warrior
Writer.Write("Damage", "TargetDamage", mobToSave.TargetAttackDamage);
}
if (mobToSave.DamagePetsMore || !mobToSave.IgnorePets)
Writer.Write("Damage", "PetDamage", mobToSave.PetAttackDamage);
if (mobToSave.UseKillTimer)
{
Writer.Write("Strings", "KillTimer", mobToSave.KillTimer);
Writer.Write("Ints", "RespawnDays", mobToSave.RespawnDay);
Writer.Write("Ints", "RespawnMonths", mobToSave.RespawnMonth);
Writer.Write("Ints", "RespawnYears", mobToSave.RespawnYear);
Writer.Write("Ints", "RespawnHours", mobToSave.RespawnHour);
Writer.Write("Ints", "RespawnMinutes", mobToSave.RespawnMinute);
}
Writer.Write("Ints", "ItemCount", mobToSave.ItemCount);
if (mobToSave.Spawn_Slaves)
{
for (int i = 0; i < mobToSave.Slaves.Count; i++)
{
Writer.Write("Slaves", "Slave" + i, mobToSave.Slaves[i].Name);
Writer.Write("Slaves", "SlaveCount" + i, mobToSave.Slaves[i].Count);
}
}
if (mobToSave.ItemCount > 0)
{
for (int i = 0; i < mobToSave.ItemCount; i++)
{
Writer.Write("Items", "Item" + i, mobToSave.Drops[i].Name);
Writer.Write("Items", "ItemChance" + i, mobToSave.Drops[i].Chance);
}
}
Writer.Write("States", "Status", mobToSave.Alive);
Writer.Write("States", "CurrentMap", mobToSave.CurrentMap);
Writer.Write("States", "CurrentX", mobToSave.CurrentX);
Writer.Write("States", "CurrentY", mobToSave.CurrentY);
//.........这里部分代码省略.........
开发者ID:Pete107, 项目名称:Mir2, 代码行数:101, 代码来源:CustomAI.cs
示例15: LoadGoods
public static void LoadGoods()
{
if (!File.Exists(ConfigPath + @".\GoodsSystem.ini"))
{
SaveGoods();
return;
}
InIReader reader = new InIReader(ConfigPath + @".\GoodsSystem.ini");
GoodsOn = reader.ReadBoolean("Goods", "On", GoodsOn);
GoodsMaxStored = reader.ReadUInt32("Goods", "MaxStored", GoodsMaxStored);
GoodsBuyBackTime = reader.ReadUInt32("Goods", "BuyBackTime", GoodsBuyBackTime);
GoodsBuyBackMaxStored = reader.ReadUInt32("Goods", "BuyBackMaxStored", GoodsBuyBackMaxStored);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:14, 代码来源:Settings.cs
示例16: SaveRefine
public static void SaveRefine()
{
File.Delete(ConfigPath + @".\RefineSystem.ini");
InIReader reader = new InIReader(ConfigPath + @".\RefineSystem.ini");
reader.Write("Config", "OnlyRefineWeapon", OnlyRefineWeapon);
reader.Write("Config", "BaseChance", RefineBaseChance);
reader.Write("Config", "Time", RefineTime);
reader.Write("Config", "StatIncrease", RefineIncrease);
reader.Write("Config", "CritChance", RefineCritChance);
reader.Write("Config", "CritIncrease", RefineCritIncrease);
reader.Write("Config", "WepStatReducedChance", RefineWepStatReduce);
reader.Write("Config", "ItemStatReducedChance", RefineItemStatReduce);
reader.Write("Config", "RefineCost", RefineCost);
reader.Write("Ore", "OreName", RefineOreName);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:17, 代码来源:Settings.cs
示例17: SaveGoods
public static void SaveGoods()
{
File.Delete(ConfigPath + @".\GoodsSystem.ini");
InIReader reader = new InIReader(ConfigPath + @".\GoodsSystem.ini");
reader.Write("Goods", "On", GoodsOn);
reader.Write("Goods", "MaxStored", GoodsMaxStored);
reader.Write("Goods", "BuyBackTime", GoodsBuyBackTime);
reader.Write("Goods", "BuyBackMaxStored", GoodsBuyBackMaxStored);
}
开发者ID:thedeaths, 项目名称:mir2, 代码行数:9, 代码来源:Settings.cs
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19234| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:10000| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8331| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8701| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8646| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9668| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8632| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:8005| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8666| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7540| 2022-11-06
请发表评论