本文整理汇总了C#中Essential.Messages.ServerMessage类的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage类的具体用法?C# ServerMessage怎么用?C# ServerMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServerMessage类属于Essential.Messages命名空间,在下文中一共展示了ServerMessage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
{
ServerMessage Message5_0 = new ServerMessage(Outgoing.Game2FullGameStatusMessageEvent);//Game2FullGameStatusMessageEvent
Message5_0.AppendInt32(1);
Message5_0.AppendInt32(1);
Message5_0.AppendInt32(1);
//SOMETHING
Message5_0.AppendInt32(1);
Message5_0.AppendInt32(1);
Message5_0.AppendInt32(1);
Message5_0.AppendInt32(1);
Message5_0.AppendInt32(3);
Habbo habbo = Session.GetHabbo();
Message5_0.AppendInt32(habbo.SnowUserId);
Message5_0.AppendInt32(habbo.SnowX);
Message5_0.AppendInt32(habbo.SnowY);
Message5_0.AppendInt32((int)(habbo.SnowX / 0xc80));
Message5_0.AppendInt32((int)(habbo.SnowY / 0xc80));
Message5_0.AppendInt32(habbo.SnowRot);
Message5_0.AppendInt32(0);
Message5_0.AppendInt32(0);
//SOMETHING2
Message5_0.AppendInt32(0);
Message5_0.AppendInt32(0);
Message5_0.AppendInt32(0);
Session.GetHabbo().SnowWar.SendToStorm(Message5_0);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:27,代码来源:RequestFullGameStatus.cs
示例2: 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);
}
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:34,代码来源:SendMsgMessageEvent.cs
示例3: 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);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:Trade.cs
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.method_26(Session))
{
string string_ = Event.PopFixedString();
bool canletin = Event.PopWiredBoolean();
GameClient class2 = Essential.GetGame().GetClientManager().GetClientByHabbo(string_);
if (class2 != null && class2.GetHabbo() != null && class2.GetHabbo().bool_6 && class2.GetHabbo().uint_2 == Session.GetHabbo().CurrentRoomId)
{
if (canletin)
{
class2.GetHabbo().bool_5 = true;
ServerMessage Message4 = new ServerMessage(Outgoing.FlatAccessible); // Updated
Message4.AppendString("");
class2.SendMessage(Message4);
}
else
{
ServerMessage Message5 = new ServerMessage(Outgoing.DoorBellNoPerson); // Updated
Message5.AppendString("");
class2.SendMessage(Message5);
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:LetUserInMessageEvent.cs
示例5: 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);
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:GetFlatControlsMessageEvent.cs
示例6: 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);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:31,代码来源:GetSongInfoMessageEvent.cs
示例7: 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,
"')"
}));
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:27,代码来源:AddFavouriteRoomMessageEvent.cs
示例8: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage message = new ServerMessage(Outgoing.SendGuildParts); //Rootkit
message.AppendInt32(10);
message.AppendInt32((int)(Session.GetHabbo().OwnedRooms.Count - this.GetMyRoomsGuilds(Session)));
foreach (RoomData data in Session.GetHabbo().OwnedRooms)
{
if (data.GuildId == 0)
{
message.AppendInt32(data.Id);
message.AppendString(data.Name);
message.AppendBoolean(false);
}
}
message.AppendInt32(5);
message.AppendInt32(10);
message.AppendInt32(3);
message.AppendInt32(4);
message.AppendInt32(0x19);
message.AppendInt32(0x11);
message.AppendInt32(5);
message.AppendInt32(0x19);
message.AppendInt32(0x11);
message.AppendInt32(3);
message.AppendInt32(0x1d);
message.AppendInt32(11);
message.AppendInt32(4);
message.AppendInt32(0);
message.AppendInt32(0);
message.AppendInt32(0);
Session.SendMessage(message);
Session.SendMessage(Essential.GetGame().GetCatalog().groupsDataMessage);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:33,代码来源:OpenGuildPageMessageEvent.cs
示例9: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage message = new ServerMessage(Outgoing.WiredFurniTrigger);
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.AppendInt32(RoomItem_0.uint_0);
if (RoomItem_0.string_3.Length > 0)
{
message.AppendString(RoomItem_0.string_3);
}
else
{
message.AppendString("I");
}
message.AppendInt32(1);
message.AppendInt32(1);
message.AppendInt32(1);
message.AppendInt32(3);
message.AppendInt32(0);
message.AppendInt32(0);
Session.SendMessage(message);
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:30,代码来源:InteractorWiredAtTime.cs
示例10: 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;
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:31,代码来源:ModerationTool.cs
示例11: ServerMessage
/* public ServerMessage GetEntries(DataTable EntriesTable, GameClient Session)
{
gc = Session;
List<StreamEntry> Entries = new List<StreamEntry>();
ServerMessage Message = new ServerMessage(Outgoing.EventStream);
Dictionary<uint, int> ContainsID = new Dictionary<uint, int>();
uint virtualidcounter = 0;
foreach (DataRow Entry in EntriesTable.Rows)
{
if (!ContainsID.ContainsKey((uint)Entry["id"]))
{
virtualidcounter = virtualidcounter + 1;
DataRow UserRow = GetUserRow(Entry["userid"].ToString());
Entries.Add(new StreamEntry((int)Entry["id"], (int)virtualidcounter, Entry["userid"].ToString(), (string)UserRow["username"], UserRow["gender"].ToString().ToLower(), (string)UserRow["look"], GetMinutes((double)Entry["time"]), Convert.ToInt32(Entry["data_extra"].ToString()), GetEntryLiked((int)Entry["id"], false), (string)Entry["data"]));
ContainsID.Add((uint)Entry["id"], 1);
}
}
Message.AppendInt32(Entries.Count);
this.ESEntry = Entries;
return AppendEntryOnServerMessage(Message, Entries);
}*/
public ServerMessage GetEntries(DataTable EntriesTable, GameClient Session)
{
gc = Session;
List<StreamEntry> Entries = new List<StreamEntry>();
ServerMessage Message = new ServerMessage(Outgoing.EventStream);
Dictionary<int,int> ids = new Dictionary<int,int>();
int virtualIdCounter = 0;
foreach (DataRow Entry in EntriesTable.Rows)
{
try
{
int id = int.Parse(Entry["id"].ToString());
if (!ids.ContainsKey(id))
{
virtualIdCounter++;
DataRow userRow = GetUserRow(Entry["userid"].ToString());
Entries.Add(new StreamEntry(id, virtualIdCounter, Entry["userid"].ToString(), (string)userRow["username"], userRow["gender"].ToString().ToLower(), (string)userRow["look"], GetMinutes((double)Entry["time"]), Convert.ToInt32(Entry["data_extra"].ToString()), GetEntryCanLike(id, false), (string)Entry["data"]));
ids.Add(id, 1);
}
}
catch (Exception ex) { Console.WriteLine(ex.ToString()); }
}
Message.AppendInt32(Entries.Count);
this.ESEntry = Entries;
return AppendEntryOnServerMessage(Message, Entries);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:48,代码来源:Stream.cs
示例12: 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);
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:SendRoomInviteMessageEvent.cs
示例13: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room Room = Session.GetHabbo().CurrentRoom;
if (Room != null)
{
string string_ = Event.PopFixedString();
RoomUser @class = Room.method_56(string_);
if (@class != null)
{
uint uint_ = @class.GetClient().GetHabbo().Id;
if (!Session.GetHabbo().list_2.Contains(uint_))
{
Session.GetHabbo().list_2.Add(uint_);
using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
{
class2.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO user_ignores(user_id, ignore_id) VALUES (",
Session.GetHabbo().Id,
", ",
uint_,
");"
}));
}
ServerMessage Message = new ServerMessage(Outgoing.UpdateIgnoreStatus); // Updated
Message.AppendInt32(1);
Message.AppendString(string_);
Session.SendMessage(Message);
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:32,代码来源:IgnoreUserMessageEvent.cs
示例14: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(Outgoing.Recycle); // Updated
Message.AppendInt32(1);
Message.AppendInt32(0);
Session.SendMessage(Message);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:GetRecyclerStatusMessageEvent.cs
示例15: 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);
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:LoadUserGroupsEvent.cs
示例16: 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);
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:InteractorWiredConditionTimeMoreOrLess.cs
示例17: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(Outgoing.CanCreateRoom); // Updated
Message.AppendInt32(0);
Message.AppendInt32(99999);
Session.SendMessage(Message);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:CanCreateRoomMessageEvent.cs
示例18: 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);
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:GetSellablePetBreedsEvent.cs
示例19: 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
{
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:RoomDimmerGetPresetsMessageEvent.cs
示例20: 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);
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:32,代码来源:WiredInteractor.cs
注:本文中的Essential.Messages.ServerMessage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论