当前位置: 首页>>代码示例>>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;未经允许,请勿转载。