本文整理汇总了C#中Essential.Messages.ServerMessage.AppendInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendInt32方法的具体用法?C# ServerMessage.AppendInt32怎么用?C# ServerMessage.AppendInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Essential.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
DataTable dataTable_ = Session.GetHabbo().dataTable_0;
if (dataTable_ != null)
{
ServerMessage Message = new ServerMessage(Outgoing.UserGuilds);
Message.AppendInt32(dataTable_.Rows.Count);
foreach (DataRow dataRow in dataTable_.Rows)
{
GroupsManager @class = Groups.GetGroupById((int)dataRow["groupid"]);
Message.AppendInt32(@class.Id);
Message.AppendStringWithBreak(@class.Name);
Message.AppendStringWithBreak(@class.Badge);
if (Session.GetHabbo().FavouriteGroup == @class.Id) // is favorite group?
{
Message.AppendBoolean(true);
}
else
{
Message.AppendBoolean(false);
}
}
Session.SendMessage(Message);
}
}
示例2: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(Outgoing.PetRace); //Rootkit
string PetType = Event.PopFixedString();
Message.AppendStringWithBreak(PetType);
int petid = int.Parse(PetType.Substring(PetType.IndexOf('t'), PetType.Length - PetType.IndexOf('t')).Replace("t",""));
if (PetRace.RaceGotRaces(petid))
{
List<PetRace> Races = PetRace.GetRacesForRaceId(petid);
Message.AppendInt32(Races.Count);
foreach (PetRace r in Races)
{
Message.AppendInt32(petid);
Message.AppendInt32(r.Color1);
Message.AppendInt32(r.Color2);
Message.AppendBoolean(r.Has1Color);
Message.AppendBoolean(r.Has2Color);
}
}
else
{
Message.AppendInt32(0);
}
Session.SendMessage(Message);
}
示例3: 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);
}
}
}
}
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(Outgoing.CanCreateRoom); // Updated
Message.AppendInt32(0);
Message.AppendInt32(99999);
Session.SendMessage(Message);
}
示例5: SerializeTool
public ServerMessage SerializeTool()
{
ServerMessage Message = new ServerMessage(Outgoing.OpenModTools); // Updated
Message.AppendInt32(0);
Message.AppendInt32(this.UserMessagePresets.Count);
using (TimedLock.Lock(this.UserMessagePresets))
{
foreach (string current in this.UserMessagePresets)
{
Message.AppendStringWithBreak(current);
}
}
Message.AppendInt32(0);
Message.AppendBoolean(true); // ticket_queue fuse
Message.AppendBoolean(true); // chatlog fuse
Message.AppendBoolean(true); // message / caution fuse
Message.AppendBoolean(true); // kick fuse
Message.AppendBoolean(true); // band fuse
Message.AppendBoolean(true); // broadcastshit fuse
Message.AppendBoolean(true); // other shit fuse
Message.AppendInt32(0);
Message.AppendInt32(this.RoomMessagePresets.Count);
using (TimedLock.Lock(this.RoomMessagePresets))
{
foreach (string current in this.RoomMessagePresets)
{
Message.AppendStringWithBreak(current);
}
}
return Message;
}
示例6: 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) && @class.MoodlightData != null)
{
ServerMessage Message = new ServerMessage(Outgoing.DimmerData); // Updated
Message.AppendInt32(@class.MoodlightData.Presets.Count);
Message.AppendInt32(@class.MoodlightData.CurrentPreset);
int num = 0;
foreach (MoodlightPreset current in @class.MoodlightData.Presets)
{
num++;
Message.AppendInt32(num);
Message.AppendInt32(int.Parse(Essential.BooleanToString(current.BackgroundOnly)) + 1);
Message.AppendStringWithBreak(current.ColorCode);
Message.AppendInt32(current.ColorIntensity);
}
Session.SendMessage(Message);
}
}
catch
{
}
}
示例7: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int num = Event.PopWiredInt32();
ServerMessage Message = new ServerMessage(Outgoing.SongInfo); // Updated
Message.AppendInt32(num);
if (num > 0)
{
for (int i = 0; i < num; i++)
{
int num2 = Event.PopWiredInt32();
if (num2 > 0)
{
Message.AppendInt32(SongManager.GetSong(num2).Id);
Message.AppendString(SongManager.GetSong(num2).Name);
Message.AppendString(SongManager.GetSong(num2).Track);
Message.AppendInt32(SongManager.GetSong(num2).Length);
Message.AppendString(SongManager.GetSong(num2).Author);
}
else
{
// Ei lähetetä osittaista pakettia!!
return;
}
}
}
Session.SendMessage(Message);
}
示例8: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room room = Essential.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(Outgoing.Dance);
serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
serverMessage.AppendInt32(num);
room.SendMessage(serverMessage, null);
if (Session.GetHabbo().CurrentQuestId > 0 && Essential.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
{
Essential.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
}
}
}
}
示例9: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(Outgoing.Recycle); // Updated
Message.AppendInt32(1);
Message.AppendInt32(0);
Session.SendMessage(Message);
}
示例10: 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);
}
示例11: Serialize
internal void Serialize(ServerMessage Message)
{
try
{
Message.AppendInt32(this.Id);
Message.AppendString((this.itemType != PublicItemType.PUBLIC_FLAT) ? this.Caption : string.Empty);
Message.AppendString(this.Description);
Message.AppendInt32(this.Type);
Message.AppendString((this.itemType == PublicItemType.PUBLIC_FLAT) ? this.Caption : string.Empty);
Message.AppendString(this.Image);
Message.AppendInt32((this.ParentId > 0) ? this.ParentId : 0);
Message.AppendInt32((this.RoomInfo != null) ? this.RoomInfo.UsersNow : 0);
Message.AppendInt32((this.itemType == PublicItemType.NONE) ? 0 : ((this.itemType == PublicItemType.TAG) ? 1 : ((this.itemType == PublicItemType.FLAT) ? 2 : ((this.itemType == PublicItemType.PUBLIC_FLAT) ? 2 : ((this.itemType == PublicItemType.CATEGORY) ? 4 : 0)))));
if (this.itemType == PublicItemType.TAG)
{
Message.AppendString(this.TagsToSearch);
}
else if (this.itemType == PublicItemType.CATEGORY)
{
Message.AppendBoolean(false);
}
else if (this.itemType == PublicItemType.FLAT)
{
this.RoomInfo.Serialize(Message, false, false);
}
else if (this.itemType == PublicItemType.PUBLIC_FLAT)
{
this.RoomInfo.Serialize(Message, false, false);
}
}
catch (Exception exception)
{
Console.WriteLine("Exception on publicitems composing: " + exception.ToString());
}
}
示例12: Handle
public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
{
int num = Event.PopWiredInt32();
int num2 = Event.PopWiredInt32();
int num3 = Event.PopWiredInt32();
if ((num2 == 1) && (num3 == 0))
{
Room room = Essential.GetGame().GetRoomManager().GetRoom((uint)num);
if ((room != null) && (room.GetRoomUserByHabbo(Session.GetHabbo().Id) == null))
{
}
}
else if ((num2 != 0) || (num3 != 0))
{
RoomData data = Essential.GetGame().GetRoomManager().method_12((uint)num);
if (data != null)
{
ServerMessage message = new ServerMessage(Outgoing.RoomData);
message.AppendBoolean(false);
data.Serialize(message, false, false);
message.AppendBoolean(true);
message.AppendBoolean(false);
message.AppendBoolean(true);
message.AppendBoolean(true);
message.AppendInt32(0);
message.AppendInt32(0);
message.AppendInt32(0);
message.AppendBoolean(true);
Session.SendMessage(message);
//Console.WriteLine("aa");
}
}
}
示例13: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().InRoom)
{
int num = Event.PopWiredInt32();
if (num >= 3)
{
for (int i = 0; i < num; i++)
{
UserItem @class = Session.GetHabbo().GetInventoryComponent().GetItemById(Event.PopWiredUInt());
if (@class == null || [email protected]().AllowRecycle)
{
return;
}
Session.GetHabbo().GetInventoryComponent().method_12(@class.uint_0, 0u, false);
}
uint num2 = Essential.GetGame().GetCatalog().GetNextId();
EcotronReward class2 = Essential.GetGame().GetCatalog().GetEcotronReward();
using (DatabaseClient class3 = Essential.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO items (Id,user_id,base_item,wall_pos) VALUES ('",
num2,
"','",
Session.GetHabbo().Id,
"','1478','')"
}));
class3.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO items_extra_data (item_id,extra_data) VALUES ('",
num2,
"','",
DateTime.Now.ToLongDateString(),
"')"
}));
class3.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO user_presents (item_id,base_id,amount,extra_data) VALUES ('",
num2,
"','",
class2.uint_2,
"','1','')"
}));
}
Session.GetHabbo().GetInventoryComponent().method_9(true);
ServerMessage Response = new ServerMessage(Outgoing.SendPurchaseAlert);
Response.AppendInt32(1);
Response.AppendInt32(1);
Response.AppendInt32(1);
Response.AppendInt32(class2.GetBaseItem().Sprite);
Session.SendMessage(Response);
ServerMessage Response2 = new ServerMessage(Outgoing.RecycleState);
Response2.AppendInt32(1);
Response2.AppendInt32(class2.GetBaseItem().Sprite);
Session.SendMessage(Response2);
}
}
}
示例14: 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);
}
示例15: Serialize
public void Serialize(ServerMessage Message)
{
Message.AppendInt32(CreatorId);
Message.AppendString(CreatorName);
Message.AppendString(CreatorLook);
Message.AppendInt32(GuideId);
Message.AppendString(GuideName);
Message.AppendString(GuideLook);
}