本文整理匯總了C#中Phoenix.Messages.ServerMessage.AppendUInt方法的典型用法代碼示例。如果您正苦於以下問題:C# ServerMessage.AppendUInt方法的具體用法?C# ServerMessage.AppendUInt怎麽用?C# ServerMessage.AppendUInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Phoenix.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendUInt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint Id = Event.PopWiredUInt();
Event.PopFixedString();
Event.PopWiredInt32();
RoomData Data = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(Id);
if (Data != null)
{
if (Data.Type == "private")
{
ServerMessage Message = new ServerMessage(286);
Message.AppendBoolean(Data.IsPublicRoom);
Message.AppendUInt(Id);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(453);
Message2.AppendUInt(Data.Id);
Message2.AppendStringWithBreak(Data.CCTs);
Message2.AppendUInt(Data.Id);
Session.SendMessage(Message2);
}
}
}
示例2: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(num);
if (room != null && room.CheckRights(Session, true) && roomUserByHabbo != null && !roomUserByHabbo.IsBot && !room.UsersWithRights.Contains(num))
{
room.UsersWithRights.Add(num);
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO room_rights (room_id,user_id) VALUES ('",
room.RoomId,
"','",
num,
"')"
}));
}
ServerMessage Message = new ServerMessage(510);
Message.AppendUInt(room.RoomId);
Message.AppendUInt(num);
Message.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username);
Session.SendMessage(Message);
roomUserByHabbo.AddStatus("flatctrl", "");
roomUserByHabbo.UpdateNeeded = true;
roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42));
}
}
示例3: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
ServerMessage Message = new ServerMessage(465u);
Message.AppendUInt(@class.RoomId);
Message.AppendStringWithBreak(@class.Name);
Message.AppendStringWithBreak(@class.Description);
Message.AppendInt32(@class.State);
Message.AppendInt32(@class.Category);
Message.AppendInt32(@class.UsersMax);
Message.AppendInt32(100);
Message.AppendInt32(@class.Tags.Count);
foreach (string current in @class.Tags)
{
Message.AppendStringWithBreak(current);
}
Message.AppendInt32(@class.UsersWithRights.Count);
foreach (uint current2 in @class.UsersWithRights)
{
Message.AppendUInt(current2);
Message.AppendStringWithBreak(PhoenixEnvironment.GetGame().GetClientManager().GetNameById(current2));
}
Message.AppendInt32(@class.UsersWithRights.Count);
Message.AppendBoolean(@class.AllowPet);
Message.AppendBoolean(@class.AllowPetsEating);
Message.AppendBoolean(@class.AllowWalkthrough);
Message.AppendBoolean(@class.Hidewall);
Message.AppendInt32(@class.Wallthick);
Message.AppendInt32(@class.Floorthick);
Session.SendMessage(Message);
}
}
示例4: Trade
public Trade(uint mUserOneId, uint mUserTwoId, uint mRoomId)
{
this.oneId = mUserOneId;
this.twoId = mUserTwoId;
this.Users = new TradeUser[2];
this.Users[0] = new TradeUser(mUserOneId, mRoomId);
this.Users[1] = new TradeUser(mUserTwoId, mRoomId);
this.TradeStage = 1;
this.RoomId = mRoomId;
foreach (TradeUser User in Users)
{
if (!User.GetRoomUser().Statusses.ContainsKey("trd"))
{
User.GetRoomUser().AddStatus("trd", "");
User.GetRoomUser().UpdateNeeded = true;
}
}
ServerMessage Message = new ServerMessage(104);
Message.AppendUInt(mUserOneId);
Message.AppendBoolean(true);
Message.AppendUInt(mUserTwoId);
Message.AppendBoolean(true);
this.SendMessageToUsers(Message);
}
示例5: parse
public void parse(GameClient Session, ClientMessage Request)
{
ServerMessage message = new ServerMessage(267);
message.AppendBoolean(Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"));
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.AddParamWithValue("userid", Session.GetHabbo().Id);
DataTable Row = adapter.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
if (Row == null)
{
message.AppendInt32(0);
}
else
{
message.AppendInt32(Row.Rows.Count);
foreach (DataRow row in Row.Rows)
{
message.AppendUInt((uint)row["slot_id"]);
message.AppendStringWithBreak((string)row["look"]);
message.AppendStringWithBreak((string)row["gender"]);
}
}
}
Session.SendMessage(message);
}
else
{
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.AddParamWithValue("userid", Session.GetHabbo().Id);
DataTable Row = adapter.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
if (Row == null)
{
message.AppendInt32(0);
}
else
{
message.AppendInt32(Row.Rows.Count);
foreach (DataRow row in Row.Rows)
{
message.AppendUInt((uint)row["slot_id"]);
message.AppendStringWithBreak((string)row["look"]);
message.AppendStringWithBreak((string)row["gender"]);
}
}
}
Session.SendMessage(message);
}
}
示例6: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight)
{
ServerMessage Message = new ServerMessage(651);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(1);
Message.AppendUInt(Item.Id);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Session.SendMessage(Message);
}
}
示例7: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight)
{
ServerMessage Message = new ServerMessage(650);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendStringWithBreak("");
Message.AppendString("I");
if (Item.Extra2.Length > 0)
{
Message.AppendString(Item.Extra2);
}
else
{
Message.AppendString("RB");
}
Message.AppendStringWithBreak("HRAH");
Session.SendMessage(Message);
Item.ReqUpdate(1);
}
}
示例8: parse
public void parse(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
if (class2 != null && !class2.IsBot && class2.GetClient() != null)
{
ServerMessage Message = new ServerMessage(228u);
Message.AppendUInt(class2.GetClient().GetHabbo().Id);
Message.AppendInt32(class2.GetClient().GetHabbo().GetBadgeComponent().EquippedCount);
using (TimedLock.Lock(class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList))
{
foreach (Badge current in class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList)
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
}
Session.SendMessage(Message);
}
}
}
}
示例9: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
if (Session.GetHabbo().GetMessenger() != null)
{
if (num == 0 && Session.GetHabbo().HasRole("cmd_sa"))
{
ServerMessage Message = new ServerMessage(134);
Message.AppendUInt(0);
Message.AppendString(Session.GetHabbo().Username + ": " + text);
PhoenixEnvironment.GetGame().GetClientManager().SendStaffChat(Session, Message);
}
else
{
if (num == 0)
{
ServerMessage Message2 = new ServerMessage(261);
Message2.AppendInt32(4);
Message2.AppendUInt(0);
Session.SendMessage(Message2);
}
else
{
Session.GetHabbo().GetMessenger().method_18(num, text);
}
}
}
}
示例10: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight && Session != null)
{
Item.method_10();
ServerMessage Message = new ServerMessage(651);
Message.AppendInt32(0);
Message.AppendInt32(5);
if (Item.Extra1.Length > 0)
{
Message.AppendString(Item.Extra1);
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendStringWithBreak("");
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendStringWithBreak("");
Session.SendMessage(Message);
}
}
示例11: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room Room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (Room != null && Room.CheckRights(Session, true))
{
Event.PopWiredInt32();
Dictionary<int, int> Items = new Dictionary<int, int>();
int BackgroundImage = Event.PopWiredInt32();
int ForegroundImage = Event.PopWiredInt32();
int num3 = Event.PopWiredInt32();
for (int i = 0; i < num3; i++)
{
int num4 = Event.PopWiredInt32();
int num5 = Event.PopWiredInt32();
if (num4 < 0 || num4 > 10 || (num5 < 1 || num5 > 27) || Items.ContainsKey(num4))
{
return;
}
Items.Add(num4, num5);
}
if (BackgroundImage >= 1 && BackgroundImage <= 24 && (ForegroundImage >= 0 && ForegroundImage <= 11))
{
StringBuilder stringBuilder = new StringBuilder();
int num6 = 0;
foreach (KeyValuePair<int, int> Item in Items)
{
if (num6 > 0)
{
stringBuilder.Append("|");
}
stringBuilder.Append(Item.Key + "," + Item.Value);
num6++;
}
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery("UPDATE rooms SET icon_bg = '" + BackgroundImage + "', icon_fg = '" + ForegroundImage + "', icon_items = '" + stringBuilder.ToString() + "' WHERE Id = '" + Room.RoomId + "' LIMIT 1");
}
Room.myIcon = new RoomIcon(BackgroundImage, ForegroundImage, Items);
ServerMessage Message = new ServerMessage(457);
Message.AppendUInt(Room.RoomId);
Message.AppendBoolean(true);
Session.SendMessage(Message);
ServerMessage Message2 = new ServerMessage(456);
Message2.AppendUInt(Room.RoomId);
Session.SendMessage(Message2);
RoomData Data = Room.RoomData;
ServerMessage Message3 = new ServerMessage(454);
Message3.AppendBoolean(false);
Data.Serialize(Message3, false, false);
Session.SendMessage(Message3);
}
}
}
示例12: GiveBadge
public void GiveBadge(GameClient Session, string Badge, Boolean InDatabase)
{
this.GiveBadge(Badge, 0, InDatabase);
ServerMessage Message = new ServerMessage(832);
Message.AppendInt32(1);
Message.AppendInt32(4);
Message.AppendInt32(1);
Message.AppendUInt(PhoenixEnvironment.GetGame().GetAchievementManager().BadgeID(Badge));
Session.SendMessage(Message);
}
示例13: parse
public void parse(GameClient Session, ClientMessage Event)
{
Session.GetHabbo().GetBadgeComponent().ResetSlots();
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.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 == 16u)
{
PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(16u, Session);
}
Session.GetHabbo().GetBadgeComponent().GetBadge(text).Slot = num;
using (DatabaseClient @class = PhoenixEnvironment.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(228u);
Message.AppendUInt(Session.GetHabbo().Id);
Message.AppendInt32(Session.GetHabbo().GetBadgeComponent().EquippedCount);
foreach (Badge current in Session.GetHabbo().GetBadgeComponent().BadgeList)
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
if (Session.GetHabbo().InRoom && PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null)
{
PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null);
}
else
{
Session.SendMessage(Message);
}
}
示例14: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.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.RoomId,
"' AND user_id = '",
num2,
"'"
}));
RoomUser class2 = @class.GetRoomUserByHabbo(num2);
if (class2 != null && !class2.IsBot)
{
class2.GetClient().SendMessage(new ServerMessage(43u));
class2.RemoveStatus("flatctrl");
class2.UpdateNeeded = true;
}
ServerMessage Message = new ServerMessage(511u);
Message.AppendUInt(@class.RoomId);
Message.AppendUInt(num2);
Session.SendMessage(Message);
}
using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
{
class3.ExecuteQuery("DELETE FROM room_rights WHERE " + stringBuilder.ToString());
}
}
}
示例15: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(323);
Message.AppendUInt(Session.GetHabbo().CurrentRoomId);
Message.AppendInt32(1);
Message.AppendInt32(1);
Message.AppendInt32(1);
Message.AppendStringWithBreak("Watercolour");
Message.AppendStringWithBreak("Pendulum");
Message.AppendInt32(1);
Session.SendMessage(Message);
}