本文整理汇总了C#中GoldTree.Messages.ClientMessage.PopFixedString方法的典型用法代码示例。如果您正苦于以下问题:C# ClientMessage.PopFixedString方法的具体用法?C# ClientMessage.PopFixedString怎么用?C# ClientMessage.PopFixedString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.Messages.ClientMessage
的用法示例。
在下文中一共展示了ClientMessage.PopFixedString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int PollId = Event.PopWiredInt32();
int QuestionId = Event.PopWiredInt32();
int AnswerCount = Event.PopWiredInt32();
string AnswerText = "";
if (AnswerCount > 1)
{
for (int i = 1; i <= AnswerCount; i++)
{
if (AnswerText == "")
{
AnswerText = Event.PopFixedString();
}
else
{
AnswerText = AnswerText + "," + Event.PopFixedString();
}
}
}
else
{
AnswerText = Event.PopFixedString();
}
using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("INSERT INTO `room_poll_results` (`poll_id`, `question_id`, `answer_text`, `user_id`) VALUES ('" + PollId +"', '" + QuestionId + "', '" + AnswerText + "', '" + Session.GetHabbo().Id + "')");
}
}
示例2: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.method_26(Session))
{
uint num = Event.PopWiredUInt();
string a = Event.PopFixedString().ToUpper();
string text = GoldTree.FilterString(Event.PopFixedString());
text = text.Replace("hd-99999-99999", "");
text += ".";
RoomItem class2 = @class.Hashtable_0[num] as RoomItem;
if (class2.ExtraData.Contains(','))
{
class2.string_2 = class2.ExtraData.Split(new char[]
{
','
})[0];
class2.string_3 = class2.ExtraData.Split(new char[]
{
','
})[1];
}
if (a == "M")
{
class2.string_2 = text;
}
else
{
class2.string_3 = text;
}
class2.ExtraData = class2.string_2 + "," + class2.string_3;
class2.UpdateState(true, true);
}
}
示例3: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int int_ = Event.PopWiredInt32();
uint uint_ = Event.PopWiredUInt();
string string_ = Event.PopFixedString();
string string_2 = GoldTree.FilterString(Event.PopFixedString());
string string_3 = GoldTree.FilterString(Event.PopFixedString());
GoldTree.GetGame().GetCatalog().method_6(Session, int_, uint_, string_, true, string_2, string_3, true);
}
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo() == null)
{
Session.method_6(Event.PopFixedString());
if (Session.GetHabbo() != null && Session.GetHabbo().list_2 != null && Session.GetHabbo().list_2.Count > 0)
{
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
try
{
ServerMessage Message = new ServerMessage(420u);
Message.AppendInt32(Session.GetHabbo().list_2.Count);
foreach (uint current in Session.GetHabbo().list_2)
{
string string_ = @class.ReadString("SELECT username FROM users WHERE Id = " + current + " LIMIT 1;");
Message.AppendStringWithBreak(string_);
}
Session.SendMessage(Message);
}
catch
{
Console.ForegroundColor = ConsoleColor.Red;
Logging.WriteLine("Login error: User is ignoring a user that no longer exists");
Console.ForegroundColor = ConsoleColor.Gray;
}
}
}
}
}
示例5: 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);
}
}
}
}
示例6: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
string text = Event.PopFixedString();
ServerMessage Message = new ServerMessage(7u);
Message.AppendStringWithBreak(text.ToLower());
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip"))
{
double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1("habbo_vip").Int32_0;
double num2 = num - GoldTree.GetUnixTimestamp();
int num3 = (int)Math.Ceiling(num2 / 86400.0);
int num4 = num3 / 31;
if (num4 >= 1)
{
num4--;
}
Message.AppendInt32(num3 - num4 * 31);
Message.AppendBoolean(true);
Message.AppendInt32(num4);
Message.AppendBoolean(true);
Message.AppendBoolean(true);
Message.AppendBoolean(Session.GetHabbo().Vip);
Message.AppendInt32(0);
Message.AppendInt32(0);
}
else
{
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription(text))
{
double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1(text).Int32_0;
double num2 = num - GoldTree.GetUnixTimestamp();
int num3 = (int)Math.Ceiling(num2 / 86400.0);
int num4 = num3 / 31;
if (num4 >= 1)
{
num4--;
}
Message.AppendInt32(num3 - num4 * 31);
Message.AppendBoolean(true);
Message.AppendInt32(num4);
if (Session.GetHabbo().Rank >= 2u)
{
Message.AppendInt32(1);
Message.AppendInt32(1);
Message.AppendInt32(2);
}
else
{
Message.AppendInt32(1);
}
}
else
{
for (int i = 0; i < 3; i++)
{
Message.AppendInt32(0);
}
}
}
Session.SendMessage(Message);
}
示例7: 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);
}
}
示例8: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
Event.PopFixedString();
Event.PopWiredInt32();
RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
if (@class != null)
{
if (@class.Type == "private")
{
ServerMessage Message = new ServerMessage(286u);
Message.AppendBoolean(@class.IsPublicRoom);
Message.AppendUInt(num);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(453u);
Message2.AppendUInt(@class.Id);
Message2.AppendStringWithBreak(@class.CCTs);
Message2.AppendUInt(@class.Id);
Session.SendMessage(Message2);
}
}
}
示例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 && @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);
}
}
}
}
示例10: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = GoldTree.FilterString(Event.PopFixedString());
if (Session != null && Session.GetHabbo() != null && 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);
}
}
}
}
}
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
RoomItem class2 = @class.method_28(Event.PopWiredUInt());
if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
{
string text = Event.PopFixedString();
string text2 = text.Split(new char[]
{
' '
})[0];
string str = GoldTree.DoFilter(text.Substring(text2.Length + 1), true, true);
if (@class.method_26(Session) || text.StartsWith(class2.ExtraData))
{
string text3 = text2;
if (text3 != null && (text3 == "FFFF33" || text3 == "FF9CFF" || text3 == "9CCEFF" || text3 == "9CFF9C"))
{
class2.ExtraData = text2 + " " + str;
class2.UpdateState(true, true);
}
}
}
}
}
示例12: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
string text = GoldTree.FilterString(Event.PopFixedString());
if (text.Length >= 1)
{
Session.SendMessage(GoldTree.GetGame().GetHelpTool().method_10(text));
}
}
示例13: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
try
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
if (@class.method_72("stickiepole") > 0 || @class.method_26(Session))
{
uint uint_ = Event.PopWiredUInt();
string text = Event.PopFixedString();
string[] array = text.Split(new char[]
{
' '
});
if (array[0].Contains("-"))
{
array[0] = array[0].Replace("-", "");
}
UserItem class2 = Session.GetHabbo().method_23().method_10(uint_);
if (class2 != null)
{
if (array[0].StartsWith(":"))
{
string text2 = @class.method_98(text);
if (text2 == null)
{
ServerMessage Message = new ServerMessage(516u);
Message.AppendInt32(11);
Session.SendMessage(Message);
return;
}
RoomItem RoomItem_ = new RoomItem(class2.uint_0, @class.Id, class2.uint_1, class2.string_0, 0, 0, 0.0, 0, text2, @class);
if (@class.method_82(Session, RoomItem_, true, null))
{
Session.GetHabbo().method_23().method_12(uint_, 1u, false);
}
}
using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE items SET room_id = '",
@class.Id,
"' WHERE Id = '",
class2.uint_0,
"' LIMIT 1"
}));
}
}
}
}
}
catch
{
}
}
示例14: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().HasFuse("acc_supporttool"))
{
uint uint_ = Event.PopWiredUInt();
string string_ = Event.PopFixedString();
GoldTree.GetGame().GetModerationTool().method_16(Session, uint_, string_, true);
}
}
示例15: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = Event.PopFixedString();
string text2 = Event.PopFixedString();
if (AntiMutant.ValidateLook(text, text2))
{
using (DatabaseClient client = GoldTree.GetDatabase().GetClient())
{
client.AddParamWithValue("look", text);
client.AddParamWithValue("gender", text2.ToUpper());
if (client.ReadDataRow(string.Concat(new object[]
{
"SELECT null FROM user_wardrobe WHERE user_id = ",
Session.GetHabbo().Id,
" AND slot_id = ",
num,
" LIMIT 1"
})) != null)
{
client.ExecuteQuery(string.Concat(new object[]
{
"UPDATE user_wardrobe SET look = @look, gender = @gender WHERE user_id = ",
Session.GetHabbo().Id,
" AND slot_id = ",
num,
" LIMIT 1;"
}));
}
else
{
client.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO user_wardrobe (user_id,slot_id,look,gender) VALUES (",
Session.GetHabbo().Id,
",",
num,
",@look,@gender)"
}));
}
}
}
}