本文整理汇总了C#中GoldTree.Messages.ServerMessage.AppendStringWithBreak方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendStringWithBreak方法的具体用法?C# ServerMessage.AppendStringWithBreak怎么用?C# ServerMessage.AppendStringWithBreak使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendStringWithBreak方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(650u);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendStringWithBreak("");
Message.AppendString("I");
if (RoomItem_0.string_3.Length > 0)
{
Message.AppendString(RoomItem_0.string_3);
}
else
{
Message.AppendString("RB");
}
Message.AppendStringWithBreak("HRAH");
Session.SendMessage(Message);
RoomItem_0.ReqUpdate(1);
}
}
示例2: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
ServerMessage Message = new ServerMessage(465u);
Message.AppendUInt(@class.Id);
Message.AppendStringWithBreak(@class.Name);
Message.AppendStringWithBreak(@class.Description);
Message.AppendInt32(@class.State);
Message.AppendInt32(@class.Category);
Message.AppendInt32(@class.UsersMax);
Message.AppendInt32(100);
Message.AppendInt32(@class.Tags.Count);
foreach (string current in @class.Tags)
{
Message.AppendStringWithBreak(current);
}
Message.AppendInt32(@class.UsersWithRights.Count);
foreach (uint current2 in @class.UsersWithRights)
{
Message.AppendUInt(current2);
Message.AppendStringWithBreak(GoldTree.GetGame().GetClientManager().GetNameById(current2));
}
Message.AppendInt32(@class.UsersWithRights.Count);
Message.AppendBoolean(@class.AllowPet);
Message.AppendBoolean(@class.AllowPetsEating);
Message.AppendBoolean(@class.AllowWalkthrough);
Message.AppendBoolean(@class.Hidewall);
Message.AppendInt32(@class.Wallthick);
Message.AppendInt32(@class.Floorthick);
Session.SendMessage(Message);
}
}
示例3: 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);
}
}
示例4: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
int num = Event.PopWiredInt32();
ServerMessage Message = new ServerMessage(300u);
Message.AppendInt32(num);
if (num > 0)
{
for (int i = 0; i < num; i++)
{
int num2 = Event.PopWiredInt32();
if (num2 > 0)
{
/*Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(num2);
Message.AppendInt32(@class.Id);
Message.AppendStringWithBreak(@class.Name);
Message.AppendStringWithBreak(@class.Track);
Message.AppendInt32(@class.Length);
Message.AppendStringWithBreak(@class.Author);*/
Message.AppendInt32(SongManager.GetSong(num2).Id);
Message.AppendStringWithBreak(SongManager.GetSong(num2).Name);
Message.AppendStringWithBreak(SongManager.GetSong(num2).Track);
Message.AppendInt32(SongManager.GetSong(num2).Length);
Message.AppendStringWithBreak(SongManager.GetSong(num2).Author);
}
}
}
Session.SendMessage(Message);
}
示例5: method_10
public void method_10(string string_0, string string_1)
{
ServerMessage Message = new ServerMessage(161u);
Message.AppendStringWithBreak(string_0);
Message.AppendStringWithBreak(string_1);
this.GetConnection().SendMessage(Message);
}
示例6: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(323u);
Message.AppendUInt(Session.GetHabbo().CurrentRoomId);
Message.AppendInt32(1);
Message.AppendInt32(1);
Message.AppendInt32(1);
Message.AppendStringWithBreak("Watercolour");
Message.AppendStringWithBreak("Pendulum");
Message.AppendInt32(1);
Session.SendMessage(Message);
}
示例7: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
RoomItem_0.method_9();
ServerMessage Message = new ServerMessage(651u);
Message.AppendInt32(0);
Message.AppendInt32(5);
if (RoomItem_0.string_5.Length > 0)
{
Message.AppendString(RoomItem_0.string_5);
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendStringWithBreak("");
Message.AppendString("J");
if (RoomItem_0.string_2.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_2));
}
else
{
Message.AppendInt32(0);
}
if (RoomItem_0.string_3.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_3));
}
else
{
Message.AppendInt32(0);
}
Message.AppendString("HPA");
if (RoomItem_0.string_6.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_6));
}
else
{
Message.AppendInt32(0);
}
Message.AppendStringWithBreak("H");
Session.SendMessage(Message);
}
}
示例8: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(650u);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendStringWithBreak("");
Message.AppendStringWithBreak("HHPBH");
Session.SendMessage(Message);
}
}
示例9: 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"))
{
ServerMessage Message = new ServerMessage(48u);
Message.AppendStringWithBreak(class2.uint_0.ToString());
Message.AppendStringWithBreak(class2.ExtraData);
Session.SendMessage(Message);
}
}
}
示例10: 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);
}
}
}
}
示例11: method_10
public ServerMessage method_10(string string_0)
{
DataTable dataTable = null;
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.AddParamWithValue("query", string_0);
dataTable = @class.ReadDataTable("SELECT Id,title FROM help_topics WHERE title LIKE @query OR body LIKE @query LIMIT 25");
}
ServerMessage Message = new ServerMessage(521u);
ServerMessage result;
if (dataTable == null)
{
Message.AppendBoolean(false);
result = Message;
}
else
{
Message.AppendInt32(dataTable.Rows.Count);
foreach (DataRow dataRow in dataTable.Rows)
{
Message.AppendUInt((uint)dataRow["Id"]);
Message.AppendStringWithBreak((string)dataRow["title"]);
}
result = Message;
}
return result;
}
示例12: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(443u);
Message.AppendInt32(Session.GetHabbo().AchievementScore);
Message.AppendStringWithBreak("");
Session.SendMessage(Message);
}
示例13: 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;
}
}
}
}
}
示例14: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
{
if (UserHasRights && Session != null)
{
Item.method_9();
ServerMessage Message = new ServerMessage(652u);
Message.AppendInt32(0);
Message.AppendInt32(5);
if (Item.string_5.Length > 0)
{
Message.AppendString(Item.string_5);
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(Item.GetBaseItem().Sprite);
Message.AppendUInt(Item.uint_0);
Message.AppendStringWithBreak("");
Message.AppendString("J");
if (Item.string_3.Length > 0)
{
Message.AppendString(Item.string_3);
}
else
{
Message.AppendString("HHH");
}
Session.SendMessage(Message);
}
}
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:31,代码来源:InteractorWiredConditionFurniStatesAndPositionsMatch.cs
示例15: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
Room room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (room != null)
{
RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(num);
if (room != null && room.CheckRights(Session, true) && roomUserByHabbo != null && !roomUserByHabbo.IsBot && !room.UsersWithRights.Contains(num))
{
room.UsersWithRights.Add(num);
using (DatabaseClient client = GoldTree.GetDatabase().GetClient())
{
client.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO room_rights (room_id,user_id) VALUES (",
room.Id,
",",
num,
")"
}));
}
ServerMessage serverMessage = new ServerMessage(510u);
serverMessage.AppendUInt(room.Id);
serverMessage.AppendUInt(num);
serverMessage.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username);
Session.SendMessage(serverMessage);
roomUserByHabbo.AddStatus("flatctrl", "");
roomUserByHabbo.UpdateNeeded = true;
roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42u));
}
}
}