本文整理汇总了C#中Phoenix.HabboHotel.GameClients.GameClient.GetMessageHandler方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.GetMessageHandler方法的具体用法?C# GameClient.GetMessageHandler怎么用?C# GameClient.GetMessageHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phoenix.HabboHotel.GameClients.GameClient
的用法示例。
在下文中一共展示了GameClient.GetMessageHandler方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string string_ = Event.PopFixedString();
Event.PopWiredInt32();
if (PhoenixEnvironment.GetConfig().data["emu.messages.roommgr"] == "1")
{
Logging.WriteLine("[RoomMgr] Requesting Private Room [ID: " + num + "]");
}
Session.GetMessageHandler().PrepareRoomForUser(num, string_);
}
示例2: parse
public void parse(GameClient Session, ClientMessage Event)
{
Event.PopWiredInt32();
uint num = Event.PopWiredUInt();
Event.PopWiredInt32();
if (PhoenixEnvironment.GetConfig().data["emu.messages.roommgr"] == "1")
{
Logging.WriteLine("[RoomMgr] Requesting Public Room [ID: " + num + "]");
}
RoomData @class = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(num);
if (@class != null && !(@class.Type != "public"))
{
Session.GetMessageHandler().PrepareRoomForUser(num, "");
}
}
示例3: parse
public void parse(GameClient Session, ClientMessage Request)
{
string text = PhoenixEnvironment.FilterInjectionChars(Request.PopFixedString(), false, true);
if (text.Length < 3)
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("J");
Session.SendMessage(Message);
}
else
{
if (text.Length > 15)
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("K");
Session.SendMessage(Message);
}
else
{
if (text.Contains(" ") || !Session.GetMessageHandler().NameFree(text) || text != ChatCommandHandler.ApplyWordFilter(text))
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("QA");
Session.SendMessage(Message);
}
else
{
if (Request.Header == "GW")
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("H");
Message.AppendString(text);
Session.SendMessage(Message);
}
else
{
if (Request.Header == "GV")
{
ServerMessage Message2 = new ServerMessage(570u);
Message2.AppendString("H");
Session.SendMessage(Message2);
ServerMessage Message3 = new ServerMessage(572u);
Message3.AppendUInt(Session.GetHabbo().Id);
Message3.AppendString("H");
Message3.AppendString(text);
Session.SendMessage(Message3);
if (Session.GetHabbo().CurrentRoomId > 0u)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
ServerMessage Message4 = new ServerMessage(28u);
Message4.AppendInt32(1);
class2.Serialize(Message4);
@class.SendMessage(Message4, null);
}
Dictionary<Room, int> dictionary = PhoenixEnvironment.GetGame().GetRoomManager().method_22();
IEnumerable<Room> arg_204_0 = dictionary.Keys;
if (ChangeUserNameMessageEvent.func_0 == null)
{
ChangeUserNameMessageEvent.func_0 = new Func<Room, int>(ChangeUserNameMessageEvent.smethod_0);
}
IOrderedEnumerable<Room> orderedEnumerable = arg_204_0.OrderByDescending(ChangeUserNameMessageEvent.func_0);
foreach (Room current in orderedEnumerable)
{
if (current.Owner == Session.GetHabbo().Username)
{
current.Owner = text;
PhoenixEnvironment.GetGame().GetRoomManager().UnloadRoom(PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(current.RoomId));
}
}
using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new string[]
{
"UPDATE rooms SET owner = '",
text,
"' WHERE owner = '",
Session.GetHabbo().Username,
"'"
}));
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE users SET username = '",
text,
"' WHERE Id = '",
Session.GetHabbo().Id,
"' LIMIT 1"
}));
PhoenixEnvironment.GetGame().GetClientManager().RecordCmdLogs(Session, "flagme", "OldName: " + Session.GetHabbo().Username + " NewName: " + text);
Session.GetHabbo().Username = text;
Session.GetHabbo().UpdateRooms(class3);
foreach (RoomData current2 in Session.GetHabbo().UsersRooms)
{
current2.Owner = text;
}
}
PhoenixEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 9u, 1);
}
}
}
//.........这里部分代码省略.........
示例4: parse
public void parse(GameClient Session, ClientMessage Event)
{
Session.GetHabbo().LoadingRoom = Event.PopWiredUInt();
Session.GetMessageHandler().LoadRoomForUser();
}
示例5: parse
public void parse(GameClient Session, ClientMessage Event)
{
Session.GetMessageHandler().GetAdvertisement();
}
示例6: parse
public void parse(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().LoadingRoom > 0u && Session.GetHabbo().LoadingChecksPassed)
{
RoomData @class = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(Session.GetHabbo().LoadingRoom);
if (@class != null)
{
if (@class.Model == null)
{
Session.SendNotif("Error loading room, please try again soon! (Error Code: MdlData)");
Session.SendMessage(new ServerMessage(18u));
Session.GetMessageHandler().ClearRoomLoading();
}
else
{
Session.SendMessage(@class.Model.method_1());
Session.SendMessage(@class.Model.method_2());
Room class2 = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().LoadingRoom);
if (class2 != null)
{
Session.GetMessageHandler().ClearRoomLoading();
ServerMessage Message = new ServerMessage(30u);
if (class2.Model.StaticFurniMap != "")
{
Message.AppendStringWithBreak(class2.Model.StaticFurniMap);
}
else
{
Message.AppendInt32(0);
}
Session.SendMessage(Message);
if (class2.Type == "private")
{
Hashtable hashtable_ = class2.Hashtable_0;
Hashtable hashtable_2 = class2.Hashtable_1;
ServerMessage Message2 = new ServerMessage(32u);
Message2.AppendInt32(hashtable_.Count);
foreach (RoomItem class3 in hashtable_.Values)
{
class3.Serialize(Message2);
}
Session.SendMessage(Message2);
ServerMessage Message3 = new ServerMessage(45u);
Message3.AppendInt32(hashtable_2.Count);
foreach (RoomItem class3 in hashtable_2.Values)
{
class3.Serialize(Message3);
}
Session.SendMessage(Message3);
}
class2.method_46(Session, Session.GetHabbo().SpectatorMode);
List<RoomUser> list = new List<RoomUser>();
for (int i = 0; i < class2.UserList.Length; i++)
{
RoomUser class4 = class2.UserList[i];
if (class4 != null && (!class4.IsSpectator && class4.Visible))
{
list.Add(class4);
}
}
ServerMessage Message4 = new ServerMessage(28u);
Message4.AppendInt32(list.Count);
foreach (RoomUser class4 in list)
{
class4.Serialize(Message4);
}
Session.SendMessage(Message4);
ServerMessage Message5 = new ServerMessage(472u);
Message5.AppendBoolean(class2.Hidewall);
Message5.AppendInt32(class2.Wallthick);
Message5.AppendInt32(class2.Floorthick);
Session.SendMessage(Message5);
if (class2.Type == "public")
{
ServerMessage Message6 = new ServerMessage(471u);
Message6.AppendBoolean(false);
Message6.AppendStringWithBreak(class2.ModelName);
Message6.AppendBoolean(false);
Session.SendMessage(Message6);
}
else
{
if (class2.Type == "private")
{
ServerMessage Message6 = new ServerMessage(471u);
Message6.AppendBoolean(true);
Message6.AppendUInt(class2.RoomId);
if (class2.CheckRights(Session, true))
{
Message6.AppendBoolean(true);
}
else
{
Message6.AppendBoolean(false);
}
Session.SendMessage(Message6);
ServerMessage Message7 = new ServerMessage(454u);
Message7.AppendBoolean(false);
@class.Serialize(Message7, false, false);
Session.SendMessage(Message7);
//.........这里部分代码省略.........