本文整理汇总了C#中Phoenix.Messages.ServerMessage.AppendString方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendString方法的具体用法?C# ServerMessage.AppendString怎么用?C# ServerMessage.AppendString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phoenix.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
{
if (UserHasRight)
{
Item.method_9();
ServerMessage Message = new ServerMessage(651);
Message.AppendInt32(0);
Message.AppendInt32(5);
if (Item.Extra4.Length > 0)
{
Message.AppendString(Item.Extra4);
}
else
{
Message.AppendInt32(0);
}
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendStringWithBreak("");
Message.AppendString("J");
if (Item.Extra1.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(Item.Extra1));
}
else
{
Message.AppendInt32(0);
}
if (Item.Extra2.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(Item.Extra2));
}
else
{
Message.AppendInt32(0);
}
Message.AppendString("HPA");
if (Item.Extra5.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(Item.Extra5));
}
else
{
Message.AppendInt32(0);
}
Message.AppendStringWithBreak("H");
Session.SendMessage(Message);
}
}
示例3: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint num = Event.PopWiredUInt();
string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
if (Session.GetHabbo().GetMessenger() != null)
{
if (num == 0 && Session.GetHabbo().HasRole("cmd_sa"))
{
ServerMessage Message = new ServerMessage(134);
Message.AppendUInt(0);
Message.AppendString(Session.GetHabbo().Username + ": " + text);
PhoenixEnvironment.GetGame().GetClientManager().SendStaffChat(Session, Message);
}
else
{
if (num == 0)
{
ServerMessage Message2 = new ServerMessage(261);
Message2.AppendInt32(4);
Message2.AppendUInt(0);
Session.SendMessage(Message2);
}
else
{
Session.GetHabbo().GetMessenger().method_18(num, text);
}
}
}
}
示例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(0);
Message.AppendInt32(0);
Message.AppendInt32(Item.GetBaseItem().SpriteId);
Message.AppendUInt(Item.Id);
Message.AppendString(Item.Extra1);
Session.SendMessage(Message);
}
}
示例5: 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().SpriteId);
Message.AppendUInt(RoomItem_0.Id);
Message.AppendStringWithBreak("");
Message.AppendString("I");
if (RoomItem_0.Extra2.Length > 0)
{
Message.AppendString(RoomItem_0.Extra2);
}
else
{
Message.AppendString("I");
}
Message.AppendStringWithBreak("IKH");
Session.SendMessage(Message);
}
}
示例6: Parse
//.........这里部分代码省略.........
}
return false;
#endregion
#region CMD GlobalPoints
case 18: //CMD GlobalPoints
if (Session.GetHabbo().HasRole("cmd_globalpoints"))
{
try
{
int pointsToAdd = int.Parse(Params[1]);
PhoenixEnvironment.GetGame().GetClientManager().GivePoints(pointsToAdd, false);
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery("UPDATE users SET vip_points = vip_points + " + pointsToAdd);
}
}
catch
{
Session.SendNotif("Input must be a number");
}
PhoenixEnvironment.GetGame().GetClientManager().RecordCmdLogs(Session, Params[0].ToLower(), Input);
return true;
}
return false;
#endregion
#region CMD HaL
case 19: //CMD HaL
if (Session.GetHabbo().HasRole("cmd_hal"))
{
string msg = Params[1];
Input = Input.Substring(4).Replace(msg, "");
string url = Input.Substring(1);
ServerMessage Message = new ServerMessage(161);
Message.AppendStringWithBreak(string.Concat(new string[]
{
TextManager.GetText("cmd_hal_title"),
"\r\n",
url,
"\r\n-",
Session.GetHabbo().Username
}));
Message.AppendStringWithBreak(msg);
PhoenixEnvironment.GetGame().GetClientManager().BroadcastMessage(Message);
PhoenixEnvironment.GetGame().GetClientManager().RecordCmdLogs(Session, Params[0].ToLower(), Input);
return true;
}
return false;
#endregion
#region CMD Ha
case 20: //CMD Ha
if (Session.GetHabbo().HasRole("cmd_ha"))
{
string notice = Input.Substring(3);
ServerMessage Message2 = new ServerMessage(808);
Message2.AppendStringWithBreak(TextManager.GetText("cmd_ha_title"));
Message2.AppendStringWithBreak(notice + "\r\n- " + Session.GetHabbo().Username);
ServerMessage Message3 = new ServerMessage(161);
Message3.AppendStringWithBreak(notice + "\r\n- " + Session.GetHabbo().Username);
PhoenixEnvironment.GetGame().GetClientManager().BroadcastMessage(Message2, Message3);
PhoenixEnvironment.GetGame().GetClientManager().RecordCmdLogs(Session, Params[0].ToLower(), Input);
return true;
}
return false;
#endregion
#region CMD Invisible
case 21: //CMD Invisible
示例7: Serialize
internal void Serialize(ServerMessage Message)
{
if (this.IsFloorItem)
{
Message.AppendUInt(this.Id);
Message.AppendInt32(this.GetBaseItem().SpriteId);
Message.AppendInt32(this.mX);
Message.AppendInt32(this.mY);
Message.AppendInt32(this.Rot);
Message.AppendStringWithBreak(this.mZ.ToString().Replace(',', '.'));
if (this.GetBaseItem().Name == "song_disk" && this.ExtraData.Length > 0)
{
Message.AppendInt32(Convert.ToInt32(this.ExtraData));
Message.AppendStringWithBreak("");
}
else
{
Message.AppendInt32(0);
Message.AppendStringWithBreak(this.ExtraData);
}
Message.AppendInt32(-1);
Message.AppendBoolean(!(this.GetBaseItem().InteractionType.ToLower() == "default"));
}
else
{
if (this.IsWallItem)
{
Message.AppendStringWithBreak(string.Concat(this.Id));
Message.AppendInt32(this.GetBaseItem().SpriteId);
Message.AppendStringWithBreak(this.string_7);
if (this.GetBaseItem().Name.StartsWith("poster_"))
{
Message.AppendString(this.GetBaseItem().Name.Split(new char[]
{
'_'
})[1]);
}
string text = this.GetBaseItem().InteractionType.ToLower();
if (text != null && text == "postit")
{
Message.AppendStringWithBreak(this.ExtraData.Split(new char[]
{
' '
})[0]);
}
else
{
Message.AppendStringWithBreak(this.ExtraData);
}
Message.AppendBoolean(!(this.GetBaseItem().InteractionType == "default"));
}
}
}
示例8: processCommand
//.........这里部分代码省略.........
}
break;
case "reloadbans":
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
PhoenixEnvironment.GetGame().GetBanManager().LoadBans(adapter);
}
PhoenixEnvironment.GetGame().GetClientManager().CheckForAllBanConflicts();
break;
case "update_bots":
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
PhoenixEnvironment.GetGame().GetBotManager().LoadBots(adapter);
}
break;
case "signout":
PhoenixEnvironment.GetGame().GetClientManager().GetClientByHabbo(uint.Parse(s)).Disconnect();
break;
case "exe":
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery(s);
}
break;
case "alert":
string text6 = s.Split(new char[] { ' ' })[0];
text5 = s.Substring(text6.Length + 1);
ServerMessage Message8 = new ServerMessage(808);
Message8.AppendStringWithBreak(TextManager.GetText("mus_alert_title"));
Message8.AppendStringWithBreak(text5);
PhoenixEnvironment.GetGame().GetClientManager().GetClientByHabbo(uint.Parse(text6)).SendMessage(Message8);
break;
case "sa":
ServerMessage Message = new ServerMessage(134);
Message.AppendUInt(0);
Message.AppendString("PHX: " + s);
PhoenixEnvironment.GetGame().GetClientManager().BroadcastMessageToStaff(Message, Message);
break;
case "ha":
ServerMessage Message2 = new ServerMessage(808);
Message2.AppendStringWithBreak(TextManager.GetText("mus_ha_title"));
Message2.AppendStringWithBreak(s);
ServerMessage hotelView = new ServerMessage(161);
hotelView.AppendStringWithBreak(s);
PhoenixEnvironment.GetGame().GetClientManager().BroadcastMessage(Message2, hotelView);
break;
case "hal":
string text4 = s.Split(new char[] { ' ' })[0];
text5 = s.Substring(text4.Length + 1);
ServerMessage Message4 = new ServerMessage(161u);
Message4.AppendStringWithBreak(string.Concat(new string[]
{
TextManager.GetText("mus_hal_title"),
"\r\n",
text5,
"\r\n-",
TextManager.GetText("mus_hal_tail")
}));
示例9: SerializeWallItemInventory
public ServerMessage SerializeWallItemInventory()
{
ServerMessage Message = new ServerMessage(140);
Message.AppendStringWithBreak("I");
Message.AppendString("II");
Message.AppendInt32(0);
return Message;
}
示例10: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(827);
string text = Event.ToString().Split(new char[]
{
' '
})[1];
if (text.ToLower().Contains("pet"))
{
int PetType = Convert.ToInt32(text.Substring(3));
Message.AppendStringWithBreak("a0 pet" + PetType);
switch (PetType)
{
case 0:
Message.AppendString(TextManager.GetText("pet_breeds_0"));
break;
case 1:
Message.AppendString(TextManager.GetText("pet_breeds_1"));
break;
case 2:
Message.AppendString(TextManager.GetText("pet_breeds_2"));
break;
case 3:
Message.AppendString(TextManager.GetText("pet_breeds_3"));
break;
case 4:
Message.AppendString(TextManager.GetText("pet_breeds_4"));
break;
case 5:
Message.AppendString(TextManager.GetText("pet_breeds_5"));
break;
case 6:
Message.AppendString(TextManager.GetText("pet_breeds_6"));
break;
case 7:
Message.AppendString(TextManager.GetText("pet_breeds_7"));
break;
case 8:
Message.AppendString(TextManager.GetText("pet_breeds_8"));
break;
case 9:
Message.AppendString(TextManager.GetText("pet_breeds_9"));
break;
case 10:
Message.AppendString(TextManager.GetText("pet_breeds_10"));
break;
case 11:
Message.AppendString(TextManager.GetText("pet_breeds_11"));
break;
case 12:
Message.AppendString(TextManager.GetText("pet_breeds_12"));
break;
case 13:
Message.AppendString(TextManager.GetText("pet_breeds_13"));
break;
case 14:
Message.AppendString(TextManager.GetText("pet_breeds_14"));
break;
case 15:
Message.AppendString(TextManager.GetText("pet_breeds_15"));
break;
case 16:
Message.AppendString(TextManager.GetText("pet_breeds_16"));
break;
case 17:
Message.AppendString(TextManager.GetText("pet_breeds_17"));
break;
case 18:
Message.AppendString(TextManager.GetText("pet_breeds_18"));
break;
case 19:
Message.AppendString(TextManager.GetText("pet_breeds_19"));
break;
case 20:
Message.AppendString(TextManager.GetText("pet_breeds_20"));
break;
case 21:
Message.AppendString(TextManager.GetText("pet_breeds_21"));
break;
case 22:
Message.AppendString(TextManager.GetText("pet_breeds_22"));
break;
case 23:
Message.AppendString(TextManager.GetText("pet_breeds_23"));
break;
case 24:
Message.AppendString(TextManager.GetText("pet_breeds_24"));
break;
case 25:
Message.AppendString(TextManager.GetText("pet_breeds_25"));
break;
case 26:
Message.AppendString(TextManager.GetText("pet_breeds_26"));
break;
case 27:
Message.AppendString(TextManager.GetText("pet_breeds_27"));
break;
case 28:
Message.AppendString(TextManager.GetText("pet_breeds_28"));
break;
//.........这里部分代码省略.........
示例11: method_2
public ServerMessage method_2()
{
ServerMessage Message = new ServerMessage(470u);
string[] array = this.Heightmap.Split(new char[]
{
Convert.ToChar(13)
});
for (int i = 0; i < this.MapSizeY; i++)
{
if (i > 0)
{
array[i] = array[i].Substring(1);
}
for (int j = 0; j < this.MapSizeX; j++)
{
string text = array[i].Substring(j, 1).Trim().ToLower();
if (this.DoorX == j && this.DoorY == i)
{
text = string.Concat((int)this.DoorZ);
}
Message.AppendString(text);
}
Message.AppendString(string.Concat(Convert.ToChar(13)));
}
return Message;
}
示例12: parse
public void parse(GameClient Session, ClientMessage Request)
{
string text = PhoenixEnvironment.FilterInjectionChars(Request.PopFixedString(), false, true);
if (text.Length < 3)
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("J");
Session.SendMessage(Message);
}
else
{
if (text.Length > 15)
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("K");
Session.SendMessage(Message);
}
else
{
if (text.Contains(" ") || !Session.GetMessageHandler().NameFree(text) || text != ChatCommandHandler.ApplyWordFilter(text))
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("QA");
Session.SendMessage(Message);
}
else
{
if (Request.Header == "GW")
{
ServerMessage Message = new ServerMessage(571u);
Message.AppendString("H");
Message.AppendString(text);
Session.SendMessage(Message);
}
else
{
if (Request.Header == "GV")
{
ServerMessage Message2 = new ServerMessage(570u);
Message2.AppendString("H");
Session.SendMessage(Message2);
ServerMessage Message3 = new ServerMessage(572u);
Message3.AppendUInt(Session.GetHabbo().Id);
Message3.AppendString("H");
Message3.AppendString(text);
Session.SendMessage(Message3);
if (Session.GetHabbo().CurrentRoomId > 0u)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
RoomUser class2 = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);
ServerMessage Message4 = new ServerMessage(28u);
Message4.AppendInt32(1);
class2.Serialize(Message4);
@class.SendMessage(Message4, null);
}
Dictionary<Room, int> dictionary = PhoenixEnvironment.GetGame().GetRoomManager().method_22();
IEnumerable<Room> arg_204_0 = dictionary.Keys;
if (ChangeUserNameMessageEvent.func_0 == null)
{
ChangeUserNameMessageEvent.func_0 = new Func<Room, int>(ChangeUserNameMessageEvent.smethod_0);
}
IOrderedEnumerable<Room> orderedEnumerable = arg_204_0.OrderByDescending(ChangeUserNameMessageEvent.func_0);
foreach (Room current in orderedEnumerable)
{
if (current.Owner == Session.GetHabbo().Username)
{
current.Owner = text;
PhoenixEnvironment.GetGame().GetRoomManager().UnloadRoom(PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(current.RoomId));
}
}
using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new string[]
{
"UPDATE rooms SET owner = '",
text,
"' WHERE owner = '",
Session.GetHabbo().Username,
"'"
}));
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE users SET username = '",
text,
"' WHERE Id = '",
Session.GetHabbo().Id,
"' LIMIT 1"
}));
PhoenixEnvironment.GetGame().GetClientManager().RecordCmdLogs(Session, "flagme", "OldName: " + Session.GetHabbo().Username + " NewName: " + text);
Session.GetHabbo().Username = text;
Session.GetHabbo().UpdateRooms(class3);
foreach (RoomData current2 in Session.GetHabbo().UsersRooms)
{
current2.Owner = text;
}
}
PhoenixEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 9u, 1);
}
}
}
//.........这里部分代码省略.........
示例13: method_42
private void method_42(RoomUser RoomUser_1, Coord gstruct1_1, uint uint_2, double double_3)
{
ServerMessage Message = new ServerMessage();
Message.Init(230u);
Message.AppendInt32(RoomUser_1.X);
Message.AppendInt32(RoomUser_1.Y);
Message.AppendInt32(gstruct1_1.X);
Message.AppendInt32(gstruct1_1.Y);
Message.AppendInt32(0);
Message.AppendUInt(uint_2);
Message.AppendString("J");
Message.AppendInt32(RoomUser_1.VirtualId);
Message.AppendStringWithBreak(RoomUser_1.Z.ToString().Replace(',', '.'));
Message.AppendStringWithBreak(double_3.ToString().Replace(',', '.'));
this.SendMessage(Message, null);
this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 1;
RoomUser_1.X = gstruct1_1.X;
RoomUser_1.Y = gstruct1_1.Y;
RoomUser_1.Z = double_3;
RoomUser_1.SetX = gstruct1_1.X;
RoomUser_1.SetY = gstruct1_1.Y;
RoomUser_1.SetZ = double_3;
RoomUser_1.int_9 = 2;
this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 0;
this.UpdateUserStatus(RoomUser_1, false, true);
}
示例14: DeliverInstantMessage
internal void DeliverInstantMessage(string message, uint convoID)
{
ServerMessage InstantMessage = new ServerMessage(134);
InstantMessage.AppendUInt(convoID);
InstantMessage.AppendString(message);
GetClient().SendMessage(InstantMessage);
}
示例15: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
{
Room room = Item.GetRoom();
RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (roomUserByHabbo != null && room != null)
{
Coord coord = new Coord(Item.GetX + 1, Item.GetY);
Coord coord2 = new Coord(Item.GetX - 1, Item.GetY);
Coord coord3 = new Coord(Item.GetX, Item.GetY + 1);
Coord coord4 = new Coord(Item.GetX, Item.GetY - 1);
if ((roomUserByHabbo.Coordinate != coord) && (roomUserByHabbo.Coordinate != coord2) && (roomUserByHabbo.Coordinate != coord3) && (roomUserByHabbo.Coordinate != coord4))
{
if (roomUserByHabbo.CanWalk)
{
roomUserByHabbo.MoveTo(Item.Coordinate);
}
}
else
{
int num = Item.GetX;
int num2 = Item.GetY;
if (roomUserByHabbo.Coordinate == coord)
{
num = Item.GetX - 1;
num2 = Item.GetY;
}
else
{
if (roomUserByHabbo.Coordinate == coord2)
{
num = Item.GetX + 1;
num2 = Item.GetY;
}
else
{
if (roomUserByHabbo.Coordinate == coord3)
{
num = Item.GetX;
num2 = Item.GetY - 1;
}
else
{
if (roomUserByHabbo.Coordinate == coord4)
{
num = Item.GetX;
num2 = Item.GetY + 1;
}
}
}
}
if (room.method_37(num, num2, true, true, true, true, false))
{
List<RoomItem> list_ = new List<RoomItem>();
list_ = room.method_93(num, num2);
double double_ = room.method_84(num, num2, list_);
ServerMessage Message = new ServerMessage(230u);
Message.AppendInt32(Item.GetX);
Message.AppendInt32(Item.GetY);
Message.AppendInt32(num);
Message.AppendInt32(num2);
Message.AppendInt32(1);
Message.AppendUInt(Item.Id);
Message.AppendByte(2);
Message.AppendStringWithBreak(double_.ToString());
Message.AppendString("M");
room.SendMessage(Message, null);
room.method_81(Item, num, num2, double_);
}
}
}
}