当前位置: 首页>>代码示例>>C#>>正文


C# PlayerMobile.PublicOverheadMessage方法代码示例

本文整理汇总了C#中Server.Mobiles.PlayerMobile.PublicOverheadMessage方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.PublicOverheadMessage方法的具体用法?C# PlayerMobile.PublicOverheadMessage怎么用?C# PlayerMobile.PublicOverheadMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Mobiles.PlayerMobile的用法示例。


在下文中一共展示了PlayerMobile.PublicOverheadMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AwardRankTrophy

        public virtual void AwardRankTrophy(PlayerMobile pm, int rank)
        {
            switch (rank)
            {
                case 0:
                {
                    pm.SendMessage(54, "You took first place in the {0}.", Name);
                    pm.PublicOverheadMessage(MessageType.Label, 54, true, "FIRST PLACE!");

                    BankBox bank = pm.FindBank(Map.Expansion);

                    if (bank != null)
                    {
                        bank.DropItem(
                            new BattlesTrophy(Name + " - First Place", TrophyType.First)
                            {
                                Owner = pm
                            });

                        pm.SendMessage(54, "A trophy has been placed in your bankbox.");
                    }
                }
                    break;
                case 1:
                {
                    pm.SendMessage(54, "You took second place in the {0}.", Name);
                    pm.PublicOverheadMessage(MessageType.Label, 54, true, "SECOND PLACE!");

                    BankBox bank = pm.FindBank(Map.Expansion);

                    if (bank != null)
                    {
                        bank.DropItem(
                            new BattlesTrophy(Name + " - Second Place", TrophyType.Second)
                            {
                                Owner = pm
                            });

                        pm.SendMessage(54, "A trophy has been placed in your bankbox.");
                    }
                }
                    break;
                case 2:
                {
                    pm.SendMessage(54, "You took third place in the {0}.", Name);
                    pm.PublicOverheadMessage(MessageType.Label, 54, true, "THIRD PLACE!");

                    BankBox bank = pm.FindBank(Map.Expansion);

                    if (bank != null)
                    {
                        bank.DropItem(
                            new BattlesTrophy(Name + " - Third Place", TrophyType.Third)
                            {
                                Owner = pm
                            });

                        pm.SendMessage(54, "A trophy has been placed in your bankbox.");
                    }
                }
                    break;
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:63,代码来源:PvPBattle.cs

示例2: CheckConditions

		// Checks the conditions stored in the stone against the playermobile
		// passed it and reports publicly + with stone hue

		public void CheckConditions(PlayerMobile pm)
		{
			ArrayList FailurePoints = new ArrayList();
			RuleValidator rv = new RuleValidator( this );

			rv.Validate(pm, ref FailurePoints);

			if(FailurePoints.Count > 0)
			{
				// Tell them what + why
				pm.PublicOverheadMessage( Network.MessageType.Regular, 0, false, string.Format("You failed the test for {0} reason{1} :", FailurePoints.Count, FailurePoints.Count!=1 ? "s" : "") );

				foreach (string strFailure in FailurePoints)
					pm.PublicOverheadMessage( Network.MessageType.Regular, 0, false, strFailure );

				// Hue the rune invalid
				((AddonComponent) Components[0]).Hue = 137;
				new RehueTimer( pm, this ).Start();
			}
			else
			{
				pm.PublicOverheadMessage( Network.MessageType.Regular, 0, false, "You've passed the test!" );

				// Hue the rune valid
				((AddonComponent) Components[0]).Hue = 1000;
				new RehueTimer( pm, this ).Start();
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:31,代码来源:TourneyStoneAddon.cs

示例3: HasCustomRace

 private static bool HasCustomRace(PlayerMobile pm)
 {
     if (pm.HasCustomRace)
     {
         pm.PublicOverheadMessage(MessageType.Emote, 0x3b2, true, "I'm already a different race!");
         return true;
     }
     return false;
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:9,代码来源:RaceGate.cs


注:本文中的Server.Mobiles.PlayerMobile.PublicOverheadMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。