本文整理汇总了C#中Server.Mobiles.PlayerMobile.GetBackgroundLevel方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.GetBackgroundLevel方法的具体用法?C# PlayerMobile.GetBackgroundLevel怎么用?C# PlayerMobile.GetBackgroundLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.GetBackgroundLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisguiseLookGump
public DisguiseLookGump( PlayerMobile self, int page )
: base(0, 0)
{
string description = "";
m_page = page;
self.CloseGump( typeof( DisguiseLookGump ) );
this.Closable=false;
this.Disposable=false;
this.Dragable=true;
this.Resizable=false;
this.AddPage( 0 );
this.AddBackground( 54, 31, 400, 383, 9270 );
this.AddBackground( 71, 192, 364, 202, 3500 );
this.AddImage( 4, 10, 10440 );
this.AddImage( 423, 10, 10441 );
this.AddImage( 183, 50, 29 );
//this.AddImage(215, 80, 9000);
this.AddLabel( 218, 47, 2010, @"Description" );
if( self != null )
{
this.AddButton( 396, 130, 4005, 4007, 102, GumpButtonType.Reply, 0 );
this.AddButton( 359, 130, 4014, 4016, 101, GumpButtonType.Reply, 0 );
string beauty = "Average-Looking";
if( self.Disguise.Looks != null )
beauty = self.Disguise.Looks;
else if( self.GetBackgroundLevel(BackgroundList.Attractive) > 0 )
beauty = "Attractive";
else if( self.GetBackgroundLevel(BackgroundList.GoodLooking) > 0 )
beauty = "Good-Looking";
else if( self.GetBackgroundLevel(BackgroundList.Gorgeous) > 0 )
beauty = "Gorgeous";
else if( self.GetBackgroundLevel(BackgroundList.Homely) > 0 )
beauty = "Homely";
else if( self.GetBackgroundLevel(BackgroundList.Ugly) > 0 )
beauty = "Ugly";
else if( self.GetBackgroundLevel(BackgroundList.Hideous) > 0 )
beauty = "Hideous";
string age = "Teenager";
if( self.Disguise.Age != null )
age = self.Disguise.Age;
else if( self.Age > 19 && self.Age < 26 )
age = "Early twenties";
else if( self.Age > 25 && self.Age < 30 )
age = "Late twenties";
else if( self.Age > 29 && self.Age < 36 )
age = "Early thirties";
else if( self.Age > 35 && self.Age < 40 )
age = "Late thirties";
else if( self.Age > 39 && self.Age < 60 )
age = "Middle-aged";
else if( self.Age > 59 && self.Age < 80 )
age = "Elderly";
else if( self.Age > 79 && self.Age < 100 )
age = "Extremely old";
else if( self.Age > 99 )
age = "Ancient";
m_self = self;
if( page == 1 )
description = self.Disguise.Description1;
else if( page == 2 )
description = self.Disguise.Description2;
else if( page == 3 )
description = self.Disguise.Description3;
this.AddLabel( 88, 97, 2010, @"Height: " + self.Height + " petrae" );
this.AddLabel( 88, 117, 2010, @"Weight: " + self.Weight + " petrae" );
this.AddLabel( 88, 137, 2010, beauty );
this.AddLabel( 88, 157, 2010, age );
}
/*this.AddLabel(126, 84, 1149, @"Azhuran");
this.AddLabel(126, 121, 1149, @"Khemetar");
this.AddLabel(126, 158, 1149, @"Alyrian");
this.AddLabel(317, 84, 1149, @"Mhordul");
this.AddLabel(317, 121, 1149, @"Tyrean");
//.........这里部分代码省略.........
示例2: GetAppearance
public static string GetAppearance(PlayerMobile viewer, PlayerMobile viewed)
{
string appearance = "Appears average-looking";
if (viewer != viewed && viewed.Disguise != null && viewed.Disguise.Looks != null)
appearance = viewed.Disguise.Looks;
else
{
#region Background Appearance Setting
if (viewed.GetBackgroundLevel(BackgroundList.Attractive) > 0)
appearance = "Appears attractive";
else if (viewed.GetBackgroundLevel(BackgroundList.GoodLooking) > 0)
appearance = "Appears good-looking";
else if (viewed.GetBackgroundLevel(BackgroundList.Gorgeous) > 0)
appearance = "Appears gorgeous";
else if (viewed.GetBackgroundLevel(BackgroundList.Homely) > 0)
appearance = "Appears homely";
else if (viewed.GetBackgroundLevel(BackgroundList.Ugly) > 0)
appearance = "Appears ugly";
else if (viewed.GetBackgroundLevel(BackgroundList.Hideous) > 0)
appearance = "Appears disfigured";
#endregion
}
#region Disfigure from Disease
if (GetHA(viewed).Disfigurement > 0)
{
if (!GetHA(viewed).HasDisease(Disease.TyreanDisease) && !GetHA(viewed).HasDisease(Disease.Leprosy))
{
while (GetHA(viewed).LastAppearanceRecovery + TimeSpan.FromHours(48) < DateTime.Now)
{
GetHA(viewed).LastAppearanceRecovery += TimeSpan.FromHours(48);
GetHA(viewed).Disfigurement--;
}
}
switch (appearance)
{
case "Appears disfigured":
{
break;
}
case "Appears ugly":
{
if (GetHA(viewed).Disfigurement > 5)
appearance = "Appears disfigured";
break;
}
case "Appears homely":
{
if (GetHA(viewed).Disfigurement < 6)
appearance = "Appears ugly";
else
appearance = "Appears ugly";
break;
}
case "Appears average-looking":
{
if (GetHA(viewed).Disfigurement < 6)
appearance = "Appears homely";
else if (GetHA(viewed).Disfigurement < 12)
appearance = "Appears ugly";
else
appearance = "Appears disfigured";
break;
}
case "Appears attractive":
{
if (GetHA(viewed).Disfigurement < 6)
appearance = "Appears average-looking";
else if (GetHA(viewed).Disfigurement < 12)
appearance = "Appears homely";
else if (GetHA(viewed).Disfigurement < 18)
appearance = "Appears ugly";
else
appearance = "Appears disfigured";
break;
}
case "Appears good-looking":
{
if (GetHA(viewed).Disfigurement < 6)
appearance = "Appears attractive";
else if (GetHA(viewed).Disfigurement < 12)
appearance = "Appears average-looking";
else if (GetHA(viewed).Disfigurement < 18)
appearance = "Appears homely";
else if (GetHA(viewed).Disfigurement < 24)
appearance = "Appears ugly";
else
appearance = "Appears disfigured";
break;
}
case "Appears gorgeous":
{
if (GetHA(viewed).Disfigurement < 6)
//.........这里部分代码省略.........