本文整理匯總了C#中CmdTrigger.ReplyFormat方法的典型用法代碼示例。如果您正苦於以下問題:C# CmdTrigger.ReplyFormat方法的具體用法?C# CmdTrigger.ReplyFormat怎麽用?C# CmdTrigger.ReplyFormat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CmdTrigger
的用法示例。
在下文中一共展示了CmdTrigger.ReplyFormat方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Process
public override void Process(CmdTrigger<RealmServerCmdArgs> trigger)
{
WorldObject obj = trigger.Args.Target;
var zone = obj.Zone;
string zoneStr;
if (zone != null)
{
zoneStr = zone.Id.ToString();
while ((zone = zone.ParentZone) != null)
{
zoneStr += " in " + zone;
}
}
else
{
zoneStr = "<null>";
}
var height = obj.TerrainHeight;
trigger.Reply("Map: " + obj.Map + ", Zone: " + zoneStr);
trigger.Reply("Position X: " + obj.Position.X + ", Y: " + obj.Position.Y + ", Z: " + obj.Position.Z + ", O: " + obj.Orientation +
"(" + Math.Abs(obj.Position.Z - height) + " yds from Ground)");
int tileX, tileY;
PositionUtil.GetTileXYForPos(obj.Position, out tileX, out tileY);
trigger.ReplyFormat("Tile: X={0}, Y={1} (Collision Data {2})", tileX, tileY,
obj.Map.Terrain.IsAvailable(tileX, tileY) ?
ChatUtility.Colorize("Available", Color.Green) :
ChatUtility.Colorize("Unavailable", Color.Red));
}