本文整理汇总了C#中BrickEmulator.HabboHotel.Users.Client.GetUser方法的典型用法代码示例。如果您正苦于以下问题:C# Client.GetUser方法的具体用法?C# Client.GetUser怎么用?C# Client.GetUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrickEmulator.HabboHotel.Users.Client
的用法示例。
在下文中一共展示了Client.GetUser方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例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);
}
示例3: 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);
}
}
示例4: AddUserTag
private void AddUserTag(Client Client, SiteRequest Request)
{
string Tag = Request.PopString();
if (!Client.GetUser().Tags.Contains(Tag))
{
Client.GetUser().Tags.Add(Tag);
}
}
示例5: 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);
}
示例6: 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);
}
}
示例7: 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);
}
示例8: 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);
}
}
示例9: 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;
}
示例10: 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);
}
}
}
}
}
示例11: ClearLoading
public void ClearLoading(Client Client, Boolean Reset)
{
if (Client.GetUser().IsInRoom)
{
Client.GetUser().RoomId = -1;
}
if (Client.GetUser().IsLoadingRoom)
{
Client.GetUser().PreparingRoomId = -1;
}
if (Reset)
{
Client.SendResponse(new Response(18));
}
}
示例12: AlertUser
public void AlertUser(Client Client, int UserId, string Message, Boolean Warning, Boolean Kick, Boolean RoomAlert)
{
if (Client.GetUser().Rank < 6)
{
Client.Notif("You need rank '6' to do this action.", false);
return;
}
if (Client.GetUser().HabboId.Equals(UserId) && !RoomAlert)
{
Client.Notif("You can't message yourself.", false);
return;
}
if (BrickEngine.GetUserReactor().IsOnline(UserId))
{
if (Kick)
{
if (BrickEngine.GetSocketShield().GetSocketClientByHabboId(UserId).GetClient().GetUser().IsInRoom)
{
BrickEngine.GetSocketShield().GetSocketClientByHabboId(UserId).GetClient().GetUser().GetRoom().GetRoomEngine().HandleLeaveUser(UserId, true);
}
}
if (Message.Length > 0)
{
BrickEngine.GetSocketShield().GetSocketClientByHabboId(UserId).GetClient().Notif(Message, true);
}
}
if (Warning)
{
if (BrickEngine.GetUserReactor().IsOnline(UserId))
{
BrickEngine.GetSocketShield().GetSocketClientByHabboId(UserId).GetClient().GetUser().Warnings++;
}
using (QueryReactor Reactor = BrickEngine.GetQueryReactor())
{
Reactor.SetQuery("UPDATE users SET warnings = warnings + 1 WHERE id = @habboid LIMIT 1");
Reactor.AddParam("habboid", UserId);
Reactor.ExcuteQuery();
}
}
}
示例13: CompletedAchievement
public Boolean CompletedAchievement(Client Client)
{
if (Client.GetUser().Achievements.ContainsKey(Id))
{
return (Client.GetUser().Achievements[Id] >= MaxLevel);
}
return false;
}
示例14: 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);
}
示例15: 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);
}