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


C# PlayerMobile.ResetObjectProperties方法代码示例

本文整理汇总了C#中Server.Mobiles.PlayerMobile.ResetObjectProperties方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.ResetObjectProperties方法的具体用法?C# PlayerMobile.ResetObjectProperties怎么用?C# PlayerMobile.ResetObjectProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Mobiles.PlayerMobile的用法示例。


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

示例1: WipeAllTraits

        public static void WipeAllTraits( PlayerMobile from )
        {
            if( !from.Reforging )
                from.Forging = true;

            from.XPFromKilling = true;
            from.XPFromCrafting = true;
            from.Blessed = true;

            InitialStats( from, false );

            if( !from.Reforging || from.OldMapChar )
            {
                from.Hue = 0;
                from.HairItemID = 0;
                from.FacialHairItemID = 0;
            }

            if( !from.Reforging )
            {
                from.Description = null;
                from.Description2 = null;
                from.Description3 = null;
                from.Height = 100;
                from.Weight = 100;
            }

            from.Class = Class.None;
            from.Advanced = Advanced.None;
            from.Subclass = Subclass.None;

            from.RecreateCP = Math.Max( 0, (from.CPSpent + from.CP - 10000) );
            from.RecreateXP = from.XP;
            from.XP = 0;
            from.CP = 10000;
            from.NextLevel = 1000;
            from.Level = 1;
            from.SkillPoints = 0;
            from.FeatSlots = 0;
            from.CPCapOffset = 0;
            from.CPSpent = 0;
            from.FollowersMax = 5;
            from.XP += from.RecreateXP;
            from.CP += from.RecreateCP;

            if( !from.Reforging || from.OldMapChar )
            {
               	from.Age = 18;
                from.MaxAge = 0;
                from.Nation = Nation.None;
            }

            if( from.Nation != Nation.None )
                from.SendGump( new InitialStatsGump(from) );

            from.ResetObjectProperties();

            from.TitlePrefix = null;
            from.Glassblowing = false; from.Masonry = false; from.SandMining = false; from.StoneMining = false;
            from.LastDonationLife = DateTime.MinValue;
            from.LastOffenseToNature = DateTime.MinValue;
            from.WeaponSpecialization = null;
            from.SecondSpecialization = null;
            from.SpokenLanguage = KnownLanguage.Common;
            from.Stance = null;
            from.CombatManeuver = null;
            from.ChosenDeity = ChosenDeity.None;
            from.CraftingSpecialization = null;
            from.AutoPicking = false; from.BreakLock = false; from.GemHarvesting = false;
            from.InvalidateProperties();

            if( from.Backpack is ArmourBackpack )
            {
                ArmourBackpack pack = from.Backpack as ArmourBackpack;
                pack.BluntBonus = 0;
                pack.PiercingBonus = 0;
                pack.SlashingBonus = 0;
                pack.ColdBonus = 0;
                pack.FireBonus = 0;
                pack.PoisonBonus = 0;
                pack.EnergyBonus = 0;
                pack.Attributes.NightSight = 0;
                pack.Attributes.WeaponDamage = 0;
                pack.Attributes.WeaponSpeed = 0;
                pack.Attributes.AttackChance = 0;
            }

            NullifySkills( from );

            if( from.Reforging && !from.OldMapChar )
            {
                if( from.Nation == Nation.Alyrian )
                    from.Feats.SetFeatLevel(FeatList.AlyrianLanguage, 3);

                else if( from.Nation == Nation.Azhuran )
                    from.Feats.SetFeatLevel(FeatList.AzhuranLanguage, 3);

                else if( from.Nation == Nation.Khemetar )
                    from.Feats.SetFeatLevel(FeatList.KhemetarLanguage, 3);

//.........这里部分代码省略.........
开发者ID:justdanofficial,项目名称:khaeros,代码行数:101,代码来源:LevelSystem.cs


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