本文整理汇总了C#中Essential.Messages.ServerMessage.AppendUInt方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendUInt方法的具体用法?C# ServerMessage.AppendUInt怎么用?C# ServerMessage.AppendUInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Essential.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendUInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room Room = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (Room != null && Room.CheckRights(Session, true))
{
ServerMessage LoadUsersWithRights = new ServerMessage(Outgoing.FlatControllerAdded);
LoadUsersWithRights.AppendUInt(Room.Id);
LoadUsersWithRights.AppendInt32(Room.UsersWithRights.Count);
foreach (uint current2 in Room.UsersWithRights)
{
LoadUsersWithRights.AppendUInt(current2);
LoadUsersWithRights.AppendString(Essential.GetGame().GetClientManager().GetNameById(current2));
}
Session.SendMessage(LoadUsersWithRights);
foreach (uint current3 in Room.UsersWithRights)
{
ServerMessage serverMessage = new ServerMessage(Outgoing.GivePowers); // Updated
serverMessage.AppendUInt(Room.Id);
serverMessage.AppendUInt(current3);
serverMessage.AppendStringWithBreak(Essential.GetGame().GetClientManager().GetNameById(current3));
Session.SendMessage(serverMessage);
}
}
}
示例2: Trade
public Trade(uint uint_3, uint uint_4, uint uint_5)
{
this.uint_1 = uint_3;
this.uint_2 = uint_4;
this.class65_0 = new TradeUser[2];
this.class65_0[0] = new TradeUser(uint_3, uint_5);
this.class65_0[1] = new TradeUser(uint_4, uint_5);
this.int_0 = 1;
this.uint_0 = uint_5;
TradeUser[] array = this.class65_0;
for (int i = 0; i < array.Length; i++)
{
TradeUser @class = array[i];
if ([email protected]_0().Statusses.ContainsKey("trd"))
{
@class.method_0().AddStatus("trd", "");
@class.method_0().UpdateNeeded = true;
}
}
ServerMessage Message = new ServerMessage(Outgoing.TradeStart); // Updated
Message.AppendUInt(uint_3);
Message.AppendInt32(1);
Message.AppendUInt(uint_4);
Message.AppendInt32(1);
this.method_13(Message);
}
示例3: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(Outgoing.WardrobeData); //Rootkit
Message.AppendInt32(Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") ? 1 : 0);
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
using (DatabaseClient @class = Essential.GetDatabase().GetClient())
{
@class.AddParamWithValue("userid", Session.GetHabbo().Id);
DataTable dataTable = @class.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
if (dataTable == null)
{
Message.AppendInt32(0);
}
else
{
Message.AppendInt32(dataTable.Rows.Count);
foreach (DataRow dataRow in dataTable.Rows)
{
Message.AppendUInt((uint)dataRow["slot_id"]);
Message.AppendStringWithBreak((string)dataRow["look"]);
Message.AppendStringWithBreak((string)dataRow["gender"]);
}
}
}
Session.SendMessage(Message);
}
else
{
using (DatabaseClient @class = Essential.GetDatabase().GetClient())
{
@class.AddParamWithValue("userid", Session.GetHabbo().Id);
DataTable dataTable = @class.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
if (dataTable == null)
{
Message.AppendInt32(0);
}
else
{
Message.AppendInt32(dataTable.Rows.Count);
foreach (DataRow dataRow in dataTable.Rows)
{
Message.AppendUInt((uint)dataRow["slot_id"]);
Message.AppendStringWithBreak((string)dataRow["look"]);
Message.AppendStringWithBreak((string)dataRow["gender"]);
}
}
}
Session.SendMessage(Message);
}
}
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int num = Event.PopWiredInt32();
List<uint> list = new List<uint>();
for (int i = 0; i < num; i++)
{
list.Add(Event.PopWiredUInt());
}
string text = Event.PopFixedString();
text = Essential.DoFilter(text, true, false);
text = ChatCommandHandler.ApplyFilter(text);
ServerMessage Message = new ServerMessage(Outgoing.InstantInvite); // Update
Message.AppendUInt(Session.GetHabbo().Id);
Message.AppendStringWithBreak(text);
foreach (uint current in list)
{
if (Session.GetHabbo().GetMessenger().method_9(Session.GetHabbo().Id, current))
{
GameClient @class = Essential.GetGame().GetClientManager().GetClient(current);
if (@class == null)
{
break;
}
@class.SendMessage(Message);
}
}
}
示例5: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(Outgoing.WiredCondition); // Updated
Message.AppendBoolean(false);
Message.AppendInt32(5);
if (RoomItem_0.string_3 != "")
{
Message.AppendInt32(RoomItem_0.string_3.Split(',').Length);
foreach (string ItemId in RoomItem_0.string_3.Split(','))
{
Message.AppendInt32(int.Parse(ItemId));
}
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(1);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
}
}
示例6: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
RoomData @class = Essential.GetGame().GetRoomManager().method_12(num);
if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
{
}
else
{
ServerMessage Message2 = new ServerMessage(Outgoing.FavsUpdate); // Updated
Message2.AppendUInt(num);
Message2.AppendBoolean(true);
Session.SendMessage(Message2);
Session.GetHabbo().list_1.Add(num);
using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
{
class2.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO user_favorites (user_id,room_id) VALUES ('",
Session.GetHabbo().Id,
"','",
num,
"')"
}));
}
}
}
示例7: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(Outgoing.WiredCondition); // Updated
Message.AppendBoolean(false);
if (Session.GetHabbo().HasFuse("wired_unlimitedselects"))
Message.AppendInt32(1000000);
else
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Session.SendMessage(Message);
}
}
示例8: Handle
public void Handle(GameClient session, ClientMessage message)
{
if (session != null && session.GetHabbo() != null)
{
Room room = Essential.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);
if (room != null)
{
RoomUser targetUser = room.GetRoomUserByHabbo(message.PopWiredUInt());
if (targetUser != null && !targetUser.IsBot && targetUser.GetClient() != null)
{
ServerMessage Message = new ServerMessage(Outgoing.UpdateBadges); // Updated
Message.AppendUInt(targetUser.GetClient().GetHabbo().Id);
Message.AppendInt32(targetUser.GetClient().GetHabbo().GetBadgeComponent().VisibleBadges);
using (TimedLock.Lock(targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges()))
{
foreach (Badge current in targetUser.GetClient().GetHabbo().GetBadgeComponent().GetBadges())
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
}
session.SendMessage(Message);
}
}
}
}
示例9: Handle
public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
{
using(DatabaseClient dbClient = Essential.GetDatabase().GetClient())
{
string username = Event.PopFixedString();
string password = Event.PopFixedString(); //TODO: Hash undso..
dbClient.AddParamWithValue("username", username);
string currentpassword = "";
try
{
currentpassword = dbClient.ReadString("SELECT password FROM users WHERE [email protected]");
}
catch { }
if (currentpassword == "")
{ Session.SendMessage(new ServerMessage(Outgoing.InvalidUsername)); return; }
if (currentpassword != password)
{ Session.SendMessage(new ServerMessage(Outgoing.InvalidPassword)); return; }
ServerMessage asdf = new ServerMessage(12345);
asdf.AppendBoolean(true);
asdf.AppendString("Hi");
asdf.AppendInt32(1337);
asdf.AppendUInt(12345);
Session.SendMessage(asdf);
Session.tryLogin(dbClient.ReadString("SELECT auth_ticket FROM users WHERE [email protected]"));
}
}
示例10: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = Essential.FilterString(Event.PopFixedString());
if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null && Session.GetHabbo().PassedSafetyQuiz)
{
Session.GetHabbo().CheckForUnmute();
if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
{
ServerMessage Message = new ServerMessage(Outgoing.InstantChat);
Message.AppendUInt(0u);
Message.AppendString(Session.GetHabbo().Username + ": " + text);
Message.AppendString(Essential.GetUnixTimestamp() + string.Empty);
Essential.GetGame().GetClientManager().SendToStaffs(Session, Message, false);
}
else
{
if (num == 0u)
{
/* ServerMessage Message2 = new ServerMessage(1133);
Message2.AppendInt32(4);
Message2.AppendUInt(0u);
Session.SendMessage(Message2);*/
}
else
{
if (Session != null && Session.GetHabbo() != null)
{
Session.GetHabbo().GetMessenger().method_18(num, text);
}
}
}
}
}
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int GameId = Event.PopWiredInt32();
ServerMessage InitGame = new ServerMessage(Outgoing.GameID);
InitGame.AppendInt32(GameId);
InitGame.AppendInt32(0);
Session.SendMessage(InitGame);
ServerMessage Game2WeeklyLeaderboardEvent = new ServerMessage(Outgoing.Game2WeeklyLeaderboard);
Game2WeeklyLeaderboardEvent.AppendInt32(DateTime.Now.Year);
Game2WeeklyLeaderboardEvent.AppendInt32(1); // ??
Game2WeeklyLeaderboardEvent.AppendInt32(0); // ??
Game2WeeklyLeaderboardEvent.AppendInt32(0); // ??
Game2WeeklyLeaderboardEvent.AppendInt32(5231); // ??
Game2WeeklyLeaderboardEvent.AppendInt32(1); // count:
// foreach...
Game2WeeklyLeaderboardEvent.AppendUInt(Session.GetHabbo().Id); // user id
Game2WeeklyLeaderboardEvent.AppendInt32(DateTime.Now.Year); // time of clasification
Game2WeeklyLeaderboardEvent.AppendInt32(1); // position
Game2WeeklyLeaderboardEvent.AppendString(Session.GetHabbo().Username); // username
Game2WeeklyLeaderboardEvent.AppendString(Session.GetHabbo().Figure);
Game2WeeklyLeaderboardEvent.AppendString(Session.GetHabbo().Gender.ToLower());
Game2WeeklyLeaderboardEvent.AppendInt32(3);
Game2WeeklyLeaderboardEvent.AppendInt32(GameId);
Session.SendMessage(Game2WeeklyLeaderboardEvent);
ServerMessage Game2AccountGameStatusMessageEvent = new ServerMessage(Outgoing.Game2AccountGameStatus);
Game2AccountGameStatusMessageEvent.AppendInt32(GameId);
Game2AccountGameStatusMessageEvent.AppendInt32(-1);
Game2AccountGameStatusMessageEvent.AppendInt32(132);
Session.SendMessage(Game2AccountGameStatusMessageEvent);
ServerMessage InitGame2 = new ServerMessage(Outgoing.InitGame);
InitGame2.AppendInt32(GameId);
InitGame2.AppendInt32(0);
Session.SendMessage(InitGame2);
ServerMessage GameCenterLayoutBestOfWeek = new ServerMessage(Outgoing.BestOfWeek);
GameCenterLayoutBestOfWeek.AppendInt32(GameId);
GameCenterLayoutBestOfWeek.AppendInt32(0); // enabled 0 : 1
// if enabled
GameCenterLayoutBestOfWeek.AppendString("s");
GameCenterLayoutBestOfWeek.AppendInt32(4313);
GameCenterLayoutBestOfWeek.AppendString("200");
GameCenterLayoutBestOfWeek.AppendInt32(1);
GameCenterLayoutBestOfWeek.AppendInt32(-1);
GameCenterLayoutBestOfWeek.AppendBoolean(false);
//
GameCenterLayoutBestOfWeek.AppendInt32(5231); // minutos que quedan.
GameCenterLayoutBestOfWeek.AppendBoolean(false); // enabled??
Session.SendMessage(GameCenterLayoutBestOfWeek);
}
示例12: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
try
{
Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
RoomItem class2 = @class.method_28(Event.PopWiredUInt());
if (class2 != null)
{
DataRow dataRow = null;
using (DatabaseClient class3 = Essential.GetDatabase().GetClient())
{
dataRow = class3.ReadDataRow("SELECT base_id,amount,extra_data FROM user_presents WHERE item_id = '" + class2.uint_0 + "' LIMIT 1");
}
if (dataRow != null)
{
Item class4 = Essential.GetGame().GetItemManager().GetItemById((uint)dataRow["base_id"]);
if (class4 != null)
{
@class.method_29(Session, class2.uint_0, true, true);
ServerMessage Message = new ServerMessage(Outgoing.UpdateInventary);
Message.AppendUInt(class2.uint_0);
Session.SendMessage(Message);
/*ServerMessage Message2 = new ServerMessage(Outgoing.Item2);
Message2.AppendStringWithBreak(class4.Type.ToString());
Message2.AppendInt32(class4.Sprite);
Message2.AppendStringWithBreak(class4.Name);
Message2.AppendInt32(class2.uint_0);
Message2.AppendString(class2.GetBaseItem().Type.ToString());
Message2.AppendBoolean(true);
Message2.AppendString(class2.ExtraData);
Session.SendMessage(Message2);*/
ServerMessage Message3 = new ServerMessage(Outgoing.OpenGift);
Message3.AppendString(class4.Type.ToString());
Message3.AppendInt32(class4.Sprite);
Message3.AppendString(class4.Name);
Message3.AppendInt32(class2.uint_0);
Message3.AppendString(class2.GetBaseItem().Type.ToString());
Message3.AppendBoolean(true);
Message3.AppendString(class2.ExtraData);
Session.SendMessage(Message3);
using (DatabaseClient class3 = Essential.GetDatabase().GetClient())
{
class3.ExecuteQuery("DELETE FROM user_presents WHERE item_id = '" + class2.uint_0 + "' LIMIT 1");
}
Essential.GetGame().GetCatalog().AddItemToInventory(Session, class4, (int)dataRow["amount"], (string)dataRow["extra_data"], true, 0u, 0, 0, "");
}
}
}
}
}
catch
{
}
}
示例13: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
RoomData @class = Essential.GetGame().GetRoomManager().method_12(Session.GetHabbo().uint_2);
ServerMessage Message = new ServerMessage(Outgoing.InitialRoomInformation); // P
Message.AppendStringWithBreak(@class.ModelName);
Message.AppendUInt(@class.Id);
Session.SendMessage(Message);
}
示例14: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Session.GetHabbo().GetBadgeComponent().ResetBadgeSlots();
using (DatabaseClient @class = Essential.GetDatabase().GetClient())
{
@class.ExecuteQuery("UPDATE user_badges SET badge_slot = '0' WHERE user_id = '" + Session.GetHabbo().Id + "'");
goto IL_131;
}
IL_52:
int num = Event.PopWiredInt32();
string text = Event.PopFixedString();
if (text.Length != 0)
{
if (!Session.GetHabbo().GetBadgeComponent().HasBadge(text) || num < 1 || num > 5)
{
return;
}
if (Session.GetHabbo().CurrentQuestId > 0 && Essential.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "WEARBADGE")
{
Essential.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
}
Session.GetHabbo().GetBadgeComponent().GetBadgeByCode(text).Slot = num;
using (DatabaseClient @class = Essential.GetDatabase().GetClient())
{
@class.AddParamWithValue("slotid", num);
@class.AddParamWithValue("badge", text);
@class.AddParamWithValue("userid", Session.GetHabbo().Id);
@class.ExecuteQuery("UPDATE user_badges SET badge_slot = @slotid WHERE badge_id = @badge AND user_id = @userid LIMIT 1");
}
}
IL_131:
if (Event.RemainingLength > 0)
{
goto IL_52;
}
ServerMessage Message = new ServerMessage(Outgoing.UpdateBadges); // Updated
Message.AppendUInt(Session.GetHabbo().Id);
Message.AppendInt32(Session.GetHabbo().GetBadgeComponent().VisibleBadges);
foreach (Badge current in Session.GetHabbo().GetBadgeComponent().GetBadges())
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
if (Session.GetHabbo().InRoom && Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null)
{
Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null);
}
else
{
Session.SendMessage(Message);
}
}
示例15: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
StringBuilder stringBuilder = new StringBuilder();
int num = Event.PopWiredInt32();
for (int i = 0; i < num; i++)
{
if (i > 0)
{
stringBuilder.Append(" OR ");
}
uint num2 = Event.PopWiredUInt();
@class.UsersWithRights.Remove(num2);
stringBuilder.Append(string.Concat(new object[]
{
"room_id = '",
@class.Id,
"' AND user_id = '",
num2,
"'"
}));
RoomUser class2 = @class.GetRoomUserByHabbo(num2);
if (class2 != null && !class2.IsBot)
{
ServerMessage Rights = new ServerMessage(Outgoing.QuitRights); // Updated
class2.GetClient().SendMessage(Rights);
class2.RemoveStatus("flatctrl");
class2.UpdateNeeded = true;
}
ServerMessage Message = new ServerMessage(Outgoing.RemovePowers); // Updated
Message.AppendUInt(@class.Id);
Message.AppendUInt(num2);
Session.SendMessage(Message);
}
using (DatabaseClient class3 = Essential.GetDatabase().GetClient())
{
class3.ExecuteQuery("DELETE FROM room_rights WHERE " + stringBuilder.ToString());
}
}
}