Ejemplo n.º 1
0
 public static Gender ToGender(this ScriptEnum val)
 {
     if (val == null)
     {
         return(Gender.Male);
     }
     return(ToGender(val.ToString()));
 }
Ejemplo n.º 2
0
 public static ItemBindingRule ToBindingRule(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToBindingRule(String.Empty));
     }
     return(ToBindingRule(val.ToString()));
 }
Ejemplo n.º 3
0
 public static QuestDifficulty ToQuestDifficulty(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToQuestDifficulty(String.Empty));
     }
     return(ToQuestDifficulty(val.ToString()));
 }
Ejemplo n.º 4
0
 public static Workstation ToWorkstation(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToWorkstation(String.Empty));
     }
     return(ToWorkstation(val.ToString()));
 }
Ejemplo n.º 5
0
 public static Stat ToStat(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToStat(String.Empty));
     }
     return(ToStat(val.ToString()));
 }
Ejemplo n.º 6
0
 public static ItemQuality ToItemQuality(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToItemQuality(String.Empty));
     }
     return(ToItemQuality(val.ToString()));
 }
Ejemplo n.º 7
0
 public static EnhancementSubCategory ToEnhancementSubCategory(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToEnhancementSubCategory(String.Empty));
     }
     return(ToEnhancementSubCategory(val.ToString()));
 }
Ejemplo n.º 8
0
 public static TargetRule ToTargetRule(this ScriptEnum val)
 {
     if (val == null)
     {
         return(TargetRule.Self);
     }
     return(val.ToString().ToTargetRule());
 }
Ejemplo n.º 9
0
 public static SlotType ToSlotType(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToSlotType(String.Empty));
     }
     return(ToSlotType(val.ToString()));
 }
Ejemplo n.º 10
0
 public static GiftInterest ToGiftInterest(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToGiftInterest(String.Empty));
     }
     return(ToGiftInterest(val.ToString()));
 }
Ejemplo n.º 11
0
 public static SchematicResearchChance ToSchematicResearchChance(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToSchematicResearchChance(String.Empty));
     }
     return(ToSchematicResearchChance(val.ToString()));
 }
Ejemplo n.º 12
0
 public static GiftRank ToGiftRank(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToGiftRank(String.Empty));
     }
     return(ToGiftRank(val.ToString()));
 }
Ejemplo n.º 13
0
 public static ProfessionSubtype ToProfessionSubtype(this ScriptEnum val)
 {
     if (val == null)
     {
         return(ToProfessionSubtype(String.Empty));
     }
     return(ToProfessionSubtype(val.ToString()));
 }
Ejemplo n.º 14
0
        public static EnhancementStationType ToEnhancementStationType(ScriptEnum val)
        {
            if (val == null)
            {
                return(EnhancementStationType.None);
            }

            switch (val.ToString())
            {
            case "itmEnhancementStationTypeNone": return(EnhancementStationType.None);

            case "itmEnhancementStationTypeGeneral": return(EnhancementStationType.General);

            case "itmEnhancementStationTypeArmor": return(EnhancementStationType.Armor);

            case "itmEnhancementStationTypeLightsaber": return(EnhancementStationType.Lightsaber);

            case "itmEnhancementStationTypeBlaster": return(EnhancementStationType.Blaster);

            default: throw new InvalidOperationException("Unknown EnhancementStationType: " + val.ToString());
            }
        }