當前位置: 首頁>>代碼示例>>C#>>正文


C# PlayerMobile.GetDisguisedNation方法代碼示例

本文整理匯總了C#中Server.Mobiles.PlayerMobile.GetDisguisedNation方法的典型用法代碼示例。如果您正苦於以下問題:C# PlayerMobile.GetDisguisedNation方法的具體用法?C# PlayerMobile.GetDisguisedNation怎麽用?C# PlayerMobile.GetDisguisedNation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobiles.PlayerMobile的用法示例。


在下文中一共展示了PlayerMobile.GetDisguisedNation方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: LookGump


//.........這裏部分代碼省略.........

                else if( self.Age > 19 && self.Age < 26 )
                    age = "Is in their early twenties";

                else if( self.Age > 25 && self.Age < 30 )
                    age = "Is in their late twenties";

                else if( self.Age > 29 && self.Age < 36 )
                    age = "Is in their early thirties";

                else if( self.Age > 35 && self.Age < 40 )
                    age = "Is in their late thirties";

                else if( self.Age > 39 && self.Age < 60 )
                    age = "Looks to be middle-aged";

                else if( self.Age > 59 && self.Age < 80 )
                    age = "Looks to be elderly";

                else if( self.Age > 79 && self.Age < 100 )
                    age = "Looks extremely old";

                else if( self.Age > 99 )
                    age = "Looks to be ancient";

                else if( self.Age < 13 )
                    age = "Looks to be a child";

                string race = "Exhibits no racial qualities";

                //if( !myself && self.Disguise.Nation != null )
                    //race = "Appears to be of " + self.Disguise.Nation + " ancestory";

                race = "Exhibits " + self.GetDisguisedNation().ToString() + " qualities";

                //if (self.Nation == Nation.Vhalurian)
                //    race = "Exhibits Vhalurian qualities";

                //else if (self.Nation == Nation.Alyrian)
                //    race = "Exhibits Alyrian qualities";

                //else if (self.Nation == Nation.Azhuran)
                //    race = "Exhibits Azhuran qualities";

                //else if (self.Nation == Nation.Khemetar)
                //    race = "Exhibits Khemetar qualities";

                //else if (self.Nation == Nation.Mhordul)
                //    race = "Exhibits Mhordul qualities";

                //else if (self.Nation == Nation.Tyrean)
                //    race = "Exhibits Tyrean qualities";

                m_self = self;

                int rawweight = self.Weight;
                int rawheight = self.Height;
                int roundedweight = ExtensionMethods.RoundOff(rawweight);
                int roundedheight = ExtensionMethods.RoundOff(rawheight);

                string height = "Looks around " + roundedheight + " petrae tall";
                string weight = "Looks about " + roundedweight + " petrae heavy";

                    if (page == 1)
                    {
                        if (myself)
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:67,代碼來源:LookGump.cs

示例2: CanDoBusiness

        public static bool CanDoBusiness(GovernmentEntity g, PlayerMobile pm)
        {
            if (CustomGuildStone.IsGuildEconomic(pm, g))
                return true;

            foreach(string name in g.TradeInformation.NoBusinessList)
            {
                if(name.ToLower() == pm.Name.ToLower())
                    return false;
            }
            foreach(Nation n in g.TradeInformation.NoBusinessNations)
            {
                if(n == pm.GetDisguisedNation())
                    return false;
            }
            if(g.MilitaryPolicies.KillIndividualOnSight.Contains(pm.Name))
                return false;
            if(g.MilitaryPolicies.JailIndividualOnSight.Contains(pm.Name))
                return false;
            if(!g.MilitaryPolicies.Exceptions.Contains(pm.Name))
            {
                if(g.MilitaryPolicies.JailNationOnSight.Contains(pm.GetDisguisedNation()))
                    return false;
                if(g.MilitaryPolicies.KillNationOnSight.Contains(pm.GetDisguisedNation()))
                    return false;
            }
            foreach(CustomGuildStone enemy in g.EnemyGuilds)
            {
                if(CustomGuildStone.IsGuildMember(pm, enemy) && pm.CustomGuilds[enemy].ActiveTitle)
                    return false;
            }
            return true;
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:33,代碼來源:GovernmentEntity.cs


注:本文中的Server.Mobiles.PlayerMobile.GetDisguisedNation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。