当前位置: 首页>>代码示例>>C#>>正文


C# MirClass类代码示例

本文整理汇总了C#中MirClass的典型用法代码示例。如果您正苦于以下问题:C# MirClass类的具体用法?C# MirClass怎么用?C# MirClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MirClass类属于命名空间,在下文中一共展示了MirClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MonsterAI

 protected internal MonsterAI(MonsterInfo info) : base(info)
 {
     if (!uniqueAI.IgnorePets && uniqueAI.DamagePetsMore)    //Pet Damage
         DamageToPets = uniqueAI.PetAttackDamage;
     if (uniqueAI.UseSpecialAttack) // Special Damage
         SpecialAttackDamage = uniqueAI.SpecialAttackDamage;
     if (uniqueAI.UseMassAttack) // Mass Damage
         MassAttackDamage = uniqueAI.MassAttackDamage;
     if (uniqueAI.UseMeleeAttack) // Melee Damage
         MeleeAttackDamage = uniqueAI.MeleeAttackDamage;
     if (uniqueAI.UseRangeAttack) // Range Damage
         RangeAttackDamage = uniqueAI.RangeAttackDamage;
     if (uniqueAI.UseMagicAttack) // Magic Damage
         MagicAttackDamage = uniqueAI.MagicAttackDamage;
     if (uniqueAI.Target) // Damage to specific Target(s)
     {
         AttackClass = (MirClass)uniqueAI.TargetClass;
         TargetedDamage = uniqueAI.TargetAttackDamage;
     }
     uniqueAI.Alive = true;
     if (!uniqueAI.Save(uniqueAI))
         SMain.Enqueue("ERROR saving status");
 }
开发者ID:Pete107,项目名称:Mir2,代码行数:23,代码来源:MonsterAI.cs

示例2: GetClassAndLevelBasedItem

 public static ItemInfo GetClassAndLevelBasedItem(ItemInfo Origin, MirClass job, ushort level, List<ItemInfo> ItemList)
 {
     ItemInfo output = Origin;
     for (int i = 0; i < ItemList.Count; i++)
     {
         ItemInfo info = ItemList[i];
         if (info.Name.StartsWith(Origin.Name))
             if ((byte)info.RequiredClass == (1 << (byte)job))
                 if ((info.RequiredType == RequiredType.Level) && (info.RequiredAmount <= level) && (output.RequiredAmount <= info.RequiredAmount) && (Origin.RequiredGender == info.RequiredGender))
                     output = info;
     }
     return output;
 }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:13,代码来源:Common.cs

示例3: GetClassBasedItem

 public static ItemInfo GetClassBasedItem(ItemInfo Origin, MirClass job, List<ItemInfo> ItemList)
 {
     for (int i = 0; i < ItemList.Count; i++)
     {
         ItemInfo info = ItemList[i];
         if (info.Name.StartsWith(Origin.Name))
             if (((byte)info.RequiredClass == (1 << (byte)job)) && (Origin.RequiredGender == info.RequiredGender))
                 return info;
     }
     return Origin;
 }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:11,代码来源:Common.cs

示例4: GetRealItem

 public static ItemInfo GetRealItem(ItemInfo Origin, ushort Level, MirClass job, List<ItemInfo> ItemList)
 {
     if (Origin.ClassBased && Origin.LevelBased)
         return GetClassAndLevelBasedItem(Origin, job, Level, ItemList);
     if (Origin.ClassBased)
         return GetClassBasedItem(Origin, job, ItemList);
     if (Origin.LevelBased)
         return GetLevelBasedItem(Origin, Level, ItemList);
     return Origin;
 }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:10,代码来源:Common.cs

示例5: NewCharacterDialog

            public NewCharacterDialog()
            {
                Index = 73;
                Library = Libraries.Prguse;
                Location = new Point((Settings.ScreenWidth - Size.Width)/2, (Settings.ScreenHeight - Size.Height)/2);
                Modal = true;

                TitleLabel = new MirImageControl
                    {
                        Index = 20,
                        Library = Libraries.Title,
                        Location = new Point(206, 11),
                        Parent = this,
                    };

                CancelButton = new MirButton
                    {
                        HoverIndex = 281,
                        Index = 280,
                        Library = Libraries.Title,
                        Location = new Point(425, 425),
                        Parent = this,
                        PressedIndex = 282
                    };
                CancelButton.Click += (o, e) => Dispose();


                OKButton = new MirButton
                    {
                        Enabled = false,
                        HoverIndex = 361,
                        Index = 360,
                        Library = Libraries.Title,
                        Location = new Point(160, 425),
                        Parent = this,
                        PressedIndex = 362,
                    };
                OKButton.Click += (o, e) => CreateCharacter();

                NameTextBox = new MirTextBox
                    {
                        Location = new Point(325, 268),
                        Parent = this,
                        Size = new Size(240, 20),
                        MaxLength = Globals.MaxCharacterNameLength
                    };
                NameTextBox.TextBox.KeyPress += TextBox_KeyPress;
                NameTextBox.TextBox.TextChanged += CharacterNameTextBox_TextChanged;
                NameTextBox.SetFocus();

                CharacterDisplay = new MirAnimatedControl
                    {
                        Animated = true,
                        AnimationCount = 16,
                        AnimationDelay = 250,
                        Index = 20,
                        Library = Libraries.ChrSel,
                        Location = new Point(120, 250),
                        Parent = this,
                        UseOffSet = true,
                    };
                CharacterDisplay.AfterDraw += (o, e) =>
                    {
                        if (_class == MirClass.Wizard)
                            Libraries.ChrSel.DrawBlend(CharacterDisplay.Index + 560, CharacterDisplay.DisplayLocationWithoutOffSet, Color.White, true);
                    };


                WarriorButton = new MirButton
                    {
                        HoverIndex = 2427,
                        Index = 2427,
                        Library = Libraries.Prguse,
                        Location = new Point(323, 296),
                        Parent = this,
                        PressedIndex = 2428,
                        Sound = SoundList.ButtonA,
                    };
                WarriorButton.Click += (o, e) =>
                    {
                        _class = MirClass.Warrior;
                        UpdateInterface();
                    };


                WizardButton = new MirButton
                    {
                        HoverIndex = 2430,
                        Index = 2429,
                        Library = Libraries.Prguse,
                        Location = new Point(373, 296),
                        Parent = this,
                        PressedIndex = 2431,
                        Sound = SoundList.ButtonA,
                    };
                WizardButton.Click += (o, e) =>
                    {
                        _class = MirClass.Wizard;
                        UpdateInterface();
                    };
//.........这里部分代码省略.........
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:101,代码来源:SelectScene.cs

示例6: Rank_Character_Info

    public Rank_Character_Info(BinaryReader reader)
    {
        //rank = reader.ReadInt32();
        PlayerId = reader.ReadInt64();
        Name = reader.ReadString();
        level = reader.ReadInt32();
        Class = (MirClass)reader.ReadByte();

    }
开发者ID:Pete107,项目名称:Mir2,代码行数:9,代码来源:Common.cs

示例7: ReadPacket

        protected override void ReadPacket(BinaryReader reader)
        {
            ObjectID = reader.ReadUInt32();
            Name = reader.ReadString();
            GuildName = reader.ReadString();
            GuildRankName = reader.ReadString();
            NameColour = Color.FromArgb(reader.ReadInt32());
            Class = (MirClass)reader.ReadByte();
            Gender = (MirGender)reader.ReadByte();
            Level = reader.ReadByte();
            Location = new Point(reader.ReadInt32(), reader.ReadInt32());
            Direction = (MirDirection)reader.ReadByte();
            Hair = reader.ReadByte();
            Light = reader.ReadByte();
            Weapon = reader.ReadInt16();
            Armour = reader.ReadInt16();
            Poison = (PoisonType)reader.ReadByte();
            Dead = reader.ReadBoolean();
            Hidden = reader.ReadBoolean();
            Effect = (SpellEffect)reader.ReadByte();
            WingEffect = reader.ReadByte();
            Extra = reader.ReadBoolean();
            MountType = reader.ReadInt16();
            RidingMount = reader.ReadBoolean();
            Fishing = reader.ReadBoolean();

            TransformType = reader.ReadInt16();

            ElementOrbEffect = reader.ReadUInt32();
            ElementOrbLvl = reader.ReadUInt32();
            ElementOrbMax = reader.ReadUInt32();

            int count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                Buffs.Add((BuffType)reader.ReadByte());
            }

            LevelEffects = (LevelEffects)reader.ReadByte();
        }
开发者ID:beyourself,项目名称:gameshop,代码行数:40,代码来源:ServerPackets.cs

示例8: ReadPacket

 protected override void ReadPacket(BinaryReader reader)
 {
     Name = reader.ReadString();
     Gender = (MirGender)reader.ReadByte();
     Class = (MirClass)reader.ReadByte();
 }
开发者ID:Nibby,项目名称:CrystalM2,代码行数:6,代码来源:ClientPackets.cs

示例9: ReadPacket

 protected override void ReadPacket(BinaryReader reader)
 {
     ObjectID = reader.ReadUInt32();
     Name = reader.ReadString();
     NameColour = Color.FromArgb(reader.ReadInt32());
     Class = (MirClass) reader.ReadByte();
     Gender = (MirGender) reader.ReadByte();
     Location = new Point(reader.ReadInt32(), reader.ReadInt32());
     Direction = (MirDirection) reader.ReadByte();
     Hair = reader.ReadByte();
     Light = reader.ReadByte();
     Weapon = reader.ReadSByte();
     Armour = reader.ReadSByte();
     Poison = (PoisonType) reader.ReadByte();
     Dead = reader.ReadBoolean();
     Hidden = reader.ReadBoolean();
     Effect = (SpellEffect) reader.ReadByte();
     WingEffect = reader.ReadByte();
 }
开发者ID:xiaofengzhiyu,项目名称:CSharpMir,代码行数:19,代码来源:ServerPackets.cs

示例10: SelectInfo

 public SelectInfo(BinaryReader reader)
 {
     Index = reader.ReadInt32();
     Name = reader.ReadString();
     Level = reader.ReadUInt16();
     Class = (MirClass)reader.ReadByte();
     Gender = (MirGender)reader.ReadByte();
     LastAccess = DateTime.FromBinary(reader.ReadInt64());
 }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:9,代码来源:Common.cs

示例11: CharacterInfo

        public CharacterInfo(BinaryReader reader)
        {
            Index = reader.ReadInt32();
            Name = reader.ReadString();

            Level = reader.ReadByte();
            Class = (MirClass) reader.ReadByte();
            Gender = (MirGender) reader.ReadByte();
            Hair = reader.ReadByte();

            CreationIP = reader.ReadString();
            CreationDate = DateTime.FromBinary(reader.ReadInt64());

            Banned = reader.ReadBoolean();
            BanReason = reader.ReadString();
            ExpiryDate = DateTime.FromBinary(reader.ReadInt64());

            LastIP = reader.ReadString();
            LastDate = DateTime.FromBinary(reader.ReadInt64());

            Deleted = reader.ReadBoolean();
            DeleteDate = DateTime.FromBinary(reader.ReadInt64());

            CurrentMapIndex = reader.ReadInt32();
            CurrentLocation = new Point(reader.ReadInt32(), reader.ReadInt32());
            Direction = (MirDirection)reader.ReadByte();
            BindMapIndex = reader.ReadInt32();
            BindLocation = new Point(reader.ReadInt32(), reader.ReadInt32());

            HP = reader.ReadUInt16();
            MP = reader.ReadUInt16();
            Experience = reader.ReadInt64();

            AMode = (AttackMode) reader.ReadByte();
            PMode = (PetMode) reader.ReadByte();

            if (Envir.LoadVersion > 34)
            {
                PKPoints = reader.ReadInt32();
            }

            int count = reader.ReadInt32();

            Array.Resize(ref Inventory, count);

            for (int i = 0; i < count; i++)
            {
                if (!reader.ReadBoolean()) continue;
                UserItem item = new UserItem(reader, Envir.LoadVersion, Envir.LoadCustomVersion);
                if (SMain.Envir.BindItem(item) && i < Inventory.Length)
                    Inventory[i] = item;
            }

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                if (!reader.ReadBoolean()) continue;
                UserItem item = new UserItem(reader, Envir.LoadVersion, Envir.LoadCustomVersion);
                if (SMain.Envir.BindItem(item) && i < Equipment.Length)
                    Equipment[i] = item;
            }

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                if (!reader.ReadBoolean()) continue;
                UserItem item = new UserItem(reader, Envir.LoadVersion, Envir.LoadCustomVersion);
                if (SMain.Envir.BindItem(item) && i < QuestInventory.Length)
                    QuestInventory[i] = item;
            }

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                UserMagic magic = new UserMagic(reader);
                if (magic.Info == null) continue;
                Magics.Add(magic);
            }

            if (Envir.LoadVersion < 2) return;

            Thrusting = reader.ReadBoolean();
            HalfMoon = reader.ReadBoolean();
            CrossHalfMoon = reader.ReadBoolean();
            DoubleSlash = reader.ReadBoolean();

            if(Envir.LoadVersion > 46)
            {
                MentalState = reader.ReadByte();
            }

            if (Envir.LoadVersion < 4) return;

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
                Pets.Add(new PetInfo(reader));

            if (Envir.LoadVersion < 5) return;

            AllowGroup = reader.ReadBoolean();
//.........这里部分代码省略.........
开发者ID:nerestaren,项目名称:mir2,代码行数:101,代码来源:CharacterInfo.cs

示例12: BaseStats

 public BaseStats(MirClass Job)
 {
     switch (Job)
     {
         case MirClass.Warrior:
             HpGain = 4F;
             HpGainRate = 4.5F;
             MpGainRate = 0;
             BagWeightGain = 3F;
             WearWeightGain = 20F;
             HandWeightGain = 13F;
             MinAc = 0;
             MaxAc = 7;
             MinMac = 0;
             MaxMac = 0;
             MinDc = 5;
             MaxDc = 5;
             MinMc = 0;
             MaxMc = 0;
             MinSc = 0;
             MaxSc = 0;
             StartAgility = 15;
             StartAccuracy = 5;
             StartCriticalRate = 0;
             StartCriticalDamage = 0;
             CritialRateGain = 0;
             CriticalDamageGain = 0;
             break;
         case MirClass.Wizard:
             HpGain = 15F;
             HpGainRate = 1.8F;
             MpGainRate = 0;
             BagWeightGain = 5F;
             WearWeightGain = 100F;
             HandWeightGain = 90F;
             MinAc = 0;
             MaxAc = 0;
             MinMac = 0;
             MaxMac = 0;
             MinDc = 7;
             MaxDc = 7;
             MinMc = 7;
             MaxMc = 7;
             MinSc = 0;
             MaxSc = 0;
             StartAgility = 15;
             StartAccuracy = 5;
             StartCriticalRate = 0;
             StartCriticalDamage = 0;
             CritialRateGain = 0;
             CriticalDamageGain = 0;
             break;
         case MirClass.Taoist:
             HpGain = 6F;
             HpGainRate = 2.5F;
             MpGainRate = 0;
             BagWeightGain = 4F;
             WearWeightGain = 50F;
             HandWeightGain = 42F;
             MinAc = 0;
             MaxAc = 0;
             MinMac = 12;
             MaxMac = 6;
             MinDc = 7;
             MaxDc = 7;
             MinMc = 0;
             MaxMc = 0;
             MinSc = 7;
             MaxSc = 7;
             StartAgility = 18;
             StartAccuracy = 5;
             StartCriticalRate = 0;
             StartCriticalDamage = 0;
             CritialRateGain = 0;
             CriticalDamageGain = 0;
             break;
         case MirClass.Assassin:
             HpGain = 4F;
             HpGainRate = 3.25F;
             MpGainRate = 0;
             BagWeightGain = 3.5F;
             WearWeightGain = 33F;
             HandWeightGain = 30F;
             MinAc = 0;
             MaxAc = 0;
             MinMac = 0;
             MaxMac = 0;
             MinDc = 8;
             MaxDc = 8;
             MinMc = 0;
             MaxMc = 0;
             MinSc = 0;
             MaxSc = 0;
             StartAgility = 20;
             StartAccuracy = 5;
             StartCriticalRate = 0;
             StartCriticalDamage = 0;
             CritialRateGain = 0;
             CriticalDamageGain = 0;
             break;
//.........这里部分代码省略.........
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:101,代码来源:Common.cs

示例13: CharacterInfo

        public CharacterInfo(BinaryReader reader)
        {
            Index = reader.ReadInt32();
            Name = reader.ReadString();

            Level = reader.ReadByte();
            Class = (MirClass) reader.ReadByte();
            Gender = (MirGender) reader.ReadByte();
            Hair = reader.ReadByte();

            CreationIP = reader.ReadString();
            CreationDate = DateTime.FromBinary(reader.ReadInt64());

            Banned = reader.ReadBoolean();
            BanReason = reader.ReadString();
            ExpiryDate = DateTime.FromBinary(reader.ReadInt64());

            LastIP = reader.ReadString();
            LastDate = DateTime.FromBinary(reader.ReadInt64());

            Deleted = reader.ReadBoolean();
            DeleteDate = DateTime.FromBinary(reader.ReadInt64());

            CurrentMapIndex = reader.ReadInt32();
            CurrentLocation = new Point(reader.ReadInt32(), reader.ReadInt32());
            Direction = (MirDirection)reader.ReadByte();
            BindMapIndex = reader.ReadInt32();
            BindLocation = new Point(reader.ReadInt32(), reader.ReadInt32());

            HP = reader.ReadUInt16();
            MP = reader.ReadUInt16();
            Experience = reader.ReadInt64();

            AMode = (AttackMode) reader.ReadByte();
            PMode = (PetMode) reader.ReadByte();

            int count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                if (!reader.ReadBoolean()) continue;
                UserItem item = new UserItem(reader, Envir.LoadVersion);
                if (SMain.Envir.BindItem(item) && i < Inventory.Length)
                    Inventory[i] = item;
            }

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                if (!reader.ReadBoolean()) continue;
                UserItem item = new UserItem(reader);
                if (SMain.Envir.BindItem(item) && i < Equipment.Length)
                    Equipment[i] = item;
            }

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
            {
                UserMagic magic = new UserMagic(reader);
                if (magic.Info == null) continue;
                Magics.Add(magic);
            }

            if (Envir.LoadVersion < 2) return;

            Thrusting = reader.ReadBoolean();
            HalfMoon = reader.ReadBoolean();
            CrossHalfMoon = reader.ReadBoolean();
            DoubleSlash = reader.ReadBoolean();

            if (Envir.LoadVersion < 4) return;

            count = reader.ReadInt32();
            for (int i = 0; i < count; i++)
                Pets.Add(new PetInfo(reader));

            if (Envir.LoadVersion < 5) return;

            AllowGroup = reader.ReadBoolean();
        }
开发者ID:xiaofengzhiyu,项目名称:CSharpMir,代码行数:79,代码来源:CharacterInfo.cs

示例14: CharacterInfo

        public CharacterInfo(ClientPackets.NewCharacter p, MirConnection c)
        {
            Name = p.Name;
            Class = p.Class;
            Gender = p.Gender;

            CreationIP = c.IPAddress;
            CreationDate = SMain.Envir.Now;
        }
开发者ID:Shamwow2,项目名称:mir2,代码行数:9,代码来源:CharacterInfo.cs

示例15: Load

        public void Load(S.ObjectPlayer info)
        {
            Name = info.Name;
            NameColour = info.NameColour;
            GuildName = info.GuildName;
            GuildRankName = info.GuildRankName;
            Class = info.Class;
            Gender = info.Gender;
            Level = info.Level;

            CurrentLocation = info.Location;
            MapLocation = info.Location;
            GameScene.Scene.MapControl.AddObject(this);

            Direction = info.Direction;
            Hair = info.Hair;

            Weapon = info.Weapon;
            Armour = info.Armour;
            Light = info.Light;

            Poison = info.Poison;

            Dead = info.Dead;
            Hidden = info.Hidden;

            WingEffect = info.WingEffect;
            CurrentEffect = info.Effect;

            MountType = info.MountType;
            RidingMount = info.RidingMount;

            Fishing = info.Fishing;

            TransformType = info.TransformType;

            SetLibraries();

            if (Dead) ActionFeed.Add(new QueuedAction { Action = MirAction.Dead, Direction = Direction, Location = CurrentLocation });
            if (info.Extra) Effects.Add(new Effect(Libraries.Magic2, 670, 10, 800, this));

            ElementEffect = (int)info.ElementOrbEffect;
            ElementsLevel = (int)info.ElementOrbLvl;
            ElementOrbMax = (int)info.ElementOrbMax;

            Buffs = info.Buffs;

            LevelEffects = info.LevelEffects;

            ProcessBuffs();

            SetAction();

            SetEffects();
        }
开发者ID:nerestaren,项目名称:mir2,代码行数:55,代码来源:PlayerObject.cs


注:本文中的MirClass类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。