本文整理汇总了C#中GoldTree.Messages.ServerMessage.AppendInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendInt32方法的具体用法?C# ServerMessage.AppendInt32怎么用?C# ServerMessage.AppendInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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
示例2: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
DataTable dataTable_ = Session.GetHabbo().dataTable_0;
if (dataTable_ != null)
{
ServerMessage Message = new ServerMessage(915u);
Message.AppendInt32(dataTable_.Rows.Count);
foreach (DataRow dataRow in dataTable_.Rows)
{
GroupsManager @class = Groups.smethod_2((int)dataRow["groupid"]);
Message.AppendInt32(@class.int_0);
Message.AppendStringWithBreak(@class.string_0);
Message.AppendStringWithBreak(@class.string_2);
if (Session.GetHabbo().int_0 == @class.int_0) // is favorite group?
{
Message.AppendBoolean(true);
}
else
{
Message.AppendBoolean(false);
}
}
Session.SendMessage(Message);
}
}
示例3: 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);
}
}
}
}
示例4: 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);
}
}
示例5: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int num = Event.PopWiredInt32();
ServerMessage Message = new ServerMessage(300u);
Message.AppendInt32(num);
if (num > 0)
{
for (int i = 0; i < num; i++)
{
int num2 = Event.PopWiredInt32();
if (num2 > 0)
{
/*Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(num2);
Message.AppendInt32(@class.Id);
Message.AppendStringWithBreak(@class.Name);
Message.AppendStringWithBreak(@class.Track);
Message.AppendInt32(@class.Length);
Message.AppendStringWithBreak(@class.Author);*/
Message.AppendInt32(SongManager.GetSong(num2).Id);
Message.AppendStringWithBreak(SongManager.GetSong(num2).Name);
Message.AppendStringWithBreak(SongManager.GetSong(num2).Track);
Message.AppendInt32(SongManager.GetSong(num2).Length);
Message.AppendStringWithBreak(SongManager.GetSong(num2).Author);
}
}
}
Session.SendMessage(Message);
}
示例6: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
try
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true) && @class.class67_0 != null)
{
ServerMessage Message = new ServerMessage(365u);
Message.AppendInt32(@class.class67_0.Presets.Count);
Message.AppendInt32(@class.class67_0.CurrentPreset);
int num = 0;
foreach (MoodlightPreset current in @class.class67_0.Presets)
{
num++;
Message.AppendInt32(num);
Message.AppendInt32(int.Parse(GoldTree.smethod_4(current.BackgroundOnly)) + 1);
Message.AppendStringWithBreak(current.ColorCode);
Message.AppendInt32(current.ColorIntensity);
}
Session.SendMessage(Message);
}
}
catch
{
}
}
示例7: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (room != null)
{
RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (roomUserByHabbo != null)
{
roomUserByHabbo.Unidle();
int num = Event.PopWiredInt32();
if (num < 0 || num > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && num > 1))
{
num = 0;
}
if (num > 0 && roomUserByHabbo.CarryItemID > 0)
{
roomUserByHabbo.CarryItem(0);
}
roomUserByHabbo.DanceId = num;
ServerMessage serverMessage = new ServerMessage(480u);
serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
serverMessage.AppendInt32(num);
room.SendMessage(serverMessage, null);
if (Session.GetHabbo().CurrentQuestId > 0 && GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
{
GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
}
}
}
}
示例8: 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);
}
}
示例9: 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);
}
}
示例10: SerializeSongInventory
public static ServerMessage SerializeSongInventory(Hashtable songs)
{
ServerMessage message = new ServerMessage(258u);
message.AppendInt32(songs.Count);
foreach (UserItem item in songs.Values)
{
int i = Convert.ToInt32(item.string_0);
message.AppendInt32((int)item.uint_0);
message.AppendInt32(i);
}
return message;
}
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(950u);
int StreamCount = 0;
foreach (DataRow dRow in Session.GetHabbo().Class12_0.DataTable_12.Rows)
{
StreamCount = StreamCount + 1;
}
DataTable dataTable_ = Session.GetHabbo().Class12_0.DataTable_12;
foreach (DataRow dataRow in dataTable_.Rows)
{
int type = (int)dataRow["type"];
if (type == 1)
{
DataRow[] DataRow_ = Session.GetHabbo().Class12_0.DataTable_8.Select("id = " + (uint)dataRow["userid"]);
uint userid = (uint)dataRow["userid"];
string username = (string)DataRow_[0]["username"];
string gender = (string)dataRow["gender"].ToString().ToLower();
string look = (string)dataRow["look"];
int time = (int)((GoldTree.GetUnixTimestamp() - (double)dataRow["time"]) / 60);
string data = (string)dataRow["data"];
Message.AppendInt32(StreamCount);
Message.AppendUInt(1u);
Message.AppendInt32(type);
Message.AppendStringWithBreak(userid.ToString());
Message.AppendStringWithBreak(username);
Message.AppendStringWithBreak(gender);
Message.AppendStringWithBreak("http://127.0.0.1/retro/r63/c_images/friendstream/index.gif?figure=" + look + ".gif");
Message.AppendInt32WithBreak(time);
Message.AppendInt32WithBreak(type + 1);
uint RoomID;
RoomData RoomData;
if (uint.TryParse(data, out RoomID))
RoomData = GoldTree.GetGame().GetRoomManager().method_12(RoomID);
else
RoomData = GoldTree.GetGame().GetRoomManager().method_12(0);
if (RoomData != null)
{
Message.AppendStringWithBreak(RoomData.Id.ToString()); //data
Message.AppendStringWithBreak(RoomData.Name); //extra data
}
else
{
Message.AppendStringWithBreak("");
Message.AppendStringWithBreak("Room deleted");
}
}
}
Session.SendMessage(Message);
}
示例12: 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);
}
示例13: Compose
public static ServerMessage Compose(int PlaylistCapacity, List<SongInstance> Playlist)
{
ServerMessage message = new ServerMessage(334u);
message.AppendInt32(PlaylistCapacity);
message.AppendInt32(Playlist.Count);
foreach (SongInstance instance in Playlist)
{
message.AppendInt32(instance.DiskItem.itemID);
message.AppendInt32(instance.SongData.Id);
}
return message;
}
示例14: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().uint_2 > 0u)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().uint_2);
if (@class != null && Session.GetHabbo().int_0 > 0)
{
GroupsManager class2 = Groups.smethod_2(Session.GetHabbo().int_0);
if (class2 != null && [email protected]_17.Contains(class2))
{
@class.list_17.Add(class2);
ServerMessage Message = new ServerMessage(309u);
Message.AppendInt32(@class.list_17.Count);
foreach (GroupsManager current in @class.list_17)
{
Message.AppendInt32(current.int_0);
Message.AppendStringWithBreak(current.string_2);
}
@class.SendMessage(Message, null);
}
else
{
foreach (GroupsManager current2 in @class.list_17)
{
if (current2 == class2 && current2.string_2 != class2.string_2)
{
ServerMessage Message = new ServerMessage(309u);
Message.AppendInt32(@class.list_17.Count);
foreach (GroupsManager current in @class.list_17)
{
Message.AppendInt32(current.int_0);
Message.AppendStringWithBreak(current.string_2);
}
@class.SendMessage(Message, null);
}
}
}
}
if (@class != null && @class.list_17.Count > 0)
{
ServerMessage Message = new ServerMessage(309u);
Message.AppendInt32(@class.list_17.Count);
foreach (GroupsManager current in @class.list_17)
{
Message.AppendInt32(current.int_0);
Message.AppendStringWithBreak(current.string_2);
}
Session.SendMessage(Message);
}
}
}
示例15: 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);
}
}