本文整理汇总了C#中Essential.Messages.ClientMessage类的典型用法代码示例。如果您正苦于以下问题:C# ClientMessage类的具体用法?C# ClientMessage怎么用?C# ClientMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClientMessage类属于Essential.Messages命名空间,在下文中一共展示了ClientMessage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Session.SendMessage(Essential.GetGame().GetCatalog().GetIndexMessageForRank(Session.GetHabbo().Rank));
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:GetCatalogIndexEvent.cs
示例2: 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);
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:30,代码来源:DanceMessageEvent.cs
示例3: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().GetInventoryComponent() != null)
{
Session.SendMessage(Session.GetHabbo().GetInventoryComponent().ComposeBotInventoryListMessage());
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:GetBotInventoryEvent.cs
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
/* ServerMessage Message = new ServerMessage(Outgoing.SoundSettings); // Updated
Message.AppendInt32(Session.GetHabbo().Volume);
Message.AppendBoolean(false);
Session.SendMessage(Message);*/
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:GetSoundSettingsEvent.cs
示例5: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (class2 != null)
{
class2.Unidle();
int num = Event.PopWiredInt32();
int num2 = Event.PopWiredInt32();
if (num != class2.X || num2 != class2.Y)
{
int int_ = Rotation.GetRotation(class2.X, class2.Y, num, num2);
class2.method_9(int_);
if (class2.class34_1 != null && class2.RoomUser_0 != null)
{
class2.RoomUser_0.method_9(int_);
}
}
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:LookToMessageEvent.cs
示例6: 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
示例7: 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
示例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: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Event.PopWiredInt32();
Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
RoomItem class2 = @class.method_28(Event.PopWiredUInt());
if (class2 != null)
{
string text = class2.GetBaseItem().InteractionType.ToLower();
if (text == null || !(text == "postit"))
{
@class.method_29(Session, class2.uint_0, false, true);
Session.GetHabbo().GetInventoryComponent().method_11(class2.uint_0, class2.uint_2, class2.ExtraData, false, 0, 0, class2.GuildData);
Session.GetHabbo().GetInventoryComponent().method_9(true);
if (Session.GetHabbo().CurrentQuestId > 0 && Essential.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "PICKUPITEM")
{
Essential.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
}
}
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:PickupObjectMessageEvent.cs
示例10: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Session.GetHabbo().GetInventoryComponent().method_13();
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:RequestFurniInventoryEvent.cs
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
{
Session.GetHabbo().GetMessenger().SerializeUpdates(Session);
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:FriendListUpdateEvent.cs
示例12: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().HasFuse("acc_supporttool"))
{
uint uint_ = Event.PopWiredUInt();
bool flag = (Event.PopWiredInt32() == 1);
bool flag2 = (Event.PopWiredInt32() == 1);
bool flag3 = (Event.PopWiredInt32() == 1);
string text = "";
if (flag)
{
text += "Apply Doorbell";
}
if (flag2)
{
text += " Change Name";
}
if (flag3)
{
text += " Kick Users";
}
Essential.GetGame().GetClientManager().StoreCommand(Session, "ModTool - Room Action", text);
Essential.GetGame().GetModerationTool().method_12(Session, uint_, flag3, flag, flag2);
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:ModerateRoomMessageEvent.cs
示例13: 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
示例14: 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
示例15: 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
示例16: 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
示例17: 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)
{
RoomItem class2 = null;
foreach (RoomItem class3 in @class.Hashtable_1.Values)
{
if (class3.GetBaseItem().InteractionType.ToLower() == "dimmer")
{
class2 = class3;
break;
}
}
if (class2 != null)
{
if (@class.MoodlightData.Enabled)
{
@class.MoodlightData.Deactivate();
}
else
{
@class.MoodlightData.Activate();
}
class2.ExtraData = @class.MoodlightData.GenerateExtraData();
class2.UpdateState();
}
}
}
catch
{
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:35,代码来源:RoomDimmerChangeStateMessageEvent.cs
示例18: 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);
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:34,代码来源:GetSelectedBadgesMessageEvent.cs
示例19: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().GetMessenger() != null)
{
int num = Event.PopWiredInt32();
for (int i = 0; i < num; i++)
{
uint uint_ = Event.PopWiredUInt();
MessengerRequest @class = Session.GetHabbo().GetMessenger().method_4(uint_);
if (@class != null)
{
if (@class.To != Session.GetHabbo().Id)
{
break;
}
if (!Session.GetHabbo().GetMessenger().method_9(@class.To, @class.From))
{
Session.GetHabbo().GetMessenger().method_12(@class.From);
}
Session.GetHabbo().GetMessenger().method_11(uint_);
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:AcceptBuddyMessageEvent.cs
示例20: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room class14_ = Session.GetHabbo().CurrentRoom;
if (class14_ != null)
{
string string_ = Event.PopFixedString();
RoomUser @class = class14_.method_56(string_);
if (@class != null)
{
uint uint_ = @class.GetClient().GetHabbo().Id;
if (Session.GetHabbo().list_2.Contains(uint_))
{
Session.GetHabbo().list_2.Remove(uint_);
using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
{
class2.ExecuteQuery(string.Concat(new object[]
{
"DELETE FROM user_ignores WHERE user_id = ",
Session.GetHabbo().Id,
" AND ignore_id = ",
uint_,
" LIMIT 1;"
}));
}
ServerMessage Message = new ServerMessage(Outgoing.UpdateIgnoreStatus); // Updated
Message.AppendInt32(3);
Message.AppendString(string_);
Session.SendMessage(Message);
}
}
}
}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:32,代码来源:UnignoreUserMessageEvent.cs
注:本文中的Essential.Messages.ClientMessage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论