本文整理汇总了C#中Config.ReadSize方法的典型用法代码示例。如果您正苦于以下问题:C# Config.ReadSize方法的具体用法?C# Config.ReadSize怎么用?C# Config.ReadSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Config
的用法示例。
在下文中一共展示了Config.ReadSize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
internal static void Initialize(Config.Stream os, Config.LoadErrors errors)
{
all = new Config.KeyedList<Config.DataLevelrank, DataJewelryrandom>();
for (var c = os.ReadSize(); c > 0; c--) {
var self = _create(os);
all.Add(self.LvlRank, self);
}
}
示例2: Initialize
internal static void Initialize(Config.Stream os, Config.LoadErrors errors)
{
all = new Config.KeyedList<int, DataCompleteconditiontype>();
for (var c = os.ReadSize(); c > 0; c--) {
var self = _create(os);
all.Add(self.Id, self);
if (self.Name.Trim().Length == 0)
continue;
switch(self.Name.Trim())
{
case "KillMonster":
if (KillMonster != null)
errors.EnumDup("task.completeconditiontype", self.ToString());
KillMonster = self;
break;
case "TalkNpc":
if (TalkNpc != null)
errors.EnumDup("task.completeconditiontype", self.ToString());
TalkNpc = self;
break;
case "CollectItem":
if (CollectItem != null)
errors.EnumDup("task.completeconditiontype", self.ToString());
CollectItem = self;
break;
default:
errors.EnumDataAdd("task.completeconditiontype", self.ToString());
break;
}
}
if (KillMonster == null)
errors.EnumNull("task.completeconditiontype", "KillMonster");
if (TalkNpc == null)
errors.EnumNull("task.completeconditiontype", "TalkNpc");
if (CollectItem == null)
errors.EnumNull("task.completeconditiontype", "CollectItem");
}
示例3: _create
internal static DataJewelryrandom _create(Config.Stream os)
{
var self = new DataJewelryrandom();
self.LvlRank = Config.DataLevelrank._create(os);
self.AttackRange = Config.DataRange._create(os);
self.OtherRange = new List<Config.DataRange>();
for (var c = (int)os.ReadSize(); c > 0; c--)
self.OtherRange.Add(Config.DataRange._create(os));
return self;
}
示例4: Initialize
internal static void Initialize(Config.Stream os, Config.LoadErrors errors)
{
all = new Config.KeyedList<int, DataTask>();
for (var c = os.ReadSize(); c > 0; c--) {
var self = _create(os);
all.Add(self.Taskid, self);
}
}
示例5: Initialize
internal static void Initialize(Config.Stream os, Config.LoadErrors errors)
{
all = new Config.KeyedList<int, DataJewelrytype>();
for (var c = os.ReadSize(); c > 0; c--) {
var self = _create(os);
all.Add(self.TypeID, self);
if (self.TypeName.Trim().Length == 0)
continue;
switch(self.TypeName.Trim())
{
case "Jade":
if (Jade != null)
errors.EnumDup("equip.jewelrytype", self.ToString());
Jade = self;
break;
case "Bracelet":
if (Bracelet != null)
errors.EnumDup("equip.jewelrytype", self.ToString());
Bracelet = self;
break;
case "Magic":
if (Magic != null)
errors.EnumDup("equip.jewelrytype", self.ToString());
Magic = self;
break;
case "Bottle":
if (Bottle != null)
errors.EnumDup("equip.jewelrytype", self.ToString());
Bottle = self;
break;
default:
errors.EnumDataAdd("equip.jewelrytype", self.ToString());
break;
}
}
if (Jade == null)
errors.EnumNull("equip.jewelrytype", "Jade");
if (Bracelet == null)
errors.EnumNull("equip.jewelrytype", "Bracelet");
if (Magic == null)
errors.EnumNull("equip.jewelrytype", "Magic");
if (Bottle == null)
errors.EnumNull("equip.jewelrytype", "Bottle");
}
示例6: _create
internal static DataJewelrysuit _create(Config.Stream os)
{
var self = new DataJewelrysuit();
self.SuitID = os.ReadInt32();
self.Name = os.ReadText();
self.Ability1 = os.ReadInt32();
self.Ability1Value = os.ReadInt32();
self.Ability2 = os.ReadInt32();
self.Ability2Value = os.ReadInt32();
self.Ability3 = os.ReadInt32();
self.Ability3Value = os.ReadInt32();
self.SuitList = new List<int>();
for (var c = (int)os.ReadSize(); c > 0; c--)
self.SuitList.Add(os.ReadInt32());
return self;
}
示例7: Initialize
internal static void Initialize(Config.Stream os, Config.LoadErrors errors)
{
all = new Config.KeyedList<int, DataAbility>();
for (var c = os.ReadSize(); c > 0; c--) {
var self = _create(os);
all.Add(self.Id, self);
if (self.Name.Trim().Length == 0)
continue;
switch(self.Name.Trim())
{
case "attack":
if (Attack != null)
errors.EnumDup("equip.ability", self.ToString());
Attack = self;
break;
case "defence":
if (Defence != null)
errors.EnumDup("equip.ability", self.ToString());
Defence = self;
break;
case "hp":
if (Hp != null)
errors.EnumDup("equip.ability", self.ToString());
Hp = self;
break;
case "critical":
if (Critical != null)
errors.EnumDup("equip.ability", self.ToString());
Critical = self;
break;
case "critical_resist":
if (Critical_resist != null)
errors.EnumDup("equip.ability", self.ToString());
Critical_resist = self;
break;
case "block":
if (Block != null)
errors.EnumDup("equip.ability", self.ToString());
Block = self;
break;
case "break_armor":
if (Break_armor != null)
errors.EnumDup("equip.ability", self.ToString());
Break_armor = self;
break;
default:
errors.EnumDataAdd("equip.ability", self.ToString());
break;
}
}
if (Attack == null)
errors.EnumNull("equip.ability", "attack");
if (Defence == null)
errors.EnumNull("equip.ability", "defence");
if (Hp == null)
errors.EnumNull("equip.ability", "hp");
if (Critical == null)
errors.EnumNull("equip.ability", "critical");
if (Critical_resist == null)
errors.EnumNull("equip.ability", "critical_resist");
if (Block == null)
errors.EnumNull("equip.ability", "block");
if (Break_armor == null)
errors.EnumNull("equip.ability", "break_armor");
}
示例8: Initialize
internal static void Initialize(Config.Stream os, Config.LoadErrors errors)
{
all = new Config.KeyedList<int, DataRank>();
for (var c = os.ReadSize(); c > 0; c--) {
var self = _create(os);
all.Add(self.RankID, self);
if (self.RankName.Trim().Length == 0)
continue;
switch(self.RankName.Trim())
{
case "white":
if (White != null)
errors.EnumDup("equip.rank", self.ToString());
White = self;
break;
case "green":
if (Green != null)
errors.EnumDup("equip.rank", self.ToString());
Green = self;
break;
case "blue":
if (Blue != null)
errors.EnumDup("equip.rank", self.ToString());
Blue = self;
break;
case "purple":
if (Purple != null)
errors.EnumDup("equip.rank", self.ToString());
Purple = self;
break;
case "yellow":
if (Yellow != null)
errors.EnumDup("equip.rank", self.ToString());
Yellow = self;
break;
default:
errors.EnumDataAdd("equip.rank", self.ToString());
break;
}
}
if (White == null)
errors.EnumNull("equip.rank", "white");
if (Green == null)
errors.EnumNull("equip.rank", "green");
if (Blue == null)
errors.EnumNull("equip.rank", "blue");
if (Purple == null)
errors.EnumNull("equip.rank", "purple");
if (Yellow == null)
errors.EnumNull("equip.rank", "yellow");
}