本文整理匯總了C#中WCell.RealmServer.Entities.Character.SendSystemMessage方法的典型用法代碼示例。如果您正苦於以下問題:C# Character.SendSystemMessage方法的具體用法?C# Character.SendSystemMessage怎麽用?C# Character.SendSystemMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WCell.RealmServer.Entities.Character
的用法示例。
在下文中一共展示了Character.SendSystemMessage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: HandleTeleport
/// <summary>
/// Teleports into an instance
/// </summary>
/// <param name="chr"></param>
/// <param name="trigger"></param>
/// <returns></returns>
public static bool HandleTeleport(Character chr, AreaTrigger trigger)
{
var regionInfo = World.GetRegionTemplate(trigger.Template.TargetMap);
#if DEBUG
chr.SendSystemMessage("Target location: {0}", trigger.Template.TargetMap);
#endif
if (regionInfo.IsInstance)
{
if (regionInfo.Type == MapType.Normal)
{
InstanceMgr.LeaveInstance(chr, regionInfo, trigger.Template.TargetPos);
return true;
}
else
{
return InstanceMgr.EnterInstance(chr, regionInfo, trigger.Template.TargetPos);
}
}
else if (regionInfo.BGTemplate == null)
{
var rgn = World.GetRegion(regionInfo.Id);
if (rgn != null)
{
chr.TeleportTo(rgn, trigger.Template.TargetPos, trigger.Template.TargetOrientation);
return true;
}
else
{
ContentMgr.OnInvalidDBData("Invalid Region: " + rgn);
}
}
return true;
}
示例2: TeleportInside
public void TeleportInside(Character chr, Vector3 pos)
{
chr.TeleportTo(this, ref pos);
chr.SendSystemMessage("Welcome to {0} #{1} (created at {2})", Name, InstanceId, m_creationTime.ToString());
}
示例3: SendPetitionList
public static void SendPetitionList(this NPC petitioner, Character chr)
{
using (
var packet = new RealmPacketOut(RealmServerOpCode.SMSG_PETITION_SHOWLIST, 8 + 4 * 6))
{
packet.Write(petitioner.EntityId);
if (petitioner.IsGuildPetitioner)
{
// Guild petitioner
packet.Write(1);
packet.Write((uint)PetitionerEntry.GuildPetitionEntry.ItemId);
packet.Write(PetitionerEntry.GuildPetitionEntry.DisplayId);
packet.Write(PetitionerEntry.GuildPetitionEntry.Cost);
packet.Write(0);
packet.Write(PetitionerEntry.GuildPetitionEntry.RequiredSignatures);
}
else if (petitioner.IsArenaPetitioner)
{
// Arena petitioner
chr.SendSystemMessage("Building arena packet.");
//packet.Write(3);
packet.Write((uint)PetitionerEntry.ArenaPetition2v2Entry.Index);
packet.Write((uint)PetitionerEntry.ArenaPetition2v2Entry.ItemId);
packet.Write((uint)PetitionerEntry.ArenaPetition2v2Entry.DisplayId);
packet.Write((uint)PetitionerEntry.ArenaPetition2v2Entry.Cost);
//packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.RequiredSignatures);
//packet.Write(0);
packet.Write((uint)PetitionerEntry.ArenaPetition2v2Entry.RequiredSignatures);
packet.Write((uint)PetitionerEntry.ArenaPetition3v3Entry.Index);
packet.Write((uint)PetitionerEntry.ArenaPetition3v3Entry.ItemId);
packet.Write((uint)PetitionerEntry.ArenaPetition3v3Entry.DisplayId);
packet.Write((uint)PetitionerEntry.ArenaPetition3v3Entry.Cost);
//packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.RequiredSignatures);
//packet.Write(0);
packet.Write((uint)PetitionerEntry.ArenaPetition3v3Entry.RequiredSignatures);
packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.Index);
packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.ItemId);
packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.DisplayId);
packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.Cost);
//packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.RequiredSignatures);
//packet.Write(0);
packet.Write((uint)PetitionerEntry.ArenaPetition5v5Entry.RequiredSignatures);
}
chr.Client.Send(packet);
chr.SendSystemMessage("Sent arena packet.");
}
}