本文整理汇总了C#中ServerMessage.AppendRawInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendRawInt32方法的具体用法?C# ServerMessage.AppendRawInt32怎么用?C# ServerMessage.AppendRawInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendRawInt32方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryRedeemVoucher
internal static void TryRedeemVoucher(GameClient Session, string Code)
{
if (!IsValidCode(Code))
{
ServerMessage Error = new ServerMessage(213);
Error.AppendRawInt32(1);
Session.SendMessage(Error);
return;
}
int Value = GetVoucherValue(Code);
TryDeleteVoucher(Code);
Session.GetHabbo().Credits += Value;
Session.GetHabbo().UpdateCreditsBalance();
Session.SendMessage(new ServerMessage(212));
}
示例2: Compose
public static ServerMessage Compose(int Code)
{
ServerMessage Message = new ServerMessage(OpcodesOut.CATALOG_REDEEM_ERROR);
Message.AppendRawInt32(Code);
return Message;
}
示例3: 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(29);
LeaveMessage.AppendRawInt32(User.VirtualId);
room.SendMessage(LeaveMessage);
userlist.Remove(User.InternalRoomID);
//freeIDs[User.InternalRoomID] = null;
}
示例4: 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);
}
}
}
示例5: RemoveRoomUser
private void RemoveRoomUser(RoomUser user)
{
UserList.Remove(user.InternalRoomID);
user.InternalRoomID = -1;
room.GetGameMap().GameMap[user.X, user.Y] = user.SqState;
room.GetGameMap().RemoveUserFromMap(user, new Point(user.X, user.Y));
ServerMessage LeaveMessage = new ServerMessage(29);
LeaveMessage.AppendRawInt32(user.VirtualId);
room.SendMessage(LeaveMessage);
}