本文整理汇总了C#中Messages.PopWiredInt32方法的典型用法代码示例。如果您正苦于以下问题:C# Messages.PopWiredInt32方法的具体用法?C# Messages.PopWiredInt32怎么用?C# Messages.PopWiredInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages.PopWiredInt32方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
int junk1 = Packet.PopWiredInt32();
int junk2 = Packet.PopWiredInt32();
uint RoomId = Packet.PopWiredUInt();
string Name = Packet.PopFixedString();
bool junk3 = Packet.PopWiredBoolean();
string Desc = Packet.PopFixedString();
SilverwaveEnvironment.GetGame().GetRoomEvents().AddNewEvent(RoomId, Name, Desc, Session);
Session.SendMessage(new PurchaseOKComposer());
Session.GetHabbo().Credits -= 500;
Session.GetHabbo().UpdateCreditsBalance();
}
示例2: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
/*if (SilverwaveEnvironment.GetDBConfig().DBData["catalogue_enabled"] != "1")
{
Session.SendNotif("The hotel managers have disabled the catalogue");
return;
}*/
int PageId = Packet.PopWiredInt32();
int ItemId = Packet.PopWiredInt32();
string ExtraData = Packet.PopFixedString();
int Amount = Packet.PopWiredInt32();
SilverwaveEnvironment.GetGame().GetCatalog().HandlePurchase(Session, PageId, ItemId, ExtraData, Amount, false, "", "", 0, 0, 0, false, 0);
}
示例3: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
if (SilverwaveEnvironment.GetDBConfig().DBData["gifts_enabled"] != "1")
{
Session.SendNotif("The hotel managers have disabled gifting");
return;
}
int PageId = Packet.PopWiredInt32();
int ItemId = Packet.PopWiredInt32();
string ExtraData = Packet.PopFixedString();
string GiftUser = Packet.PopFixedString();
string GiftMessage = Packet.PopFixedString();
int SpriteId = Packet.PopWiredInt32();
int Lazo = Packet.PopWiredInt32();
int Color = Packet.PopWiredInt32();
bool dnow = Packet.PopWiredBoolean();
SilverwaveEnvironment.GetGame().GetCatalog().HandlePurchase(Session, PageId, ItemId, ExtraData, 1, true, GiftUser, GiftMessage, SpriteId, Lazo, Color, dnow, 0);
}
示例4: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
int PageId = Packet.PopWiredInt32();
CatalogPage Page = SilverwaveEnvironment.GetGame().GetCatalog().GetPage(PageId);
if (Page == null || !Page.Enabled || !Page.Visible || Page.ComingSoon || Page.MinRank > Session.GetHabbo().Rank)
{
return;
}
else if (Page.MinSub > 0 && (!Session.GetHabbo().GetSubscriptionManager().HasSubscription || Session.GetHabbo().GetSubscriptionManager().GetSubscription().SubscriptionId < Page.MinSub))
{
return;
}
Session.SendMessage(new CatalogPageComposer(Page));
}
示例5: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
CatalogItem myItem = SilverwaveEnvironment.GetGame().GetCatalog().GetItemFromOffer(Packet.PopWiredInt32());
Session.SendMessage(new CatalogOfferMessageComposer(myItem));
}
示例6: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
if (!Session.GetHabbo().InRoom)
{
return;
}
Room Room = Session.GetHabbo().CurrentRoom;
string Params = Packet.PopFixedString();
string ToUser = Params.Split(' ')[0];
string Message = Params.Substring(ToUser.Length + 1);
int Bubble = Packet.PopWiredInt32();
RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
RoomUser User2 = Room.GetRoomUserManager().GetRoomUserByHabbo(ToUser);
Message = LanguageLocale.FilterSwearwords(Message);
if (User == null || User2 == null)
{
return;
}
if (Session.GetHabbo().Rank < 4 && Room.CheckMute(Session))
{
Session.SendNotif("You are unable to whisper as you are muted");
return;
}
bool ContainsBanned = LanguageLocale.CheckForBannedPhrases(Message) && Session.GetHabbo().Rank < 4;
//Room.AddChatlog(Session.GetHabbo().Id, "<Whisper to " + ToUser + ">: " + Message, ContainsBanned);
if (ContainsBanned)
{
Session.GetHabbo().BannedPhraseCount++;
if (Session.GetHabbo().BannedPhraseCount >= Convert.ToInt32(SilverwaveEnvironment.GetDBConfig().DBData["spambans.limit"]))
{
if (!String.IsNullOrWhiteSpace(Message))
{
SilverwaveEnvironment.GetGame().GetBanManager().BanUser(Session, "System", 788922000, "Spamming the following: " + Message, true, false);
return;
}
}
return;
}
int Colour = 0;
int MuteTime;
if (User.IncrementAndCheckFlood(out MuteTime))
{
Session.SendMessage(new FloodControlComposer(MuteTime));
return;
}
SilverwaveEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, HabboHotel.Quests.QuestType.SOCIAL_CHAT);
Colour = User.CheckChatColour(Bubble);
User.UnIdle();
User.GetClient().SendMessage(new WhisperComposer(User, Message, 0, Colour));
if (User2 != null && !User2.IsBot && User2.userID != User.userID)
{
if (User2.GetClient().GetHabbo().DisableWhisper)
{
User.GetClient().SendWhisper("This user does not allow whispers");
return;
}
else
{
if (!User2.GetClient().GetHabbo().MutedUsers.Contains(Session.GetHabbo().Id))
{
User2.GetClient().SendMessage(new WhisperComposer(User, Message, 0, Colour));
}
}
}
List<RoomUser> ToNotify = Room.GetRoomUserManager().GetRoomUserByRank(4);
if (ToNotify.Count > 0)
{
foreach (RoomUser user in ToNotify)
{
if (user != null)
{
if (user.HabboId != User2.HabboId && user.HabboId != User.HabboId)
{
if (user.GetClient() != null)
{
user.GetClient().SendMessage(new WhisperComposer(User, LanguageLocale.GetValue("moderation.whisper") + ToUser + ": " + Message, 0, Colour));
}
}
}
}
}
}
示例7: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
if (!Session.GetHabbo().InRoom)
{
return;
}
Room Room = Session.GetHabbo().CurrentRoom;
RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
string Message = Packet.PopFixedString();
int Colour = Packet.PopWiredInt32();
int CountUselessSulakeStuff = Packet.PopWiredInt32();
if (User == null)
{
return;
}
if (Session.GetHabbo().Rank < 4 && Room.CheckMute(Session))
{
Session.SendNotif("You are unable to talk as you are muted");
return;
}
if (Message.StartsWith(":"))
{
Colour = User.LastBubble;
}
else
{
User.LastBubble = Colour;
}
if (Message.StartsWith(":") && ChatCommandHandler.Parse(Session, Message))
{
return;
}
bool ContainsBanned = LanguageLocale.CheckForBannedPhrases(Message) && Session.GetHabbo().Rank < 4;
//Room.AddChatlog(Session.GetHabbo().Id, Message, ContainsBanned);
if (ContainsBanned)
{
Session.GetHabbo().BannedPhraseCount++;
if (Session.GetHabbo().BannedPhraseCount >= Convert.ToInt32(SilverwaveEnvironment.GetDBConfig().DBData["spambans.limit"]))
{
if (!String.IsNullOrWhiteSpace(Message))
{
SilverwaveEnvironment.GetGame().GetBanManager().BanUser(Session, "System", 788922000, "Spamming the following: " + Message, true, false);
return;
}
}
return;
}
Message = LanguageLocale.FilterSwearwords(Message);
int MuteTime;
if (User.IncrementAndCheckFlood(out MuteTime))
{
Session.SendMessage(new FloodControlComposer(MuteTime));
return;
}
SilverwaveEnvironment.GetGame().GetQuestManager().ProgressUserQuest(Session, HabboHotel.Quests.QuestType.SOCIAL_CHAT);
User.UnIdle();
//User.OnChat(Colour, Message, false);
User.Chat(Session, Message, false,CountUselessSulakeStuff,Colour);
}