本文整理汇总了C#中Firewind.Messages.ServerMessage.AppendInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendInt32方法的具体用法?C# ServerMessage.AppendInt32怎么用?C# ServerMessage.AppendInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Firewind.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Trade
internal Trade(int UserOneId, int UserTwoId, UInt32 RoomId)
{
this.oneId = UserOneId;
this.twoId = UserTwoId;
this.Users = new TradeUser[2];
this.Users[0] = new TradeUser(UserOneId, RoomId);
this.Users[1] = new TradeUser(UserTwoId, RoomId);
this.TradeStage = 1;
this.RoomId = RoomId;
foreach (TradeUser User in Users)
{
if (!User.GetRoomUser().Statuses.ContainsKey("trd"))
{
User.GetRoomUser().AddStatus("trd", "");
User.GetRoomUser().UpdateNeeded = true;
}
}
ServerMessage Message = new ServerMessage(Outgoing.TradeStart);
Message.AppendInt32(UserOneId);
Message.AppendInt32(1); // ready
Message.AppendInt32(UserTwoId);
Message.AppendInt32(1); // ready
SendMessageToUsers(Message);
}
示例2: Compose
internal static ServerMessage Compose(List<Achievement> Achievements)
{
ServerMessage Message = new ServerMessage(627); //627
Message.AppendInt32(Achievements.Count);
foreach (Achievement Achievement in Achievements)
{
string DisplayName = Achievement.GroupName;
if (DisplayName.StartsWith("ACH_"))
{
DisplayName = DisplayName.Substring(4);
}
Message.AppendString(DisplayName);
Message.AppendInt32(Achievement.Levels.Count);
foreach (AchievementLevel Level in Achievement.Levels.Values)
{
Message.AppendInt32(Level.Level);
Message.AppendInt32(Level.Requirement);
}
}
return Message;
}
示例3: Serialize
internal void Serialize(ref ServerMessage packet)
{
packet.AppendInt32(timeSpoken.Hour);
packet.AppendInt32(timeSpoken.Minute);
packet.AppendInt32(userID);
packet.AppendString(username);
packet.AppendString(message);
}
示例4: SerializeUpdate
internal static ServerMessage SerializeUpdate(MessengerBuddy friend)
{
ServerMessage reply = new ServerMessage(Outgoing.FriendUpdate);
reply.AppendInt32(0); // category
reply.AppendInt32(1); // number of updates
reply.AppendInt32(0); // don't know
friend.Serialize(reply);
reply.AppendBoolean(false);
return reply;
}
示例5: Compose
internal static ServerMessage Compose(int PlaylistCapacity, List<SongInstance> Playlist)
{
ServerMessage Message = new ServerMessage(334);
Message.AppendInt32(PlaylistCapacity);
Message.AppendInt32(Playlist.Count);
foreach (SongInstance Song in Playlist)
{
Message.AppendUInt(Song.DiskItem.itemID);
Message.AppendUInt(Song.SongData.Id);
}
return Message;
}
示例6: SerializeTo
internal void SerializeTo(RoomData data, ServerMessage Message)
{
Message.AppendString(data.OwnerId + "");
Message.AppendString(data.Owner);
Message.AppendString(RoomId + "");
Message.AppendInt32(Category);
Message.AppendString(Name);
Message.AppendString(Description);
Message.AppendString(StartTime);
Message.AppendInt32(Tags.Count);
foreach (string Tag in Tags.ToArray())
{
Message.AppendString(Tag);
}
}
示例7: Searialize
internal void Searialize(ServerMessage reply)
{
reply.AppendInt32(userID);
reply.AppendString(username);
reply.AppendString(motto);
bool Online = (FirewindEnvironment.GetGame().GetClientManager().GetClientByUserID(userID) != null);
reply.AppendBoolean(Online);
reply.AppendBoolean(false);
reply.AppendString(string.Empty);
reply.AppendInt32(0);
reply.AppendString(look);
reply.AppendString(last_online);
}
示例8: Serialize
internal void Serialize(ServerMessage Request)
{
// [email protected]22033860
Request.AppendInt32(FromUser);
Request.AppendString(mUsername);
Habbo user = FirewindEnvironment.getHabboForName(mUsername);
Request.AppendString((user != null) ? user.Look : "");
}
示例9: AppendToMessage
public void AppendToMessage(ServerMessage message)
{
message.AppendInt32(Data.Count);
foreach (KeyValuePair<string, string> pair in Data)
{
message.AppendString(pair.Key);
message.AppendString(pair.Value);
}
}
示例10: Serialize
internal ServerMessage Serialize(GameClient Session)
{
ServerMessage Message = new ServerMessage(Outgoing.RoomEvent);
Message.AppendString(Session.GetHabbo().Id + "");
Message.AppendString(Session.GetHabbo().Username);
Message.AppendString(RoomId + "");
Message.AppendInt32(Category);
Message.AppendString(Name);
Message.AppendString(Description);
Message.AppendString(StartTime);
Message.AppendInt32(Tags.Count);
foreach (string Tag in Tags.ToArray())
{
Message.AppendString(Tag);
}
return Message;
}
示例11: SerializeFloor
internal void SerializeFloor(ServerMessage Message, Boolean Inventory)
{
Message.AppendUInt(Id);
Message.AppendString(mBaseItem.Type.ToString().ToUpper());
Message.AppendUInt(Id);
Message.AppendInt32(GetBaseItem().SpriteId);
Message.AppendInt32(Extra); // extra
Message.AppendInt32(Data.GetTypeID());
Data.AppendToMessage(Message);
Message.AppendBoolean(GetBaseItem().AllowRecycle);
Message.AppendBoolean(GetBaseItem().AllowTrade);
Message.AppendBoolean(GetBaseItem().AllowInventoryStack);
Message.AppendBoolean(Marketplace.CanSellItem(this));
Message.AppendInt32(-1);
Message.AppendString("");
Message.AppendInt32(0);
}
示例12: Handle
public bool Handle(RoomUnit unit, Team team, RoomItem item)
{
RoomUser user = unit as RoomUser;
if (user != null && user.GetClient() != null)
{
ServerMessage servermsg = new ServerMessage();
servermsg.Init(Outgoing.Whisp);
servermsg.AppendInt32(user.VirtualID);
servermsg.AppendString(message);
servermsg.AppendInt32(0);
servermsg.AppendInt32(0);
servermsg.AppendInt32(-1);
user.GetClient().SendMessage(servermsg);
handler.OnEvent(itemID);
return true;
}
return false;
}
示例13: Compose
internal static ServerMessage Compose(Achievement Achievement, int Level, int PointReward, int PixelReward)
{
ServerMessage Message = new ServerMessage(Outgoing.UnlockAchievement);
Message.AppendUInt(Achievement.Id); // Achievement ID
Message.AppendInt32(Level); // Achieved level
Message.AppendInt32(144); // Unknown. Random useless number.
Message.AppendString(Achievement.GroupName + Level); // Achieved name
Message.AppendInt32(PointReward); // Point reward
Message.AppendInt32(PixelReward); // Pixel reward
Message.AppendInt32(0); // Unknown.
Message.AppendInt32(10); // Unknown.
Message.AppendInt32(21); // Unknown. (Extra reward?)
Message.AppendString(Level > 1 ? Achievement.GroupName + (Level - 1) : string.Empty);
Message.AppendString(Achievement.Category);
Message.AppendString(String.Empty);
Message.AppendInt32(0);
Message.AppendInt32(0);
return Message;
}
示例14: Compose
internal static ServerMessage Compose(Achievement Achievement, int TargetLevel, AchievementLevel TargetLevelData,
int TotalLevels, UserAchievement UserData)
{
ServerMessage Message = new ServerMessage(Outgoing.AchievementProgress);
Message.AppendUInt(Achievement.Id); // Unknown (ID?)
Message.AppendInt32(TargetLevel); // Target level
Message.AppendString(Achievement.GroupName + TargetLevel); // Target name/desc/badge
Message.AppendInt32(TargetLevelData.Requirement); // Progress req/target
Message.AppendInt32(TargetLevelData.RewardPixels); // Pixel reward
Message.AppendInt32(TargetLevelData.RewardPoints); // Unknown(??)
Message.AppendInt32(0); // ?
Message.AppendInt32(UserData != null ? UserData.Progress : 0); // Current progress
Message.AppendBoolean(UserData != null ? (UserData.Level >= TotalLevels) : false); // Set 100% completed(??)
Message.AppendString(Achievement.Category); // Category
Message.AppendString(String.Empty);
Message.AppendInt32(TotalLevels); // Total amount of levels
Message.AppendInt32(0);
return Message;
}
示例15: Compose
internal static ServerMessage Compose(GameClient Session, List<Achievement> Achievements)
{
ServerMessage Message = new ServerMessage(Outgoing.AchievementList); //436
Message.AppendInt32(Achievements.Count);
foreach (Achievement Achievement in Achievements)
{
UserAchievement UserData = Session.GetHabbo().GetAchievementData(Achievement.GroupName);
int TargetLevel = (UserData != null ? UserData.Level + 1 : 1);
int TotalLevels = Achievement.Levels.Count;
if (TargetLevel > TotalLevels)
{
TargetLevel = TotalLevels;
}
AchievementLevel TargetLevelData = Achievement.Levels[TargetLevel];
Message.AppendUInt(Achievement.Id); // Unknown (ID?)
Message.AppendInt32(TargetLevel); // Target level
Message.AppendString(Achievement.GroupName + TargetLevel); // Target name/desc/badge
Message.AppendInt32(TargetLevelData.Requirement); // Progress req/target
Message.AppendInt32(TargetLevelData.RewardPixels); // Pixel reward
Message.AppendInt32(TargetLevelData.RewardPoints); // Unknown(??)
Message.AppendInt32(0);
Message.AppendInt32(UserData != null ? UserData.Progress : 0); // Current progress
Message.AppendBoolean(UserData != null ? (UserData.Level >= TotalLevels) : false); // Set 100% completed(??)
Message.AppendString(Achievement.Category); // Category
Message.AppendString(String.Empty);
Message.AppendInt32(TotalLevels); // Total amount of levels
Message.AppendInt32(0);
}
Message.AppendBoolean(false);
Message.AppendBoolean(false);
return Message;
}