本文整理汇总了C#中InIReader.ReadString方法的典型用法代码示例。如果您正苦于以下问题:C# InIReader.ReadString方法的具体用法?C# InIReader.ReadString怎么用?C# InIReader.ReadString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InIReader
的用法示例。
在下文中一共展示了InIReader.ReadString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: LoadGuildSettings
public static void LoadGuildSettings()
{
if (!File.Exists(ConfigPath + @".\GuildSettings.ini"))
{
Guild_CreationCostList.Add(new ItemVolume(){Amount = 1000000});
Guild_CreationCostList.Add(new ItemVolume(){ItemName = "WoomaHorn",Amount = 1});
return;
}
InIReader reader = new InIReader(ConfigPath + @".\GuildSettings.ini");
Guild_RequiredLevel = reader.ReadByte("Guilds", "MinimumLevel", Guild_RequiredLevel);
Guild_ExpRate = reader.ReadFloat("Guilds", "ExpRate", Guild_ExpRate);
Guild_PointPerLevel = reader.ReadByte("Guilds", "PointPerLevel", Guild_PointPerLevel);
Guild_WarTime = reader.ReadInt64("Guilds", "WarTime", Guild_WarTime);
Guild_WarCost = reader.ReadUInt32("Guilds", "WarCost", Guild_WarCost);
int i = 0;
while (reader.ReadUInt32("Required-" + i.ToString(),"Amount",0) != 0)
{
Guild_CreationCostList.Add(new ItemVolume()
{
ItemName = reader.ReadString("Required-" + i.ToString(), "ItemName", ""),
Amount = reader.ReadUInt32("Required-" + i.ToString(), "Amount", 0)
}
);
i++;
}
i = 0;
while (reader.ReadInt64("Exp", "Level-" + i.ToString(), -1) != -1)
{
Guild_ExperienceList.Add(reader.ReadInt64("Exp", "Level-" + i.ToString(), 0));
i++;
}
i = 0;
while (reader.ReadInt32("Cap", "Level-" + i.ToString(), -1) != -1)
{
Guild_MembercapList.Add(reader.ReadInt32("Cap", "Level-" + i.ToString(), 0));
i++;
}
byte TotalBuffs = reader.ReadByte("Guilds", "TotalBuffs", 0);
for (i = 0; i < TotalBuffs; i++)
{
Guild_BuffList.Add(new GuildBuffInfo(reader, i));
}
}
示例3: LoadMines
public static void LoadMines()
{
if (!File.Exists(ConfigPath + @".\Mines.ini"))
{
MineSetList.Add(new MineSet(1));
MineSetList.Add(new MineSet(2));
SaveMines();
return;
}
InIReader reader = new InIReader(ConfigPath + @".\Mines.ini");
int i = 0;
MineSet Mine;
while (reader.ReadByte("Mine" + i.ToString(), "SpotRegenRate", 255) != 255)
{
Mine = new MineSet();
Mine.Name = reader.ReadString("Mine" + i.ToString(), "Name", Mine.Name);
Mine.SpotRegenRate = reader.ReadByte("Mine" + i.ToString(), "SpotRegenRate", Mine.SpotRegenRate);
Mine.MaxStones = reader.ReadByte("Mine" + i.ToString(), "MaxStones", Mine.MaxStones);
Mine.HitRate = reader.ReadByte("Mine" + i.ToString(), "HitRate", Mine.HitRate);
Mine.DropRate = reader.ReadByte("Mine" + i.ToString(), "DropRate", Mine.DropRate);
Mine.TotalSlots = reader.ReadByte("Mine" + i.ToString(), "TotalSlots", Mine.TotalSlots);
int j = 0;
while (reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", 255) != 255)
{
Mine.Drops.Add(new MineDrop()
{
ItemName = reader.ReadString("Mine" + i.ToString(), "D" + j.ToString() + "-ItemName", ""),
MinSlot = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinSlot", 255),
MaxSlot = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxSlot", 255),
MinDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MinDura", 255),
MaxDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxDura", 255),
BonusChance = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-BonusChance", 255),
MaxBonusDura = reader.ReadByte("Mine" + i.ToString(), "D" + j.ToString() + "-MaxBonusDura", 255)
});
j++;
}
MineSetList.Add(Mine);
i++;
}
}
示例4: 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);
}
示例5: 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);
}
示例6: 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);
}
//.........这里部分代码省略.........