本文整理汇总了C#中Phoenix.Messages.ServerMessage.AppendStringWithBreak方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendStringWithBreak方法的具体用法?C# ServerMessage.AppendStringWithBreak怎么用?C# ServerMessage.AppendStringWithBreak使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phoenix.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendStringWithBreak方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: parse
public void parse(GameClient Session, ClientMessage Event)
{
DataTable dataTable_ = Session.GetHabbo().GroupMemberships;
if (dataTable_ != null)
{
ServerMessage Message = new ServerMessage(915u);
Message.AppendInt32(dataTable_.Rows.Count);
foreach (DataRow dataRow in dataTable_.Rows)
{
Group @class = GroupManager.GetGroup((int)dataRow["groupid"]);
Message.AppendInt32(@class.Id);
Message.AppendStringWithBreak(@class.Name);
Message.AppendStringWithBreak(@class.Badge);
if (Session.GetHabbo().GroupID == @class.Id) // is favorite group?
{
Message.AppendBoolean(true);
}
else
{
Message.AppendBoolean(false);
}
}
Session.SendMessage(Message);
}
}
示例2: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
ServerMessage Message = new ServerMessage(465u);
Message.AppendUInt(@class.RoomId);
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(PhoenixEnvironment.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: parse
public void parse(GameClient Session, ClientMessage Event)
{
int num = Event.PopWiredInt32();
ServerMessage Message = new ServerMessage(300);
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);
}
示例4: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight)
{
ServerMessage Message = new ServerMessage(650);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendStringWithBreak("");
Message.AppendString("I");
if (Item.Extra2.Length > 0)
{
Message.AppendString(Item.Extra2);
}
else
{
Message.AppendString("RB");
}
Message.AppendStringWithBreak("HRAH");
Session.SendMessage(Message);
Item.ReqUpdate(1);
}
}
示例5: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight && Session != null)
{
Item.method_10();
ServerMessage Message = new ServerMessage(651);
Message.AppendInt32(0);
Message.AppendInt32(5);
if (Item.Extra1.Length > 0)
{
Message.AppendString(Item.Extra1);
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendStringWithBreak("");
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendStringWithBreak("");
Session.SendMessage(Message);
}
}
示例6: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(323);
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: parse
public void parse(GameClient Session, ClientMessage Request)
{
string motto = PhoenixEnvironment.FilterInjectionChars(Request.PopFixedString());
if (motto.Length <= 50 && !(motto != ChatCommandHandler.ApplyWordFilter(motto)) && !(motto == Session.GetHabbo().Motto))
{
Session.GetHabbo().Motto = motto;
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.AddParamWithValue("motto", motto);
adapter.ExecuteQuery("UPDATE users SET motto = @motto WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
}
if (Session.GetHabbo().CurrentQuestId == 17)
{
PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(17, Session);
}
ServerMessage message = new ServerMessage(484);
message.AppendInt32(-1);
message.AppendStringWithBreak(Session.GetHabbo().Motto);
Session.SendMessage(message);
if (Session.GetHabbo().InRoom)
{
Room currentRoom = Session.GetHabbo().CurrentRoom;
if (currentRoom == null)
{
return;
}
RoomUser roomUserByHabbo = currentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (roomUserByHabbo == null)
{
return;
}
ServerMessage message2 = new ServerMessage(266);
message2.AppendInt32(roomUserByHabbo.VirtualId);
message2.AppendStringWithBreak(Session.GetHabbo().Look);
message2.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower());
message2.AppendStringWithBreak(Session.GetHabbo().Motto);
message2.AppendInt32(Session.GetHabbo().AchievementScore);
message2.AppendStringWithBreak("");
currentRoom.SendMessage(message2, null);
}
PhoenixEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 5, 1);
if (Session.GetHabbo().FriendStreamEnabled)
{
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.AddParamWithValue("motto", motto);
string look = PhoenixEnvironment.FilterInjectionChars(Session.GetHabbo().Look);
adapter.AddParamWithValue("look", look);
adapter.ExecuteQuery("INSERT INTO `friend_stream` (`id`, `type`, `userid`, `gender`, `look`, `time`, `data`) VALUES (NULL, '3', '" + Session.GetHabbo().Id + "', '" + Session.GetHabbo().Gender + "', @look, UNIX_TIMESTAMP(), @motto);");
}
}
}
}
示例8: parse
public void parse(GameClient Session, ClientMessage Request)
{
ServerMessage message = new ServerMessage(267);
message.AppendBoolean(Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"));
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.AddParamWithValue("userid", Session.GetHabbo().Id);
DataTable Row = adapter.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
if (Row == null)
{
message.AppendInt32(0);
}
else
{
message.AppendInt32(Row.Rows.Count);
foreach (DataRow row in Row.Rows)
{
message.AppendUInt((uint)row["slot_id"]);
message.AppendStringWithBreak((string)row["look"]);
message.AppendStringWithBreak((string)row["gender"]);
}
}
}
Session.SendMessage(message);
}
else
{
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.AddParamWithValue("userid", Session.GetHabbo().Id);
DataTable Row = adapter.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
if (Row == null)
{
message.AppendInt32(0);
}
else
{
message.AppendInt32(Row.Rows.Count);
foreach (DataRow row in Row.Rows)
{
message.AppendUInt((uint)row["slot_id"]);
message.AppendStringWithBreak((string)row["look"]);
message.AppendStringWithBreak((string)row["gender"]);
}
}
}
Session.SendMessage(message);
}
}
示例9: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
RoomItem class2 = @class.GetItem(Event.PopWiredUInt());
if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
{
ServerMessage Message = new ServerMessage(48u);
Message.AppendStringWithBreak(class2.Id.ToString());
Message.AppendStringWithBreak(class2.ExtraData);
Session.SendMessage(Message);
}
}
}
示例10: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight)
{
ServerMessage Message = new ServerMessage(651);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendStringWithBreak(Item.Extra1);
Message.AppendStringWithBreak("HHSAHH");
Session.SendMessage(Message);
}
}
示例11: parse
public void parse(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo() == null)
{
Session.Login(Event.PopFixedString());
if (Session.GetHabbo() != null && Session.GetHabbo().MutedUsers != null && Session.GetHabbo().MutedUsers.Count > 0)
{
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
try
{
ServerMessage Message = new ServerMessage(420);
Message.AppendInt32(Session.GetHabbo().MutedUsers.Count);
foreach (uint Id in Session.GetHabbo().MutedUsers)
{
string string_ = adapter.ReadString("SELECT username FROM users WHERE Id = " + Id + " 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;
}
}
}
}
}
示例12: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint Id = Event.PopWiredUInt();
Event.PopFixedString();
Event.PopWiredInt32();
RoomData Data = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(Id);
if (Data != null)
{
if (Data.Type == "private")
{
ServerMessage Message = new ServerMessage(286);
Message.AppendBoolean(Data.IsPublicRoom);
Message.AppendUInt(Id);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(453);
Message2.AppendUInt(Data.Id);
Message2.AppendStringWithBreak(Data.CCTs);
Message2.AppendUInt(Data.Id);
Session.SendMessage(Message2);
}
}
}
示例13: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(443);
Message.AppendInt32(Session.GetHabbo().AchievementScore);
Message.AppendStringWithBreak("");
Session.SendMessage(Message);
}
示例14: parse
public void parse(GameClient Session, ClientMessage Event)
{
if (Session != null && Session.GetHabbo() != null)
{
Room @class = PhoenixEnvironment.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().GetBadgeComponent().EquippedCount);
using (TimedLock.Lock(class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList))
{
foreach (Badge current in class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList)
{
if (current.Slot > 0)
{
Message.AppendInt32(current.Slot);
Message.AppendStringWithBreak(current.Code);
}
}
}
Session.SendMessage(Message);
}
}
}
}
示例15: parse
public void parse(GameClient Session, ClientMessage Event)
{
try
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
{
ServerMessage Message = new ServerMessage(365u);
Message.AppendInt32(@class.MoodlightData.Presets.Count);
Message.AppendInt32(@class.MoodlightData.CurrentPreset);
int num = 0;
foreach (MoodlightPreset current in @class.MoodlightData.Presets)
{
num++;
Message.AppendInt32(num);
Message.AppendInt32(int.Parse(PhoenixEnvironment.BoolToEnum(current.BackgroundOnly)) + 1);
Message.AppendStringWithBreak(current.ColorCode);
Message.AppendInt32(current.ColorIntensity);
}
Session.SendMessage(Message);
}
}
catch
{
}
}