當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。