本文整理匯總了C#中Bot.RaiseErrorMessage方法的典型用法代碼示例。如果您正苦於以下問題:C# Bot.RaiseErrorMessage方法的具體用法?C# Bot.RaiseErrorMessage怎麽用?C# Bot.RaiseErrorMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Bot
的用法示例。
在下文中一共展示了Bot.RaiseErrorMessage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Handle
public void Handle(NetworkManager nm, Bot core)
{
if (!core.EnableCpe)
core.RaiseErrorMessage("Protocol error: Received ChangeModel while CPE Disabled.");
if (!core.ClientSupportedExtensions.Contains(CPEExtensions.ChangeModel))
core.RaiseErrorMessage("Protocol error: Received ChangeModel packet, which client does not support.");
}
示例2: WorldCheck
/// <summary>
/// Performs a sanity check against the map file to ensure that there are no out of range values.
/// </summary>
/// <param name="clientBot"></param>
public void WorldCheck(Bot clientBot)
{
for (var x = 0; x < MapSize.X - 1; x++) {
for (var y = 0; y < MapSize.Y - 1; y++) {
for (var z = 0; z < MapSize.Z - 1; z++) {
var myId = GetBlockId((short)x, (short)y, (short)z);
if (myId > 49 && !clientBot.ClientSupportedExtensions.Contains(CPEExtensions.CustomBlocks)) {
clientBot.RaiseErrorMessage("Block ID out of bounds: " + myId + " :" + x + " " + y + " " + z);
} else if (myId > 65) {
clientBot.RaiseErrorMessage("Block ID out of bounds: " + myId + " :" + x + " " + y + " " + z);
}
}
}
}
}