本文整理汇总了C#中GoldTree.Messages.ServerMessage.AppendUInt方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendUInt方法的具体用法?C# ServerMessage.AppendUInt怎么用?C# ServerMessage.AppendUInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendUInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
ServerMessage Message = new ServerMessage(465u);
Message.AppendUInt(@class.Id);
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(GoldTree.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);
}
}
示例2: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
Event.PopFixedString();
Event.PopWiredInt32();
RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
if (@class != null)
{
if (@class.Type == "private")
{
ServerMessage Message = new ServerMessage(286u);
Message.AppendBoolean(@class.IsPublicRoom);
Message.AppendUInt(num);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(453u);
Message2.AppendUInt(@class.Id);
Message2.AppendStringWithBreak(@class.CCTs);
Message2.AppendUInt(@class.Id);
Session.SendMessage(Message2);
}
}
}
示例3: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
Room room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (room != null)
{
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 client = GoldTree.GetDatabase().GetClient())
{
client.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO room_rights (room_id,user_id) VALUES (",
room.Id,
",",
num,
")"
}));
}
ServerMessage serverMessage = new ServerMessage(510u);
serverMessage.AppendUInt(room.Id);
serverMessage.AppendUInt(num);
serverMessage.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username);
Session.SendMessage(serverMessage);
roomUserByHabbo.AddStatus("flatctrl", "");
roomUserByHabbo.UpdateNeeded = true;
roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42u));
}
}
}
示例4: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(651u);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(1);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Session.SendMessage(Message);
}
}
示例5: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(506u);
Message.AppendInt32(5);
for (uint num = 5u; num >= 1u; num -= 1u)
{
Message.AppendUInt(num);
if (num <= 1u)
{
Message.AppendInt32(0);
}
else
{
if (num == 2u)
{
Message.AppendInt32(4);
}
else
{
if (num == 3u)
{
Message.AppendInt32(40);
}
else
{
if (num == 4u)
{
Message.AppendInt32(200);
}
else
{
if (num >= 5u)
{
Message.AppendInt32(2000);
}
}
}
}
}
List<EcotronReward> list = GoldTree.GetGame().GetCatalog().method_16(num);
Message.AppendInt32(list.Count);
foreach (EcotronReward current in list)
{
Message.AppendStringWithBreak(current.method_0().Type.ToString().ToLower());
Message.AppendUInt(current.uint_1);
}
}
Session.SendMessage(Message);
}
示例6: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Room @class = GoldTree.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().method_22().Int32_1);
using (TimedLock.Lock(class2.GetClient().GetHabbo().method_22().List_0))
{
foreach (Badge current in class2.GetClient().GetHabbo().method_22().List_0)
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
}
Session.SendMessage(Message);
}
}
}
}
示例7: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
{
ServerMessage Message = new ServerMessage(33u);
Message.AppendInt32(-9001);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(459u);
Message2.AppendUInt(num);
Message2.AppendBoolean(true);
Session.SendMessage(Message2);
Session.GetHabbo().list_1.Add(num);
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
class2.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO user_favorites (user_id,room_id) VALUES ('",
Session.GetHabbo().Id,
"','",
num,
"')"
}));
}
}
}
示例8: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = GoldTree.FilterString(Event.PopFixedString());
if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
{
if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
{
ServerMessage Message = new ServerMessage(134u);
Message.AppendUInt(0u);
Message.AppendString(Session.GetHabbo().Username + ": " + text);
GoldTree.GetGame().GetClientManager().method_17(Session, Message);
}
else
{
if (num == 0u)
{
ServerMessage Message2 = new ServerMessage(261u);
Message2.AppendInt32(4);
Message2.AppendUInt(0u);
Session.SendMessage(Message2);
}
else
{
if (Session != null && Session.GetHabbo() != null)
{
Session.GetHabbo().GetMessenger().method_18(num, text);
}
}
}
}
}
示例9: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
{
if (UserHasRights && Session != null)
{
Item.method_9();
ServerMessage Message = new ServerMessage(652u);
Message.AppendInt32(0);
Message.AppendInt32(5);
if (Item.string_5.Length > 0)
{
Message.AppendString(Item.string_5);
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(Item.GetBaseItem().Sprite);
Message.AppendUInt(Item.uint_0);
Message.AppendStringWithBreak("");
Message.AppendString("J");
if (Item.string_3.Length > 0)
{
Message.AppendString(Item.string_3);
}
else
{
Message.AppendString("HHH");
}
Session.SendMessage(Message);
}
}
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:31,代码来源:InteractorWiredConditionFurniStatesAndPositionsMatch.cs
示例10: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(650u);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendStringWithBreak("");
Message.AppendString("I");
if (RoomItem_0.string_3.Length > 0)
{
Message.AppendString(RoomItem_0.string_3);
}
else
{
Message.AppendString("RB");
}
Message.AppendStringWithBreak("HRAH");
Session.SendMessage(Message);
RoomItem_0.ReqUpdate(1);
}
}
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && Session.GetHabbo().int_21 > 0)
{
RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
if (class2 != null && class2.GetClient().GetHabbo().Id != Session.GetHabbo().Id && !class2.IsBot)
{
Session.GetHabbo().int_21--;
Session.GetHabbo().RespectGiven++;
class2.GetClient().GetHabbo().Respect++;
using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
{
class3.ExecuteQuery("UPDATE user_stats SET Respect = respect + 1 WHERE Id = '" + class2.GetClient().GetHabbo().Id + "' LIMIT 1");
class3.ExecuteQuery("UPDATE user_stats SET RespectGiven = RespectGiven + 1 WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
class3.ExecuteQuery("UPDATE user_stats SET dailyrespectpoints = dailyrespectpoints - 1 WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
}
ServerMessage Message = new ServerMessage(440u);
Message.AppendUInt(class2.GetClient().GetHabbo().Id);
Message.AppendInt32(class2.GetClient().GetHabbo().Respect);
@class.SendMessage(Message, null);
Session.GetHabbo().CheckRespectGivedAchievements();
class2.GetClient().GetHabbo().CheckRespectReceivedAchievements();
if (Session.GetHabbo().CurrentQuestId == 5u)
{
GoldTree.GetGame().GetQuestManager().ProgressUserQuest(5u, Session);
}
}
}
}
示例12: method_10
public ServerMessage method_10(string string_0)
{
DataTable dataTable = null;
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.AddParamWithValue("query", string_0);
dataTable = @class.ReadDataTable("SELECT Id,title FROM help_topics WHERE title LIKE @query OR body LIKE @query LIMIT 25");
}
ServerMessage Message = new ServerMessage(521u);
ServerMessage result;
if (dataTable == null)
{
Message.AppendBoolean(false);
result = Message;
}
else
{
Message.AppendInt32(dataTable.Rows.Count);
foreach (DataRow dataRow in dataTable.Rows)
{
Message.AppendUInt((uint)dataRow["Id"]);
Message.AppendStringWithBreak((string)dataRow["title"]);
}
result = Message;
}
return result;
}
示例13: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Session.GetHabbo().method_22().method_5();
using (DatabaseClient @class = GoldTree.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().method_22().method_1(text) || num < 1 || num > 5)
{
return;
}
if (Session.GetHabbo().CurrentQuestId == 16u)
{
GoldTree.GetGame().GetQuestManager().ProgressUserQuest(16u, Session);
}
Session.GetHabbo().method_22().method_0(text).Slot = num;
using (DatabaseClient @class = GoldTree.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().method_22().Int32_1);
foreach (Badge current in Session.GetHabbo().method_22().List_0)
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
if (Session.GetHabbo().InRoom && GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null)
{
GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null);
}
else
{
Session.SendMessage(Message);
}
}
示例14: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.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)
{
class2.GetClient().SendMessage(new ServerMessage(43u));
class2.method_12("flatctrl");
class2.UpdateNeeded = true;
}
ServerMessage Message = new ServerMessage(511u);
Message.AppendUInt(@class.Id);
Message.AppendUInt(num2);
Session.SendMessage(Message);
}
using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
{
class3.ExecuteQuery("DELETE FROM room_rights WHERE " + stringBuilder.ToString());
}
}
}
示例15: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(323u);
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);
}