本文整理汇总了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;
}
}
示例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();
}
}
示例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;
}