本文整理汇总了C#中BrickEmulator.HabboHotel.Users.Client类的典型用法代码示例。如果您正苦于以下问题:C# Client类的具体用法?C# Client怎么用?C# Client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Client类属于BrickEmulator.HabboHotel.Users命名空间,在下文中一共展示了Client类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddUserToGroup
private void AddUserToGroup(Client Client, SiteRequest Request)
{
int ItemId = Request.PopInt32();
if (ItemId <= 0)
{
return;
}
int FriendId = Request.PopInt32();
if (FriendId <= 0)
{
return;
}
int CategoryId = Request.PopInt32();
if (CategoryId <= 0)
{
return;
}
BrickEngine.GetMessengerHandler().AddUserToGroup(ItemId, Request.GetUserId(), FriendId, CategoryId);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:25,代码来源:SiteRequestHandler.cs
示例2: GetEcotronInfo
private void GetEcotronInfo(Client Client, Request Request)
{
Response Response = new Response(507);
Response.AppendInt32(BrickEngine.GetEcotronReactor().GetTimerTime(Client.GetUser().HabboId));
Response.AppendInt32(BrickEngine.GetEcotronReactor().GetTimeToWait(Client.GetUser().HabboId));
Client.SendResponse(Response);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:7,代码来源:Shop.cs
示例3: GainReward
public Boolean GainReward(Client Client)
{
EcotronReward Reward = DeliverReward();
if (Reward == null)
{
return false;
}
BaseItem EcotronBox = BrickEngine.GetFurniReactor().GetSpecifiqueItem("ecotron_box");
if (EcotronBox == null)
{
return false;
}
int BoxId = BrickEngine.GetItemReactor().InsertItem(Client.GetUser().HabboId, EcotronBox.Id, DateTime.Now.ToShortDateString(), Reward.BaseId);
Response Response = new Response(832);
Response.AppendInt32(1);
Response.AppendInt32(EcotronBox.InternalType.ToLower().Equals("s") ? 1 : 2);
Response.AppendInt32(1);
Response.AppendInt32(BoxId);
Client.SendResponse(Response);
Response Box = new Response(508);
Box.AppendBoolean(true);
Box.AppendInt32(BoxId);
Client.SendResponse(Box);
TimeToWait.Add(Client.GetUser().HabboId, DateTime.Now.AddMinutes(3));
return true;
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:34,代码来源:EcotronReactor.cs
示例4: BeginLoadRoom
public void BeginLoadRoom(Client Client, int RoomId, string Password)
{
if (Client.GetUser().PreparingRoomId == RoomId)
{
return;
}
VirtualRoom Room = BrickEngine.GetRoomReactor().GetVirtualRoom(RoomId, Rooms.RoomRunningState.Alive);
if (Room == null)
{
ClearLoading(Client, true);
return;
}
if (BrickEngine.GetRoomReactor().GetRoomModel(Room.ModelParam) == null)
{
Client.Notif("The RoomModel of this room is missing.", false);
ClearLoading(Client, true);
return;
}
if (!Room.BeginEnterRoom(Client, Password))
{
Client.GetUser().LeaveCurrentRoom();
ClearLoading(Client, false);
}
else
{
Client.GetUser().LeaveCurrentRoom();
Client.GetUser().PreparingRoomId = RoomId;
ContinueLoading(Client, null);
}
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:34,代码来源:Rooms.cs
示例5: CreateRoom
private void CreateRoom(Client Client, Request Request)
{
int Limit = BrickEngine.GetConfigureFile().CallIntKey("max.rooms.amount");
int RoomAmount = BrickEngine.GetRoomReactor().GetMe(Client.GetUser().HabboId).Count;
if (RoomAmount >= Limit)
{
Client.Notif("You're over the rooms limit, first delete a room before you create a new one.", false);
return;
}
string RawName = Request.PopFixedString();
string RawModel = Request.PopFixedString();
int RoomId = -1;
if ((RoomId = BrickEngine.GetRoomReactor().CreateRoom(Client, RawName, RawModel)) > 0)
{
Response Response = new Response(59);
Response.AppendInt32(RoomId);
Response.AppendStringWithBreak(BrickEngine.CleanString(RawName));
Client.SendResponse(Response);
}
else
{
CheckRoomCreate(Client, null);
}
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:28,代码来源:Navigator.cs
示例6: Interact
public void Interact(Client Commander, PetInfo Pet, string Command)
{
if (Interactions.ContainsKey(Command.ToLower()))
{
Interactions[Command.ToLower()].Invoke(Commander, Pet);
}
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:7,代码来源:PetCommandHandler.cs
示例7: HandleCommand
public Boolean HandleCommand(string Command, Client Client, List<string> Params)
{
string Lowered = Command.ToLower();
foreach (KeyValuePair<KeyValuePair<string, string>, KeyValuePair<Handler, int>> kvp in Handlers)
{
if (kvp.Key.Key.ToLower().Equals(Command))
{
if (kvp.Value.Key != null && Client.GetUser().Rank >= kvp.Value.Value)
{
if (Client.GetUser().Rank >= kvp.Value.Value)
{
kvp.Value.Key.Invoke(Client, Params);
return true;
}
else
{
Client.Notif("You have no rights to do that command.", true);
return false;
}
}
}
}
return false;
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:26,代码来源:CommandHandler.cs
示例8: AlertRoom
public void AlertRoom(Client Client, int RoomId, string Message, Boolean Warning)
{
if (Client.GetUser().Rank < 7)
{
Client.Notif("You need rank '7' to do this action.", false);
return;
}
if (BrickEngine.GetRoomReactor().RoomIsAlive(RoomId))
{
if (BrickEngine.GetRoomReactor().GetVirtualRoom(RoomId, Rooms.RoomRunningState.Alive).RoomUserAmount > 0)
{
foreach (VirtualRoomUser User in BrickEngine.GetRoomReactor().GetVirtualRoom(RoomId, Rooms.RoomRunningState.Alive).GetRoomEngine().GetUsers())
{
if (User.GetClient().GetUser().Rank > 1)
{
AlertUser(Client, User.HabboId, Message, false, false, true);
}
else
{
AlertUser(Client, User.HabboId, Message, Warning, false, true);
}
}
}
}
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:26,代码来源:ToolReactor.cs
示例9: CompletedAchievement
public Boolean CompletedAchievement(Client Client)
{
if (Client.GetUser().Achievements.ContainsKey(Id))
{
return (Client.GetUser().Achievements[Id] >= MaxLevel);
}
return false;
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:9,代码来源:Achievement.cs
示例10: AddUserTag
private void AddUserTag(Client Client, SiteRequest Request)
{
string Tag = Request.PopString();
if (!Client.GetUser().Tags.Contains(Tag))
{
Client.GetUser().Tags.Add(Tag);
}
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:9,代码来源:SiteRequestHandler.cs
示例11: CheckRoomCreate
private void CheckRoomCreate(Client Client, Request Request)
{
int Limit = BrickEngine.GetConfigureFile().CallIntKey("max.rooms.amount");
int RoomAmount = BrickEngine.GetRoomReactor().GetMe(Client.GetUser().HabboId).Count;
Response Response = new Response(512);
Response.AppendBoolean(RoomAmount >= Limit);
Response.AppendInt32(Limit);
Client.SendResponse(Response);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:10,代码来源:Navigator.cs
示例12: AddFriend
private void AddFriend(Client Client, SiteRequest Request)
{
int FriendId = Request.PopInt32();
if (FriendId <= 0 || FriendId == Request.GetUserId())
{
return;
}
BrickEngine.GetMessengerHandler().RequestUser(Request.GetUserId(), FriendId);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:11,代码来源:SiteRequestHandler.cs
示例13: GetResponse
public void GetResponse(Client Client, Response Response)
{
Response.AppendInt32(Id);
Response.AppendBoolean((Client.GetUser().CurrentQuest.Equals(Id)) ? true : false);
Response.AppendStringWithBreak(FilterAction);
Response.AppendStringWithBreak(FilterParam);
Response.AppendInt32(PixelReward);
Response.AppendStringWithBreak(FilterReAction);
Response.AppendInt32((Client.GetUser().CurrentQuest.Equals(Id)) ? Client.GetUser().CurrentQuestProgress : 0);
Response.AppendInt32(ActionAmount);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:11,代码来源:Quest.cs
示例14: AchievedCategory
public Boolean AchievedCategory(Client Client)
{
var AchievedQuests = Client.GetUser().Quests;
var CategoryQuests = BrickEngine.GetQuestReactor().OrderQuestsForCategory(Id);
if (AchievedQuests.ContainsKey(Id))
{
return AchievedQuests[Id] >= CategoryQuests.Count;
}
return false;
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:12,代码来源:QuestCategory.cs
示例15: SocketClient
public SocketClient(SocketInformation Info)
: base(Info)
{
this.Client = new Client(this);
this.ArrayBuffer = new byte[ARRAY_BUFFER_SIZE];
base.Blocking = false;
ReceiveCallback = new AsyncCallback(EndReceiving);
SendCallback = new AsyncCallback(EndSending);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:12,代码来源:SocketClient.cs
示例16: OpenFeacturedRoom
public void OpenFeacturedRoom(Client Client, Request Request)
{
int RoomId = Request.PopWiredInt32();
string Password = Request.PopFixedString();
if (Client.GetUser().RoomId == RoomId)
{
return;
}
BeginLoadRoom(Client, RoomId, Password);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:12,代码来源:Rooms.cs
示例17: ChatWithFriend
private void ChatWithFriend(Client Client, Request Request)
{
int FriendId = Request.PopWiredInt32();
if (!BrickEngine.GetMessengerHandler().HasFriend(Client.GetUser().HabboId, FriendId))
{
return;
}
BrickEmulator.HabboHotel.Users.Handlers.Messenger.Friend Friend = BrickEngine.GetMessengerHandler().GetFriend(Client.GetUser().HabboId, FriendId);
if (Friend == null)
{
Response Respose = new Response(261);
Respose.AppendInt32(6);
Respose.AppendInt32(FriendId);
Client.SendResponse(Respose);
return;
}
if (Client.GetUser().Muted)
{
Response Respose = new Response(261);
Respose.AppendInt32(4);
Respose.AppendInt32(FriendId);
Client.SendResponse(Respose);
return;
}
if (Friend.IsAlive)
{
if (Friend.GetClient().GetUser().Muted)
{
Response Respose = new Response(261);
Respose.AppendInt32(3);
Respose.AppendInt32(FriendId);
Client.SendResponse(Respose);
}
Response Response = new Response(134);
Response.AppendInt32(Client.GetUser().HabboId);
Response.AppendStringWithBreak(BrickEngine.CleanString(Request.PopFixedString()));
Friend.GetClient().SendResponse(Response);
}
else
{
Response Respose = new Response(261);
Respose.AppendInt32(5);
Respose.AppendInt32(FriendId);
Client.SendResponse(Respose);
}
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:53,代码来源:Messenger.cs
示例18: AlertSelectedUser
private void AlertSelectedUser(Client Client, Request Request)
{
int UserId = Request.PopWiredInt32();
string Message = BrickEngine.CleanString(Request.PopFixedString());
if (UserId <= 0)
{
return;
}
BrickEngine.GetToolReactor().AlertUser(Client, UserId, Message, false, false, false);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:13,代码来源:Tools.cs
示例19: BanSelectedUser
private void BanSelectedUser(Client Client, Request Request)
{
int UserId = Request.PopWiredInt32();
string Reason = BrickEngine.CleanString(Request.PopFixedString());
int DurationHours = Request.PopWiredInt32();
if (UserId <= 0)
{
return;
}
BrickEngine.GetToolReactor().BanUser(Client, UserId, Reason, DurationHours, false);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:15,代码来源:Tools.cs
示例20: AlertSelectedRoom
private void AlertSelectedRoom(Client Client, Request Request)
{
if (!Client.GetUser().IsInRoom)
{
return;
}
// Avoid Junk
Request.PopWiredInt32();
Boolean Warning = !Request.PopWiredInt32().Equals(3);
string Message = BrickEngine.CleanString(Request.PopFixedString());
BrickEngine.GetToolReactor().AlertRoom(Client, Client.GetUser().RoomId, Message, Warning);
}
开发者ID:devMextur,项目名称:BrickEmulator,代码行数:16,代码来源:Tools.cs
注:本文中的BrickEmulator.HabboHotel.Users.Client类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论