本文整理匯總了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);
//.........這裏部分代碼省略.........