本文整理汇总了C#中Phoenix.Messages.ServerMessage.AppendBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendBoolean方法的具体用法?C# ServerMessage.AppendBoolean怎么用?C# ServerMessage.AppendBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phoenix.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Trade
public Trade(uint mUserOneId, uint mUserTwoId, uint mRoomId)
{
this.oneId = mUserOneId;
this.twoId = mUserTwoId;
this.Users = new TradeUser[2];
this.Users[0] = new TradeUser(mUserOneId, mRoomId);
this.Users[1] = new TradeUser(mUserTwoId, mRoomId);
this.TradeStage = 1;
this.RoomId = mRoomId;
foreach (TradeUser User in Users)
{
if (!User.GetRoomUser().Statusses.ContainsKey("trd"))
{
User.GetRoomUser().AddStatus("trd", "");
User.GetRoomUser().UpdateNeeded = true;
}
}
ServerMessage Message = new ServerMessage(104);
Message.AppendUInt(mUserOneId);
Message.AppendBoolean(true);
Message.AppendUInt(mUserTwoId);
Message.AppendBoolean(true);
this.SendMessageToUsers(Message);
}
示例2: 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);
}
}
示例3: parse
public void parse(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().GetSubscription("habbo_vip").ExpireTime;
double num2 = num - PhoenixEnvironment.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().GetSubscription(text).ExpireTime;
double num2 = num - PhoenixEnvironment.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);
}
示例4: 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);
}
}
示例5: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(512);
if (Session.GetHabbo().UsersRooms.Count > GlobalClass.MaxRoomsPerUser)
{
Message.AppendBoolean(true);
Message.AppendInt32(GlobalClass.MaxRoomsPerUser);
}
else
{
Message.AppendBoolean(false);
}
Session.SendMessage(Message);
}
示例6: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(5);
Message.AppendStringWithBreak(Session.GetHabbo().Id.ToString());
Message.AppendStringWithBreak(Session.GetHabbo().Username);
Message.AppendStringWithBreak(Session.GetHabbo().Look);
Message.AppendStringWithBreak(Session.GetHabbo().Gender.ToUpper());
Message.AppendStringWithBreak(Session.GetHabbo().Motto);
Message.AppendStringWithBreak(Session.GetHabbo().RealName);
Message.AppendBoolean(false);
Message.AppendInt32(Session.GetHabbo().Respect);
Message.AppendInt32(Session.GetHabbo().DailyRespectPoints);
Message.AppendInt32(Session.GetHabbo().DailyPetRespectPoints);
Message.AppendBoolean(false);
Session.SendMessage(Message);
}
示例7: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(611);
Message.AppendBoolean(true);
Message.AppendInt32(2);
Session.SendMessage(Message);
}
示例8: 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);
}
}
}
示例9: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(308);
Message.AppendInt32(Session.GetHabbo().Volume);
Message.AppendBoolean(false);
Session.SendMessage(Message);
}
示例10: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint RoomId = Event.PopWiredUInt();
bool unk = Event.PopWiredBoolean();
bool unk2 = Event.PopWiredBoolean();
RoomData Data = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(RoomId);
if (Data != null)
{
ServerMessage Message = new ServerMessage(454);
Message.AppendBoolean(unk);
Data.Serialize(Message, false, unk2);
Message.AppendBoolean(unk2);
Message.AppendBoolean(unk);
Session.SendMessage(Message);
}
}
示例11: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room Room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (Room != null && Room.CheckRights(Session, true))
{
Event.PopWiredInt32();
Dictionary<int, int> Items = new Dictionary<int, int>();
int BackgroundImage = Event.PopWiredInt32();
int ForegroundImage = Event.PopWiredInt32();
int num3 = Event.PopWiredInt32();
for (int i = 0; i < num3; i++)
{
int num4 = Event.PopWiredInt32();
int num5 = Event.PopWiredInt32();
if (num4 < 0 || num4 > 10 || (num5 < 1 || num5 > 27) || Items.ContainsKey(num4))
{
return;
}
Items.Add(num4, num5);
}
if (BackgroundImage >= 1 && BackgroundImage <= 24 && (ForegroundImage >= 0 && ForegroundImage <= 11))
{
StringBuilder stringBuilder = new StringBuilder();
int num6 = 0;
foreach (KeyValuePair<int, int> Item in Items)
{
if (num6 > 0)
{
stringBuilder.Append("|");
}
stringBuilder.Append(Item.Key + "," + Item.Value);
num6++;
}
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery("UPDATE rooms SET icon_bg = '" + BackgroundImage + "', icon_fg = '" + ForegroundImage + "', icon_items = '" + stringBuilder.ToString() + "' WHERE Id = '" + Room.RoomId + "' LIMIT 1");
}
Room.myIcon = new RoomIcon(BackgroundImage, ForegroundImage, Items);
ServerMessage Message = new ServerMessage(457);
Message.AppendUInt(Room.RoomId);
Message.AppendBoolean(true);
Session.SendMessage(Message);
ServerMessage Message2 = new ServerMessage(456);
Message2.AppendUInt(Room.RoomId);
Session.SendMessage(Message2);
RoomData Data = Room.RoomData;
ServerMessage Message3 = new ServerMessage(454);
Message3.AppendBoolean(false);
Data.Serialize(Message3, false, false);
Session.SendMessage(Message3);
}
}
}
示例12: parse
public void parse(GameClient Session, ClientMessage Event)
{
int num = Event.PopWiredInt32();
if (num > 0 && (Session != null && Session.GetHabbo() != null))
{
Session.GetHabbo().GroupID = 0;
if (Session.GetHabbo().InRoom)
{
Room class14_ = Session.GetHabbo().CurrentRoom;
RoomUser @class = class14_.GetRoomUserByHabbo(Session.GetHabbo().Id);
ServerMessage Message = new ServerMessage(28u);
Message.AppendInt32(1);
@class.Serialize(Message);
class14_.SendMessage(Message, null);
}
using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient())
{
class2.ExecuteQuery("UPDATE user_stats SET groupid = 0 WHERE Id = " + Session.GetHabbo().Id + " LIMIT 1;");
}
DataTable dataTable_ = Session.GetHabbo().GroupMemberships;
if (dataTable_ != null)
{
ServerMessage Message2 = new ServerMessage(915u);
Message2.AppendInt32(dataTable_.Rows.Count);
foreach (DataRow dataRow in dataTable_.Rows)
{
Group class3 = GroupManager.GetGroup((int)dataRow["groupid"]);
Message2.AppendInt32(class3.Id);
Message2.AppendStringWithBreak(class3.Name);
Message2.AppendStringWithBreak(class3.Badge);
if (Session.GetHabbo().GroupID == class3.Id)
{
Message2.AppendBoolean(true);
}
else
{
Message2.AppendBoolean(false);
}
}
Session.SendMessage(Message2);
}
}
}
示例13: parse
public void parse(GameClient Session, ClientMessage Event)
{
Dictionary<Room, int> dictionary = PhoenixEnvironment.GetGame().GetRoomManager().method_21();
Room @class = null;
IEnumerable<Room> arg_35_0 = dictionary.Keys;
if (FindNewFriendsMessageEvent.func_0 == null)
{
FindNewFriendsMessageEvent.func_0 = new Func<Room, int>(FindNewFriendsMessageEvent.smethod_0);
}
IOrderedEnumerable<Room> orderedEnumerable = arg_35_0.OrderByDescending(FindNewFriendsMessageEvent.func_0);
int num = 0;
foreach (Room current in orderedEnumerable)
{
num++;
string a = PhoenixEnvironment.GetRandomNumber(1, 5).ToString();
if (a == "2")
{
goto IL_83;
}
if (num == orderedEnumerable.Count<Room>())
{
goto IL_83;
}
bool arg_A2_0 = true;
IL_A2:
if (arg_A2_0)
{
continue;
}
@class = current;
break;
IL_83:
arg_A2_0 = (Session.GetHabbo().CurrentRoom == null || Session.GetHabbo().CurrentRoom == current);
goto IL_A2;
}
if (@class == null)
{
ServerMessage Message = new ServerMessage(831u);
Message.AppendBoolean(false);
Session.SendMessage(Message);
}
else
{
ServerMessage Message2 = new ServerMessage(286u);
Message2.AppendBoolean(@class.IsPublic);
Message2.AppendUInt(@class.RoomId);
Session.SendMessage(Message2);
ServerMessage Message3 = new ServerMessage(831u);
Message3.AppendBoolean(true);
Session.SendMessage(Message3);
}
}
示例14: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint Id = Event.PopWiredUInt();
CatalogItem Item = PhoenixEnvironment.GetGame().GetCatalog().FindItem(Id);
if (Item != null)
{
ServerMessage Message = new ServerMessage(622);
Message.AppendUInt(Item.Id);
Message.AppendBoolean(Item.GetBaseItem().AllowGift);
Session.SendMessage(Message);
}
}
示例15: Serialize
public void Serialize(ServerMessage Message, GameClient Session, bool Single)
{
Message.AppendStringWithBreak(Type);
if (Session.GetHabbo().CompletedQuests.Contains(Id))
{
Message.AppendInt32(Level);
}
else
{
Message.AppendInt32(Level - 1);
}
Message.AppendInt32(PhoenixEnvironment.GetGame().GetQuestManager().GetHighestLevelForType(Type));
if (PhoenixEnvironment.GetGame().GetQuestManager().GetHighestLevelForType(Type) == Level && Session.GetHabbo().CompletedQuests.Contains(Id) && !Single)
{
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendStringWithBreak("");
Message.AppendStringWithBreak("");
Message.AppendInt32(0);
Message.AppendStringWithBreak("");
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(0);
}
else
{
Message.AppendBoolean(false);
Message.AppendUInt(Id);
Message.AppendBoolean(Session.GetHabbo().CurrentQuestId == Id);
Message.AppendStringWithBreak(Action.StartsWith("FIND") ? "FIND_STUFF" : Action);
Message.AppendStringWithBreak("_2");
Message.AppendInt32(PixelReward);
Message.AppendStringWithBreak(Action.Replace("_", ""));
Message.AppendInt32(Session.GetHabbo().CurrentQuestProgress);
Message.AppendInt32(NeedForLevel);
Message.AppendInt32(0);
}
}