Пример #1
0
 private static void AssignClassSkills(CharacterBase character, ClassType type)
 {
     switch (type)
     {
         case ClassType.Bard:
             AssignBardSkills(character);
             break;
         case ClassType.Berserker:
             AssignBerserkerSkills(character);
             break;
         case ClassType.Crusader:
             AssignCrusaderSkills(character);
             break;
         case ClassType.Elementalist:
             AssignElementalistSkills(character);
             break;
         case ClassType.Monk:
             AssignMonkSkills(character);
             break;
         case ClassType.Priest:
             AssignPriestSkills(character);
             break;
         case ClassType.Ranger:
             AssignRangerSkills(character);
             break;
         case ClassType.Rogue:
             AssignRogueSkills(character);
             break;
     }
 }
Пример #2
0
 public static int GetPrice(DateTime classDate, ClassType classType)
 {
     int calculatedPrice = int.MaxValue;
     int basePrice = 0;
     int salePrice = 0;
     switch (classType)
     {
         case ClassType.PMP:
             calculatedPrice = basePrice = pmpCost;
             salePrice = pmpCostSale;
             break;
         case ClassType.CAPM:
             calculatedPrice = basePrice = capmCost;
             salePrice = capmCostSale;
             break;
         case ClassType.SixSigmaGreenBelt:
             calculatedPrice = basePrice = l6giCost;
             salePrice = l6giCostSale;
             break;
         case ClassType.SixSigmaBlackBelt:
             calculatedPrice = basePrice = l6biCost;
             salePrice = l6biCostSale;
             break;
     }
     if (salePrice >= 0)
         calculatedPrice = salePrice;
     if (classDate > DateTime.Now.AddDays(earlyBirdDuration))
     {
         calculatedPrice -= earlyBirdDiscountAmount;
     }
     if (calculatedPrice < basePrice)
         return calculatedPrice;
     else
         return basePrice;
 }
Пример #3
0
        // define event:
        // !StreetChanged(string street, string houseNo)
        // define command:
        // ?ChangeStreet(Guid addressId, string street, string houseNo)
        public void Parse(string line)
        {
            switch (line[0])
            {
                case '?': this.ClassType = ClassType.Event; break;
                case '!': this.ClassType = ClassType.Command; break;
                case '#': this.ClassType = ClassType.Handler; break;
                default: throw new NotSupportedException(string.Format("Line start [{0}] is not supported.", line[0]));
            }

            line = line.Substring(1);

            int index = line.IndexOf('(');
            this.Name = line.Substring(0, index);
            line = line.Substring(index + 1).Trim(new[] {'(', ')'});

            while (line.Length > 0)
            {
                index = line.IndexOf(',');
                if (index < 0)
                {
                    index = line.Length;
                }

                string prop = line.Substring(0, index).Trim();
                PropertyToGenerate propertyToGenerate = new PropertyToGenerate();
                propertyToGenerate.Parse(prop);
                this.Properties.Add(propertyToGenerate);

                if (index + 1 < line.Length)
                    line = line.Substring(index + 1);
                else
                    break;
            }
        }
Пример #4
0
 public CycleYear(int year, CycleCode cycleCode, ClassType classType)
     : this()
 {
     Year = year;
     CycleCode = cycleCode;
     ClassType = classType;
 }
Пример #5
0
 public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
 {
     this.cu = cu;
     classType = t;
     this.region = region;
     modifiers = (ModifierEnum)m;
 }
Пример #6
0
 protected ClassSymbol(ClassType type)
 {
     ClassType = type;
     Block = new ProgramContext();
     AppendChild(Block);
     IsInitialize = true;
 }
Пример #7
0
 public AirlinerClass(ClassType type, int seatingCapacity)
 {
     this.Type = type;
     this.SeatingCapacity = seatingCapacity;
     this.RegularSeatingCapacity = seatingCapacity;
     this.Facilities = new Dictionary<AirlinerFacility.FacilityType, AirlinerFacility>();
 }
Пример #8
0
 public ClassProxy(IClass c)
 {
     this.FullyQualifiedName  = c.FullyQualifiedName;
     this.Documentation       = c.Documentation;
     this.modifiers           = c.Modifiers;
     this.classType           = c.ClassType;
 }
Пример #9
0
 public CharacterClass(ClassType classType, int level, IClassModifier modifier)
 {
     ClassType = classType;
     Level = level;
     Modifier = modifier;
     Saves = new ClassSaves(modifier.FortitudeSaveType, modifier.ReflexSaveType, modifier.WillSaveType, Level);
     Attack = new Attack(_attackBonusses[modifier.AttackBonusType], level);
 }
Пример #10
0
 public ClassProxy(BinaryReader reader)
 {
     FullyQualifiedName = reader.ReadString();
     Documentation      = reader.ReadString();
     offset             = reader.ReadUInt32();
     modifiers          = (ModifierEnum)reader.ReadUInt32();
     classType          = (ClassType)reader.ReadInt16();
 }
 public FigureToolboxItemNode(string name, ClassType classType, bool isAbstract, Gdk.Pixbuf icon)
     : base()
 {
     is_abstract = isAbstract;
     _classType = classType;
     Name = name;
     Icon = icon;
 }
Пример #12
0
        public ClassBlock(string name, ClassType type)
        {
            Name = name;
            Type = type;

            _fields = new List<Field>();
            _methods = new List<Method>();
        }
Пример #13
0
 public Book(ClassType _t, int _pages, int _pict, int _tables, int _len)
 {
     this.pages = _pages;
     this.type = _t;
     this.pictures = _pict;
     this.tables = _tables;
     this.length = _len;
     //this.signs = new Dictionary<int, int>();
 }
Пример #14
0
 /// <summary>
 /// Creates a new character and levels it up to the given level
 /// </summary>
 public static ICharacter CreateCharacter(Race race, ClassType classType, int level, Dictionary<AbilityType, int> abilityScores)
 {
     var character = CreateCharacter(race, classType, abilityScores);
     character.Experience.AddLevels(level);
     while (character.Experience.CanLevel) {
         character.LevelUp(classType);
     }
     return character;
 }
Пример #15
0
 public GameDataObject(string name, string description, ClassType classType)
 {
     Name = name;
     Description = description;
     ClassType = classType;
     BaseClasses = new List<string>();
     Behaviours = new List<Behaviour>();
     Properties = new List<Property>();
     InOuts = new List<IO>();
 }
Пример #16
0
 public ClassDeclaration(TextPosition tp, string name, ClassType type, TupleLiteral attr, TupleLiteral generic, TupleLiteral inherit, ProgramContext block)
     : base(tp, name, type, block)
 {
     AttributeAccess = attr;
     DecGenerics = generic;
     InheritAccess = inherit;
     AppendChild(AttributeAccess);
     AppendChild(DecGenerics);
     AppendChild(InheritAccess);
 }
Пример #17
0
 protected ClassSymbol(TextPosition tp, string name, ClassType type, ProgramContext block)
     : base(tp)
 {
     Name = name;
     ClassType = type;
     Block = block;
     This = new ThisSymbol(this);
     Block.Append(This);
     AppendChild(Block);
     IsInitialize = true;
 }
Пример #18
0
        public void ShouldInvokeClassMethodWhenInvokingMethodBaseOfInterface()
        {
            var classType = new ClassType ();

            classType.Called.Should ().BeFalse ();

            var methodBase = typeof(IInterfaceType).GetMethod("Method");
            methodBase.Invoke (classType, new object[0]);

            classType.Called.Should ().BeTrue ();
        }
 public Character(string name, ClassType classType, int age, int hp, int strength, int agility, int intelligence, int gold)
 {
     Name = name;
     Class = classType;
     Age = age;
     MaxHP = hp;
     HP = hp;
     Strength = strength;
     Agility = agility;
     Intelligence = intelligence;
     Gold = gold;
 }
Пример #20
0
        public DefaultCharacter(Race race, ClassType classType, Dictionary<AbilityType, int> abilityScores, IModifierProvider modifierProvider)
            : this(modifierProvider)
        {
            Race = race;
            InitializeProperties();
            _abilities = new CharacterAbilities(abilityScores);

            var characterClass = ClassProvider.GetNewClass(classType, _modifierProvider);
            Classes.Add(classType, characterClass);
            // Once all the properties are set, OnCreation can be called, which will process all modifiers for this character/class/race
            OnCreation(classType);
        }
Пример #21
0
 public void EnumFlagTester(ClassType enumFlagArg)
 {
     switch (enumFlagArg)
     {
         case ClassType.DataStructure:
             Console.WriteLine("ds");
             break;
         case ClassType.Hybrid:
             Console.WriteLine("hyb");
             break;
     }
 }
Пример #22
0
 protected int GradeCount(ClassType ct)
 {
     switch (ct)
     {
         case ClassType.九年一贯制:
             return 9;
         case ClassType.小学:
             return 6;
         default:
             return 3;
     }
 }
        public AddFigureDialog(string typeName, ClassType type, PointD point, ClassDesigner designer)
        {
            this.Build ();
            this.designer = designer;
            this.point = point;
            this.type = type;

            Title = String.Format ("Add new {0}", typeName);
            typeLabel.Text = String.Format ("{0} name:", typeName);

            accessModifier.InsertText (0, "Default");
            accessModifier.InsertText (1, "public");
            accessModifier.InsertText (2, "internal");
        }
Пример #24
0
 public void EnumFlagArgumentFunction(ClassType args)
 {
     switch (args)
     {
         case ClassType.DataStructure:
             Console.WriteLine("1");
             break;
         case ClassType.Hybrid:
             Console.WriteLine("2");
             break;
         default:
             Console.WriteLine("3");
             break;
     }
 }
Пример #25
0
        public IEnumerable<ClassEntry> GetClassEntries(string filePath, ClassType classType)
        {
            List<string> lines = new List<string>(File.ReadAllLines(filePath));

            RemoveUsingAndNamspace(lines);

            int classIndex = lines.FindLastIndex(x => x.Contains("public class "));

            while (classIndex >= 0)
            {
                yield return ProcessExampleClass(lines, classIndex, classType);

                classIndex = lines.FindLastIndex(x => x.Contains("public class "));
            }
        }
Пример #26
0
        public ClassInstance(Class classData, ClassType classType, TimeSpan from, TimeSpan to, string room, WeekDay day, WeekType weekType, Teacher teacher, string uid = "")
        {
            this.classData = classData;
            this.classType = classType;
            this.from = from;
            this.to = to;
            this.room = room;
            this.weekDay = day;
            this.weekType = weekType;
            this.teacher = teacher;

            if (string.IsNullOrWhiteSpace(uid))
                this.uid = Guid.NewGuid().ToString();
            else
                this.uid = uid;
        }
Пример #27
0
 public Class(StatModifier initialModifier, StatModifier levelModifier, ClassType ctype, string description, Uri imageSource,
                 IDictionary<string, Ability> _abilities, Weapon _startingWeapon, Armour _startingHelm, Armour _startingChest,
                 Armour _startingGloves, Armour _startingBoots, Armour _startingLegs)
 {
     this.initialModifier = initialModifier;
     this.levelModifier = levelModifier;
     _type = ctype;
     _description = description;
     this.imageSource = imageSource;
     abilities = _abilities;
     startingWeapon = _startingWeapon;
     startingHelm = _startingHelm;
     startingChest = _startingChest;
     startingGloves = _startingGloves;
     startingBoots = _startingBoots;
     startingLegs = _startingLegs;
 }
Пример #28
0
 public void BindClass(ClassType ct)
 {
     switch (ct)
     {
         case ClassType.LabClass:
             LabClassBLL lcb = new LabClassBLL();
             cmbClass.DataSource = null;
             cmbClass.DataSource = lcb.GetAllLabClass();
             cmbClass.DisplayMember = "LabClassID";
             cmbClass.ValueMember = "LabClassID";
             break;
         case ClassType.TheoryClass:
             TheoryClassBLL tcb = new TheoryClassBLL();
             cmbClass.DataSource = null;
             cmbClass.DataSource = tcb.GetAllTheoryClass();
             cmbClass.DisplayMember = "TheoryClassID";
             cmbClass.ValueMember = "TheoryClassID";
             break;
     }
 }
Пример #29
0
 private void AppendEmbededAttribute(List<AttributeSymbol> list, Type type, out ClassType classType)
 {
     classType = ClassType.Class;
     if (type.GetCustomAttribute<GlobalScopeAttribute>() != null) list.Add(Root.GlobalScope);
     if (type.IsAbstract) list.Add(Root.Abstract);
     if (type.IsClass) classType = ClassType.Class;
     if (type.IsInterface) classType = ClassType.Trait;
     if (type.IsNestedFamily) list.Add(Root.Protected);
     if (type.IsNestedFamORAssem) list.Add(Root.Protected);
     if (type.IsNestedPublic) list.Add(Root.Public);
     if (type.IsPublic) list.Add(Root.Public);
     if (type.IsSealed) list.Add(Root.Final);
     if (type.IsValueType) classType = ClassType.Class;
     if (type.IsGenericParameter)
     {
         var gattr = type.GenericParameterAttributes;
         if (gattr.HasFlag(GenericParameterAttributes.Contravariant)) list.Add(Root.Contravariant);
         if (gattr.HasFlag(GenericParameterAttributes.Covariant)) list.Add(Root.Covariant);
         if (gattr.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint)) list.Add(Root.ConstructorConstraint);
         if (gattr.HasFlag(GenericParameterAttributes.NotNullableValueTypeConstraint)) list.Add(Root.ValueConstraint);
         if (gattr.HasFlag(GenericParameterAttributes.ReferenceTypeConstraint)) list.Add(Root.ReferenceConstraint);
     }
 }
Пример #30
0
 /// <summary>
 /// Distance Rate base stats for Character by Class & Level
 /// </summary>
 /// <param name="class"></param>
 /// <param name="level"></param>
 /// <returns></returns>
 internal int DistanceRate(ClassType @class, byte level)
 {
     return(_distRate[(byte)@class, level]);
 }
Пример #31
0
 internal int ElementRate(ClassType @class, byte level)
 {
     return(0);
 }
Пример #32
0
 internal int HitRate(ClassType @class, byte level)
 {
     return(_hitRate[(byte)@class, level]);
 }
Пример #33
0
 public AbstractClassProxyPropertyGenerator(ClassType type, Property property, ISymbolMap symbols,
                                            INamespaceSet namespaces) : base(type, property, symbols, namespaces)
 {
 }
Пример #34
0
 public int MaxHit(ClassType @class, byte level)
 {
     return(_maxHit[(byte)@class, level]);
 }
Пример #35
0
        private static void ValidateOperationModifiers(Operation operation)
        {
            if (operation.IsStatic)
            {
                if (operation.IsVirtual)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "virtual", "static"));
                }
                if (operation.IsAbstract)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "abstract", "static"));
                }
                if (operation.IsOverride)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "override", "static"));
                }
                if (operation.IsSealed)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "sealed", "static"));
                }
            }

            if (operation.IsVirtual)
            {
                if (operation.IsAbstract)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "abstract", "virtual"));
                }
                if (operation.IsOverride)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "override", "virtual"));
                }
                if (operation.IsSealed)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "sealed", "virtual"));
                }
            }

            if (operation.IsHider)
            {
                if (operation.IsOverride)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "new", "override"));
                }
                if (operation.IsSealed)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "new", "sealed"));
                }
            }

            if (operation.IsSealed)
            {
                if (operation.IsAbstract)
                {
                    throw new BadSyntaxException(string.Format(
                                                     Strings.ErrorInvalidModifierCombination, "sealed", "abstract"));
                }
                if (!operation.IsOverride)
                {
                    operation.IsOverride = true;
                }
            }

            if (operation.IsAbstract)
            {
                ClassType parent = operation.Parent as ClassType;
                if (parent == null)
                {
                    throw new BadSyntaxException(Strings.ErrorInvalidModifier);
                }
                else
                {
                    parent.Modifier = ClassModifier.Abstract;
                }
            }
        }
Пример #36
0
 public void VisitClass(ClassType ct)
 {
     throw new NotImplementedException();
 }
Пример #37
0
 public int MagicalDefence(ClassType @class, byte level)
 {
     return(_magicalDef[(byte)@class, level]);
 }
Пример #38
0
 public ClassLevel5eWrapper(ClassType classType, int level, List <GenericFeature> features)
 {
     this.level     = level;
     this.classType = classType;
     this.features  = features;
 }
Пример #39
0
        public void TestExecuteQueryProcedure()
        {
            string prName = "prGetUsers";
            Dictionary <string, Object> inParams = new Dictionary <string, object>();

            inParams.Add("UserId", 4);

            List <User> list = BaseDAL.ExecuteQueryProcedure <User>(prName, inParams, ClassType.GetType("User"));
        }
Пример #40
0
 public virtual T Visit(ClassType node)
 {
     Visit((CompositeType)node);
     return(traverse(node.self));
 }
Пример #41
0
 public Hero(String name, ClassType classType)
 {
     this.name      = name;
     this.classType = classType;
 }
Пример #42
0
 public int MinDistance(ClassType @class, byte level)
 {
     return(_minDist[(byte)@class, level]);
 }
Пример #43
0
 /// <exception cref="ArgumentNullException">
 /// <paramref name="classType"/> is null.
 /// </exception>
 internal ClassShape(ClassType classType) : base(classType)
 {
     _class = classType;
 }
Пример #44
0
 public int MinHit(ClassType @class, byte level)
 {
     return(_minHit[(int)@class, level]);
 }
Пример #45
0
        public override void Initialize(
            Type parentClassType,
            Type declaredPropertyType,
            Type?runtimePropertyType,
            ClassType runtimeClassType,
            MemberInfo?memberInfo,
            JsonConverter converter,
            JsonIgnoreCondition?ignoreCondition,
            JsonSerializerOptions options)
        {
            base.Initialize(
                parentClassType,
                declaredPropertyType,
                runtimePropertyType,
                runtimeClassType,
                memberInfo,
                converter,
                ignoreCondition,
                options);

            switch (memberInfo)
            {
            case PropertyInfo propertyInfo:
            {
                bool useNonPublicAccessors = GetAttribute <JsonIncludeAttribute>(propertyInfo) != null;

                MethodInfo?getMethod = propertyInfo.GetMethod;
                if (getMethod != null && (getMethod.IsPublic || useNonPublicAccessors))
                {
                    HasGetter = true;
                    Get       = options.MemberAccessorStrategy.CreatePropertyGetter <T>(propertyInfo);
                }

                MethodInfo?setMethod = propertyInfo.SetMethod;
                if (setMethod != null && (setMethod.IsPublic || useNonPublicAccessors))
                {
                    HasSetter = true;
                    Set       = options.MemberAccessorStrategy.CreatePropertySetter <T>(propertyInfo);
                }

                break;
            }

            case FieldInfo fieldInfo:
            {
                Debug.Assert(fieldInfo.IsPublic);

                HasGetter = true;
                Get       = options.MemberAccessorStrategy.CreateFieldGetter <T>(fieldInfo);

                if (!fieldInfo.IsInitOnly)
                {
                    HasSetter = true;
                    Set       = options.MemberAccessorStrategy.CreateFieldSetter <T>(fieldInfo);
                }

                break;
            }

            default:
            {
                IsForClassInfo = true;
                HasGetter      = true;
                HasSetter      = true;

                break;
            }
            }

            GetPolicies(ignoreCondition, defaultValueIsNull: Converter.CanBeNull);
        }
Пример #46
0
 internal int DarkResistance(ClassType @class, byte level)
 {
     return(0);
 }
Пример #47
0
 public string VisitClass(ClassType ct)
 {
     return(DefaultPrefix);
 }
Пример #48
0
 /// <summary>
 /// Defence rate base stats for Character by Class & Level
 /// </summary>
 /// <param name="class"></param>
 /// <param name="level"></param>
 /// <returns></returns>
 internal int DefenceRate(ClassType @class, byte level)
 {
     return(_hitDodge[(byte)@class, level]);
 }
Пример #49
0
        public override void Initialize(
            Type parentClassType,
            Type declaredPropertyType,
            Type?runtimePropertyType,
            ClassType runtimeClassType,
            MemberInfo?memberInfo,
            JsonConverter converter,
            JsonIgnoreCondition?ignoreCondition,
            JsonNumberHandling?parentTypeNumberHandling,
            JsonSerializerOptions options)
        {
            base.Initialize(
                parentClassType,
                declaredPropertyType,
                runtimePropertyType,
                runtimeClassType,
                memberInfo,
                converter,
                ignoreCondition,
                parentTypeNumberHandling,
                options);

            switch (memberInfo)
            {
            case PropertyInfo propertyInfo:
            {
                bool useNonPublicAccessors = GetAttribute <JsonIncludeAttribute>(propertyInfo) != null;

                MethodInfo?getMethod = propertyInfo.GetMethod;
                if (getMethod != null && (getMethod.IsPublic || useNonPublicAccessors))
                {
                    HasGetter = true;
                    Get       = options.MemberAccessorStrategy.CreatePropertyGetter <T>(propertyInfo);
                }

                MethodInfo?setMethod = propertyInfo.SetMethod;
                if (setMethod != null && (setMethod.IsPublic || useNonPublicAccessors))
                {
                    HasSetter = true;
                    Set       = options.MemberAccessorStrategy.CreatePropertySetter <T>(propertyInfo);
                }

                break;
            }

            case FieldInfo fieldInfo:
            {
                Debug.Assert(fieldInfo.IsPublic);

                HasGetter = true;
                Get       = options.MemberAccessorStrategy.CreateFieldGetter <T>(fieldInfo);

                if (!fieldInfo.IsInitOnly)
                {
                    HasSetter = true;
                    Set       = options.MemberAccessorStrategy.CreateFieldSetter <T>(fieldInfo);
                }

                break;
            }

            default:
            {
                IsForClassInfo = true;
                HasGetter      = true;
                HasSetter      = true;

                break;
            }
            }

            _converterIsExternalAndPolymorphic = !converter.IsInternalConverter && DeclaredPropertyType != converter.TypeToConvert;
            PropertyTypeCanBeNull            = DeclaredPropertyType.CanBeNull();
            _propertyTypeEqualsTypeToConvert = typeof(T) == DeclaredPropertyType;

            GetPolicies(ignoreCondition, parentTypeNumberHandling, defaultValueIsNull: PropertyTypeCanBeNull);
        }
Пример #50
0
 public SpellCard(string name, ClassType cardType, CardRarity rarity, string text, int cost, CardType type)
     : base(name, cardType, rarity, text, cost, type)
 {
 }
Пример #51
0
 internal int HitCriticalRate(ClassType @class, byte level)
 {
     return(_criticalHitRate[(byte)@class, level]);
 }
Пример #52
0
 public bool InsertClass(ClassType newClass)
 {
     return(model.InsertTypeEntity(newClass));
 }
Пример #53
0
 internal int DistCritical(ClassType @class, byte level)
 {
     return(_criticalDist[(byte)@class, level]);
 }
Пример #54
0
 private void AddClass(ClassType classType)
 {
     AddShape(new ClassShape(classType));
 }
Пример #55
0
 /// <summary>
 /// Distance Defence base stats for Character by Class & Level
 /// </summary>
 /// <param name="class"></param>
 /// <param name="level"></param>
 /// <returns></returns>
 internal int DistanceDefence(ClassType @class, byte level)
 {
     return(_distDef[(byte)@class, level]);
 }
Пример #56
0
 public IEnumerable <WorkItem> VisitClass(ClassType ct)
 {
     throw new NotImplementedException();
 }
Пример #57
0
        public void Read(BinaryReader reader)
        {
            EntityId  = reader.ReadInt32();
            PositionX = reader.ReadInt64();
            PositionY = reader.ReadInt64();
            PositionZ = reader.ReadInt64();
            Pitch     = reader.ReadSingle();
            Roll      = reader.ReadSingle();
            Yaw       = reader.ReadSingle();

            Health         = reader.ReadSingle();
            Experience     = reader.ReadInt32();
            Level          = reader.ReadInt32();
            Class          = (ClassType)reader.ReadByte();
            Specialization = reader.ReadByte();
            unknown1       = reader.ReadUInt32();
            unknown2       = reader.ReadUInt32();

            for (int i = 0; i < EquipmentCount; ++i)
            {
                Item item = new Item();
                item.Read(reader);

                Equipment.Add(item);
            }

            Name   = reader.ReadLongString();
            Race   = reader.ReadInt32();
            Gender = reader.ReadByte();
            reader.Skip(3);
            Face      = reader.ReadInt32();
            Hair      = reader.ReadInt32();
            HairColor = Utility.FromAbgr(reader.ReadInt32());

            int inventoryCount = reader.ReadInt32();

            for (int i = 0; i < inventoryCount; ++i)
            {
                Inventory inventory = new Inventory();
                inventory.Read(reader);

                Inventories.Add(inventory);
            }

            Coins         = reader.ReadInt32();
            PlatinumCoins = reader.ReadInt32();

            int craftingRecipeCount = reader.ReadInt32();

            for (int i = 0; i < craftingRecipeCount; ++i)
            {
                Item item = new Item();
                item.Read(reader);

                CraftingRecipes.Add(item);
            }

            int worldCount = reader.ReadInt32();

            for (int i = 0; i < worldCount; ++i)
            {
                World world = new World();
                world.Read(reader);

                Worlds.Add(world);
            }

            int    lastWorldSeed = reader.ReadInt32();
            string lastWorldName = reader.ReadLongString();

            LastWorld = Worlds.FirstOrDefault(w => w.Seed == lastWorldSeed && w.Name == lastWorldName) ?? new World {
                Name = lastWorldName, Seed = lastWorldSeed
            };

            ManaCubes = reader.ReadInt32();
            reader.Skip(4);
            PetMasterSkillLevel   = reader.ReadInt32();
            PetRidingSkillLevel   = reader.ReadInt32();
            ClimbingSkillLevel    = reader.ReadInt32();
            HangGlidingSkillLevel = reader.ReadInt32();
            SwimmingSkillLevel    = reader.ReadInt32();
            SailingSkillLevel     = reader.ReadInt32();
            TierOneSkillLevel     = reader.ReadInt32();
            TierTwoSkillLevel     = reader.ReadInt32();
            TierThreeSkillLevel   = reader.ReadInt32();
            unknown4 = reader.ReadInt32();
            unknown5 = reader.ReadInt32();
        }
Пример #58
0
 public override object Exec(ClassType ct, object arg)
 {
     this.codeGenerator.ldelemRef(this.indent);
     return(null);
 }
Пример #59
0
 protected int GradeCount(ClassType classType)
 {
     switch ((int)classType)
     {
         case 1:
             return 9;
         case 2:
             return 3;
         case 3:
             return 6;
         case 4:
             return 3;
         case 6:
             return 3;
         default:
             return 0;
     }
 }
Пример #60
0
        public ClassLevel5e(ClassType t, int level, List <GenericFeature> features = null) : base(features)
        {
            classType = t;

            this.level = level;
        }