本文整理汇总了C#中ServerMessage.AddUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AddUInt32方法的具体用法?C# ServerMessage.AddUInt32怎么用?C# ServerMessage.AddUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AddUInt32方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SerializeWall
internal void SerializeWall(ServerMessage Message, Boolean Inventory)
{
Message.AddUInt32(itemID);
Message.AddChar(char.ToUpper(itemBase.Type));
Message.AddUInt32(itemID);
Message.AddInt32(GetBaseItem().SpriteId);
if (GetBaseItem().Name.Contains("a2"))
Message.AddInt32(3);
else if (GetBaseItem().Name.Contains("wallpaper"))
Message.AddInt32(2);
else if (GetBaseItem().Name.Contains("landscape"))
Message.AddInt32(4);
else
Message.AddInt32(1);
Message.AddInt32(0);
Message.AddString(extraData);
Message.AddBoolean(false); //recycle
Message.AddBoolean(GetBaseItem().AllowTrade);
Message.AddBoolean(GetBaseItem().AllowInventoryStack);
Message.AddBoolean(false); //marketplace
Message.AddInt32(-1);
Message.AddBoolean(false);
Message.AddInt32(-1);
}
示例2: Serialize
internal void Serialize(ref ServerMessage packet)
{
packet.AddInt32((int)ButterflyEnvironment.GetUnixTimestamp());
packet.AddUInt32(userID);
packet.AddString(username);
packet.AddString(message);
packet.AddBoolean(false); // reported msg
}
示例3: Serialize
internal void Serialize(ServerMessage Request)
{
Request.AddUInt32(FromUser);
Request.AddString(mUsername);
Request.AddString("");
}
示例4: SerializeInventory
internal void SerializeInventory(ServerMessage message)
{
message.AddUInt32(petID);
message.AddString(name);
message.AddUInt32(petType);
message.AddInt32(int.Parse(race));
message.AddString(color);
message.AddInt32(0);
message.AddInt32(0);
message.AddInt32(Level);
}
示例5: SerializeQuest
internal static void SerializeQuest(ServerMessage Message, GameClient Session, Quest Quest, string Category)
{
int AmountInCat = ButterflyEnvironment.GetGame().GetQuestManager().GetAmountOfQuestsInCategory(Category);
int Number = Quest == null ? AmountInCat : Quest.Number - 1;
int UserProgress = Quest == null ? 0 : Session.GetHabbo().GetQuestProgress(Quest.Id);
if (Quest != null && Quest.IsCompleted(UserProgress))
{
Number++;
}
Message.AddString(Category);
Message.AddInt32(Number); // Quest progress in this cat
Message.AddInt32(AmountInCat); // Total quests in this cat
Message.AddInt32((int)QuestRewardType.Pixels); // Reward type (1 = Snowflakes, 2 = Love hearts, 3 = Pixels, 4 = Seashells, everything else is pixels
Message.AddUInt32(Quest == null ? 0 : Quest.Id); // Quest id
Message.AddBoolean(Quest == null ? false : Session.GetHabbo().CurrentQuestId == Quest.Id); // Quest started
Message.AddString(Quest == null ? string.Empty : Quest.ActionName);
Message.AddString(Quest == null ? string.Empty : Quest.DataBit);
Message.AddInt32(Quest == null ? 0 : Quest.Reward);
Message.AddString(Quest == null ? string.Empty : Quest.Name);
Message.AddInt32(UserProgress); // Current progress
Message.AddUInt32(Quest == null ? 0 : Quest.GoalData); // Target progress
Message.AddInt32(0); // "Next quest available countdown" in seconds
Message.AddString(string.Empty); //set_kuurna
Message.AddString(string.Empty); // MAIN_CHAIN
Message.AddBoolean(true); // Euh?
}
示例6: Serialize
internal ServerMessage Serialize(ServerMessage Response)
{
//ServerMessage Response = PacketHandelingManager.GetRecycledItem(OutputCode.IssueInfoMessageEvent);
Response.AddUInt32(TicketId);
Response.AddInt32(TabId);
Response.AddInt32(Type);
Response.AddInt32(CategoryId);
Response.AddInt32((int)Math.Ceiling((ButterflyEnvironment.GetUnixTimestamp() - Timestamp) * 3600));
Response.AddInt32(Score);
Response.AddUInt32(RoomId);
Response.AddUInt32(SenderId);
Response.AddString(ButterflyEnvironment.GetGame().GetClientManager().GetNameById(SenderId)); // Reporter User Name
Response.AddUInt32(ReportedId);
Response.AddString(ButterflyEnvironment.GetGame().GetClientManager().GetNameById(ReportedId)); // Reported User Name
Response.AddUInt32(ModeratorId);
Response.AddString(ButterflyEnvironment.GetGame().GetClientManager().GetNameById(ModeratorId));// Moderator Name
Response.AddString(Message);
Response.AddUInt32(RoomId);
Response.AddInt32(0);
return Response;
}
示例7: Serialize
internal void Serialize(ServerMessage reply)
{
reply.AddUInt32(UserId);
reply.AddString(mUsername);
reply.AddInt32(1);
reply.AddBoolean(IsOnline);
reply.AddBoolean(IsOnline ? InRoom : false);
reply.AddString(IsOnline ? mLook : "");
reply.AddInt32(0);
reply.AddString(mMotto);
reply.AddString(string.Empty);
reply.AddString(string.Empty);
reply.AddBoolean(false);//allow offline
reply.AddBoolean(false);//dont know
reply.AddBoolean(false);//Is on phone
reply.AddShort((Int16) relationship);
}
示例8: SerializeFloor
internal void SerializeFloor(ServerMessage Message, Boolean Inventory)
{
if (GetBaseItem().IsGift)
{
if (giftData == null) LoadGift();
string message = string.Empty;
int spriteCode = 0;
string figure = string.Empty;
if (giftData != null)
{
message = giftData.message;
spriteCode = (giftData.decorationType * 1000) + giftData.wrappingPaper;
}
Message.AddInt32((-1) * (int)this.itemID);
Message.AddString(this.GetBaseItem().Type.ToString().ToUpper());
Message.AddUInt32(this.itemID);
Message.AddInt32(this.GetBaseItem().SpriteId);
Message.AddInt32(9);
Message.AddInt32(0);
Message.AddString(message);
Message.AddBoolean(false); // recycle
Message.AddBoolean(this.GetBaseItem().AllowTrade);
Message.AddBoolean(this.GetBaseItem().AllowInventoryStack);
Message.AddBoolean(false); //marketplace
Message.AddInt32(-1);
Message.AddBoolean(false);
Message.AddInt32(-1);
Message.AddString("");
Message.AddInt32(spriteCode);
}
else
{
Message.AddUInt32(this.itemID);
Message.AddString(GetBaseItem().Type.ToString().ToUpper());
Message.AddUInt32(this.itemID);
Message.AddInt32(this.GetBaseItem().SpriteId);
Message.AddInt32(1);
if (GetBaseItem().InteractionType == InteractionType.badge_display)
{
Message.AddInt32(2);
Message.AddInt32(4);
if (extraData != string.Empty)
{
Message.AddString("0"); // extradata check
for (int i = 0; i <= extraData.Split(Convert.ToChar(9)).Length - 1; i++)
Message.AddString(extraData.Split(Convert.ToChar(9))[i]);
}
else
Message.AddInt32(0);
}
else if (GetBaseItem().IsGroupItem && _extraData != null)
{
uint groupID = TextHandling.ParseUInt32(_extraData.Split(':')[0]);
GroupData groupData = ButterflyEnvironment.GetGame().GetGroupManager().GetGroup(groupID);
if (groupData != null)
{
Message.AddInt32(2);
Message.AddInt32(5);
Message.AddString("0");
Message.AddString(groupID.ToString());
Message.AddString(groupData.image);
Message.AddString(groupData.htmlColorPrimary);
Message.AddString(groupData.htmlColorSecondary);
}
else
{
Message.AddInt32(0);
Message.AddString(extraData);
}
}
else
{
Message.AddInt32(0);
Message.AddString(extraData);
}
Message.AddBoolean(false);
Message.AddBoolean(this.GetBaseItem().AllowTrade);
Message.AddBoolean(this.GetBaseItem().AllowInventoryStack);
Message.AddBoolean(false);
Message.AddInt32(-1); // secondsToExpiration
Message.AddBoolean(false); // hasRentPeriodStarted
Message.AddInt32(-1); // Roomid
Message.AddString("S"); // slotId ??
Message.AddInt32(0);
}
}
示例9: SerializeInventory
internal void SerializeInventory(ServerMessage message)
{
message.AddUInt32(BotId); // id
message.AddString(Name); // name
message.AddString("");
message.AddString("m");
message.AddString(Look); // color
}