本文整理汇总了C#中GoldTree.HabboHotel.GameClients.GameClient.GetHabbo方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.GetHabbo方法的具体用法?C# GameClient.GetHabbo怎么用?C# GameClient.GetHabbo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.HabboHotel.GameClients.GameClient
的用法示例。
在下文中一共展示了GameClient.GetHabbo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = GoldTree.FilterString(Event.PopFixedString());
if (Session.GetHabbo().GetMessenger() != null)
{
if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
{
ServerMessage Message = new ServerMessage(134u);
Message.AppendUInt(0u);
Message.AppendString(Session.GetHabbo().Username + ": " + text);
GoldTree.GetGame().GetClientManager().method_17(Session, Message);
}
else
{
if (num == 0u)
{
ServerMessage Message2 = new ServerMessage(261u);
Message2.AppendInt32(4);
Message2.AppendUInt(0u);
Session.SendMessage(Message2);
}
else
{
if (Session != null && Session.GetHabbo() != null)
{
Session.GetHabbo().GetMessenger().method_18(num, text);
}
}
}
}
}
示例2: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().method_23() != null)
{
Session.SendMessage(Session.GetHabbo().method_23().method_15());
}
}
示例3: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && !Session.GetHabbo().list_4.Contains(@class.Id) && [email protected](Session, true))
{
switch (Event.PopWiredInt32())
{
case -1:
@class.Score--;
break;
case 0:
return;
case 1:
@class.Score++;
break;
default:
return;
}
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
class2.ExecuteQuery(string.Concat(new object[]
{
"UPDATE rooms SET score = '",
@class.Score,
"' WHERE Id = '",
@class.Id,
"' LIMIT 1"
}));
}
Session.GetHabbo().list_4.Add(@class.Id);
ServerMessage Message = new ServerMessage(345u);
Message.AppendInt32(@class.Score);
Session.SendMessage(Message);
}
}
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room class14_ = Session.GetHabbo().CurrentRoom;
if (class14_ != null)
{
Event.PopWiredUInt();
string string_ = Event.PopFixedString();
RoomUser @class = class14_.method_56(string_);
if (@class != null && @class.GetClient().GetHabbo().Rank <= 2u)
{
uint uint_ = @class.GetClient().GetHabbo().Id;
if (!Session.GetHabbo().list_2.Contains(uint_))
{
Session.GetHabbo().list_2.Add(uint_);
using (DatabaseClient class2 = GoldTree.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(419u);
Message.AppendInt32(1);
Session.SendMessage(Message);
}
}
}
}
示例5: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int int_ = Event.PopWiredInt32();
uint uint_ = Event.PopWiredUInt();
string string_ = Event.PopFixedString();
if (Session == null || Session.GetHabbo() == null)
{
return;
}
if (Session.GetHabbo().int_24 > 1)
{
int num = 0;
while (num < Session.GetHabbo().int_24 && GoldTree.GetGame().GetCatalog().method_6(Session, int_, uint_, string_, false, "", "", num == 0))
{
num++;
}
Session.GetHabbo().int_24 = 1;
}
else
{
GoldTree.GetGame().GetCatalog().method_6(Session, int_, uint_, string_, false, "", "", true);
}
}
示例6: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
DataTable dataTable_ = Session.GetHabbo().dataTable_0;
if (dataTable_ != null)
{
ServerMessage Message = new ServerMessage(915u);
Message.AppendInt32(dataTable_.Rows.Count);
foreach (DataRow dataRow in dataTable_.Rows)
{
GroupsManager @class = Groups.smethod_2((int)dataRow["groupid"]);
Message.AppendInt32(@class.int_0);
Message.AppendStringWithBreak(@class.string_0);
Message.AppendStringWithBreak(@class.string_2);
if (Session.GetHabbo().int_0 == @class.int_0) // is favorite group?
{
Message.AppendBoolean(true);
}
else
{
Message.AppendBoolean(false);
}
}
Session.SendMessage(Message);
}
}
示例7: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Room @class = GoldTree.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.int_3 || num2 != class2.int_4)
{
int int_ = Class107.smethod_0(class2.int_3, class2.int_4, num, num2);
class2.method_9(int_);
if (class2.class34_1 != null && class2.RoomUser_0 != null)
{
class2.RoomUser_0.method_9(int_);
}
}
}
}
}
}
示例8: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
if (class2 != null && !class2.IsBot && class2.GetClient() != null)
{
ServerMessage Message = new ServerMessage(228u);
Message.AppendUInt(class2.GetClient().GetHabbo().Id);
Message.AppendInt32(class2.GetClient().GetHabbo().method_22().Int32_1);
using (TimedLock.Lock(class2.GetClient().GetHabbo().method_22().List_0))
{
foreach (Badge current in class2.GetClient().GetHabbo().method_22().List_0)
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
}
Session.SendMessage(Message);
}
}
}
}
示例9: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room class14_ = Session.GetHabbo().CurrentRoom;
if (class14_ != null)
{
Event.PopWiredUInt();
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 = GoldTree.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(419u);
Message.AppendInt32(3);
Session.SendMessage(Message);
}
}
}
}
示例10: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && Session.GetHabbo().int_21 > 0)
{
RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
if (class2 != null && class2.GetClient().GetHabbo().Id != Session.GetHabbo().Id && !class2.IsBot)
{
Session.GetHabbo().int_21--;
Session.GetHabbo().RespectGiven++;
class2.GetClient().GetHabbo().Respect++;
using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
{
class3.ExecuteQuery("UPDATE user_stats SET Respect = respect + 1 WHERE Id = '" + class2.GetClient().GetHabbo().Id + "' LIMIT 1");
class3.ExecuteQuery("UPDATE user_stats SET RespectGiven = RespectGiven + 1 WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
class3.ExecuteQuery("UPDATE user_stats SET dailyrespectpoints = dailyrespectpoints - 1 WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
}
ServerMessage Message = new ServerMessage(440u);
Message.AppendUInt(class2.GetClient().GetHabbo().Id);
Message.AppendInt32(class2.GetClient().GetHabbo().Respect);
@class.SendMessage(Message, null);
Session.GetHabbo().CheckRespectGivedAchievements();
class2.GetClient().GetHabbo().CheckRespectReceivedAchievements();
if (GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "GIVE_RESPECT")
{
GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
}
}
}
}
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
{
Session.SendMessage(Session.GetHabbo().GetMessenger().SerializeUpdates());
}
}
示例12: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
DataTable dataTable = null;
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
dataTable = @class.ReadDataTable("SELECT asking_price FROM catalog_marketplace_offers WHERE user_id = '" + Session.GetHabbo().Id + "' AND state = '2'");
}
if (dataTable != null)
{
int num = 0;
foreach (DataRow dataRow in dataTable.Rows)
{
num += (int)dataRow["asking_price"];
}
if (num >= 1)
{
Session.GetHabbo().Credits += num;
Session.GetHabbo().method_13(true);
}
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.ExecuteQuery("DELETE FROM catalog_marketplace_offers WHERE user_id = '" + Session.GetHabbo().Id + "' AND state = '2'");
}
}
}
示例13: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && (@class.AllowPet || @class.CheckRights(Session, true)))
{
uint uint_ = Event.PopWiredUInt();
Pet class2 = Session.GetHabbo().method_23().method_4(uint_);
if (class2 != null && !class2.PlacedInRoom)
{
int num = Event.PopWiredInt32();
int num2 = Event.PopWiredInt32();
if (@class.method_30(num, num2, 0.0, true, false))
{
if (@class.Int32_2 >= LicenseTools.int_2)
{
Session.SendNotif(GoldTreeEnvironment.smethod_1("error_maxpets") + LicenseTools.int_2);
}
else
{
class2.PlacedInRoom = true;
class2.RoomId = @class.Id;
List<RandomSpeech> list = new List<RandomSpeech>();
List<BotResponse> list2 = new List<BotResponse>();
@class.method_4(new RoomBot(class2.PetId, class2.RoomId, AIType.const_0, "freeroam", class2.Name, "", class2.Look, num, num2, 0, 0, 0, 0, 0, 0, ref list, ref list2, 0), class2);
if (@class.CheckRights(Session, true))
{
Session.GetHabbo().method_23().method_6(class2.PetId, @class.Id);
}
}
}
}
}
}
示例14: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room room = GoldTree.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(480u);
serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
serverMessage.AppendInt32(num);
room.SendMessage(serverMessage, null);
if (GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
{
GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
}
}
}
}
示例15: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
{
ServerMessage Message = new ServerMessage(33u);
Message.AppendInt32(-9001);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(459u);
Message2.AppendUInt(num);
Message2.AppendBoolean(true);
Session.SendMessage(Message2);
Session.GetHabbo().list_1.Add(num);
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
class2.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO user_favorites (user_id,room_id) VALUES ('",
Session.GetHabbo().Id,
"','",
num,
"')"
}));
}
}
}