本文整理汇总了C#中Config.EnumDup方法的典型用法代码示例。如果您正苦于以下问题:C# Config.EnumDup方法的具体用法?C# Config.EnumDup怎么用?C# Config.EnumDup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Config
的用法示例。
在下文中一共展示了Config.EnumDup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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");
}
示例2: 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");
}
示例3: 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");
}
示例4: 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");
}