本文整理汇总了C#中Firewind.Messages.ServerMessage.AppendRawInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendRawInt32方法的具体用法?C# ServerMessage.AppendRawInt32怎么用?C# ServerMessage.AppendRawInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Firewind.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendRawInt32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryRedeemVoucher
internal static void TryRedeemVoucher(GameClient Session, string Code)
{
if (!IsValidCode(Code))
{
ServerMessage Error = new ServerMessage(Outgoing.VoucherRedeemError);
Error.AppendRawInt32(0); // 0=invalid code,1=technical issue,3=redeem at webpage
Session.SendMessage(Error);
return;
}
int Value = GetVoucherValue(Code);
TryDeleteVoucher(Code);
Session.GetHabbo().Credits += Value;
Session.GetHabbo().UpdateCreditsBalance();
ServerMessage message = new ServerMessage(Outgoing.VoucherRedeemOk);
message.AppendString("Credits"); // productName
message.AppendString("Awesome"); // productDescription
Session.SendMessage(message);
}
示例2: RemoveBot
internal void RemoveBot(int VirtualId, bool Kicked)
{
RoomUser User = GetRoomUserByVirtualId(VirtualId);
if (User == null || !User.IsBot)
{
return;
}
if (User.IsPet)
{
pets.Remove(User.PetData.PetId);
petCount--;
}
User.BotAI.OnSelfLeaveRoom(Kicked);
ServerMessage LeaveMessage = new ServerMessage(Outgoing.UserLeftRoom);
LeaveMessage.AppendRawInt32(User.VirtualId);
room.SendMessage(LeaveMessage);
userlist.Remove(User.InternalRoomID);
//freeIDs[User.InternalRoomID] = null;
}
示例3: BotLeaveMessage
private void BotLeaveMessage()
{
foreach (RoomUser user in roomUserManager.UserList.Values)
{
if (user.IsBot || user.IsPet)
{
ServerMessage LeaveMessage = new ServerMessage(29);
LeaveMessage.AppendRawInt32(user.VirtualId);
SendMessage(LeaveMessage);
}
}
}