本文整理汇总了C#中Phoenix.Messages.ServerMessage类的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage类的具体用法?C# ServerMessage怎么用?C# ServerMessage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServerMessage类属于Phoenix.Messages命名空间,在下文中一共展示了ServerMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(308);
Message.AppendInt32(Session.GetHabbo().Volume);
Message.AppendBoolean(false);
Session.SendMessage(Message);
}
示例2: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(611);
Message.AppendBoolean(true);
Message.AppendInt32(2);
Session.SendMessage(Message);
}
示例3: 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;
}
}
}
}
}
示例4: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(443);
Message.AppendInt32(Session.GetHabbo().AchievementScore);
Message.AppendStringWithBreak("");
Session.SendMessage(Message);
}
示例5: 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);
}
}
}
示例6: 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);
}
示例7: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
roomUserByHabbo.Unidle();
int i = Event.PopWiredInt32();
if (i < 0 || i > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && i > 1))
{
i = 0;
}
if (i > 0 && roomUserByHabbo.CarryItemID > 0)
{
roomUserByHabbo.CarryItem(0);
}
roomUserByHabbo.DanceId = i;
ServerMessage Message = new ServerMessage(480);
Message.AppendInt32(roomUserByHabbo.VirtualId);
Message.AppendInt32(i);
room.SendMessage(Message, null);
if (Session.GetHabbo().CurrentQuestId == 6)
{
PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(6, Session);
}
}
示例8: 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);
}
}
}
}
示例9: 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);
}
}
示例10: 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);
}
示例11: 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);
}
}
示例12: 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
{
}
}
示例13: 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);
}
示例14: 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);
}
}
示例15: 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);
}
}