コード例 #1
0
        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");
            this.AddLabel(317, 158, 1149, @"Vhalurian");*/
            this.AddButton( 404, 46, 1150, 1152, 0, GumpButtonType.Reply, 0 );
            this.AddButton( 371, 46, 1153, 1155, 1, GumpButtonType.Reply, 0 );

            //this.AddHtml( 99, 219, 307, 147, @"" + description, (bool)true, (bool)true);
            this.AddTextEntry( 99, 219, 307, 347, 0, 2, @"" + description );
        }
コード例 #2
0
        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)
                                appearance = "Appears good-looking";
                            else if (GetHA(viewed).Disfigurement < 12)
                                appearance = "Appears attractive";
                            else if (GetHA(viewed).Disfigurement < 18)
                                appearance = "Appears average-looking";
                            else if (GetHA(viewed).Disfigurement < 24)
                                appearance = "Appears homely";
                            else if (GetHA(viewed).Disfigurement < 30)
                                appearance = "Appears ugly";
                            else
                                appearance = "Appears disfigured";
                            break;
                        }
                }
            }
            #endregion

            return appearance;
        }