本文整理汇总了C#中ServerMessage.AppendUInt方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendUInt方法的具体用法?C# ServerMessage.AppendUInt怎么用?C# ServerMessage.AppendUInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendUInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Trade
internal Trade(UInt32 UserOneId, UInt32 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().Statusses.ContainsKey("trd"))
{
User.GetRoomUser().AddStatus("trd", "");
User.GetRoomUser().UpdateNeeded = true;
}
}
ServerMessage Message = new ServerMessage(104);
Message.AppendUInt(UserOneId);
Message.AppendBoolean(true);
Message.AppendUInt(UserTwoId);
Message.AppendBoolean(true);
SendMessageToUsers(Message);
}
示例2: 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;
}
示例3: MoveBall
internal void MoveBall(RoomItem item, GameClient mover, int newX, int newY)
{
if (item == null || mover == null)
return;
if (!room.GetGameMap().itemCanBePlacedHere(newX, newY))
return;
Point oldRoomCoord = item.Coordinate;
bool itemIsOnGameItem = GameItemOverlaps(item);
Double NewZ = room.GetGameMap().Model.SqFloorHeight[newX, newY];
ServerMessage Message = new ServerMessage(95);
Message.AppendUInt(item.Id);
Message.AppendUInt(3508);
Message.AppendInt32(item.Coordinate.X);
Message.AppendInt32(item.Coordinate.Y);
Message.AppendInt32(newX);
Message.AppendInt32(newY);
Message.AppendUInt(4);
Message.AppendStringWithBreak(NewZ.ToString());
Message.AppendStringWithBreak("H11");
Message.AppendInt32(-1);
Message.AppendInt32(0);
room.SendMessage(Message);
ServerMessage mMessage = new ServerMessage();
mMessage.Init(230); // Cf
mMessage.AppendInt32(item.Coordinate.X);
mMessage.AppendInt32(item.Coordinate.Y);
mMessage.AppendInt32(newX);
mMessage.AppendInt32(newY);
mMessage.AppendInt32(1);
mMessage.AppendUInt(item.Id);
mMessage.AppendStringWithBreak(item.GetZ.ToString().Replace(',', '.'));
mMessage.AppendStringWithBreak(NewZ.ToString().Replace(',', '.'));
mMessage.AppendUInt(0);
room.SendMessage(mMessage);
if (oldRoomCoord.X == newX && oldRoomCoord.Y == newY)
return;
room.GetRoomItemHandler().SetFloorItem(mover, item, newX, newY, item.Rot, false, false, false, false);
if (!itemIsOnGameItem)
HandleFootballGameItems(new Point(newX, newY), room.GetRoomUserManager().GetRoomUserByHabbo(mover.GetHabbo().Id));
}
示例4: DeliverInstantMessage
internal void DeliverInstantMessage(string message, uint convoID)
{
ServerMessage InstantMessage = new ServerMessage(134);
InstantMessage.AppendUInt(convoID);
InstantMessage.AppendString(message);
GetClient().SendMessage(InstantMessage);
}
示例5: Compose
internal static ServerMessage Compose(GameClient Session, List<Achievement> Achievements)
{
ServerMessage Message = new ServerMessage(436); //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.AppendStringWithBreak(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(UserData != null ? UserData.Progress : 0); // Current progress
Message.AppendBoolean(UserData != null ? (UserData.Level >= TotalLevels) : false); // Set 100% completed(??)
Message.AppendStringWithBreak(Achievement.Category); // Category
Message.AppendInt32(TotalLevels); // Total amount of levels
}
return Message;
}
示例6: Serialize
internal void Serialize(ServerMessage Message)
{
try
{
Message.AppendUInt(Id);
Message.AppendStringWithBreak(Name);
Message.AppendInt32(CreditsCost);
Message.AppendInt32(PixelsCost);
Message.AppendInt32(0);
Message.AppendInt32(1);
Message.AppendStringWithBreak(GetBaseItem().Type.ToString());
Message.AppendInt32(GetBaseItem().SpriteId);
if (Name.Contains("wallpaper_single") || Name.Contains("floor_single") || Name.Contains("landscape_single"))
{
string[] Analyze = Name.Split('_');
Message.AppendStringWithBreak(Analyze[2]);
}
else if (this.songID > 0 && GetBaseItem().InteractionType == InteractionType.musicdisc)
{
Message.AppendStringWithBreak(songID.ToString());
}
else
{
Message.AppendStringWithBreak(string.Empty);
}
Message.AppendInt32(Amount);
Message.AppendInt32(-1);
Message.AppendInt32(0);
}
catch
{
Console.WriteLine("Unable to load furniture item " + Id + ": " + Name);
}
}
示例7: SerializeSearchResults
internal static ServerMessage SerializeSearchResults(string Query)
{
DataTable Results = null;
using (IQueryAdapter dbClient = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
{
if (dbClient.dbType == Database_Manager.Database.DatabaseType.MySQL)
dbClient.setQuery("SELECT id,title FROM help_topics WHERE title LIKE @query OR body LIKE @query LIMIT 25");
else
dbClient.setQuery("SELECT TOP 25 id,title FROM help_topics WHERE title LIKE @query OR body LIKE @query");
dbClient.addParameter("query", Query + "%");
Results = dbClient.getTable();
}
// HII[KBCan I pay to be unbanned?
ServerMessage Search = new ServerMessage(521);
if (Results == null)
{
Search.AppendBoolean(false);
return Search;
}
Search.AppendInt32(Results.Rows.Count);
foreach (DataRow Row in Results.Rows)
{
Search.AppendUInt(Convert.ToUInt32(Row["id"]));
Search.AppendStringWithBreak((string)Row["title"]);
}
return Search;
}
示例8: SerializeTopic
internal static ServerMessage SerializeTopic(HelpTopic Topic)
{
ServerMessage Top = new ServerMessage(520);
Top.AppendUInt(Topic.TopicId);
Top.AppendStringWithBreak(Topic.Body);
return Top;
}
示例9: Serialize
internal void Serialize(ServerMessage Request)
{
// [email protected]22033860
Request.AppendUInt(FromUser);
Request.AppendStringWithBreak(mUsername);
Request.AppendStringWithBreak(FromUser.ToString());
}
示例10: Serialize
internal void Serialize(ref ServerMessage packet)
{
packet.AppendInt32(timeSpoken.Hour);
packet.AppendInt32(timeSpoken.Minute);
packet.AppendUInt(userID);
packet.AppendStringWithBreak(username);
packet.AppendStringWithBreak(message);
}
示例11: SerializeFloor
internal void SerializeFloor(ServerMessage Message, Boolean Inventory)
{
Message.AppendUInt(Id);
Message.AppendStringWithBreak(mBaseItem.Type.ToString().ToUpper());
Message.AppendUInt(Id);
Message.AppendInt32(GetBaseItem().SpriteId);
Message.AppendInt32(1);
Message.AppendStringWithBreak(ExtraData);
Message.AppendBoolean(GetBaseItem().AllowRecycle);
Message.AppendBoolean(GetBaseItem().AllowTrade);
Message.AppendBoolean(GetBaseItem().AllowInventoryStack);
Message.AppendBoolean(Marketplace.CanSellItem(this));
Message.AppendInt32(-1);
Message.AppendStringWithBreak("");
Message.AppendInt32(0);
}
示例12: ComposePlayingComposer
public static ServerMessage ComposePlayingComposer(uint SongId, int PlaylistItemNumber, int SyncTimestampMs)
{
ServerMessage Message = new ServerMessage(327);
if (SongId == 0)
{
Message.AppendInt32(-1);
Message.AppendInt32(-1);
Message.AppendInt32(-1);
Message.AppendInt32(-1);
Message.AppendInt32(0);
}
else
{
Message.AppendUInt(SongId);
Message.AppendInt32(PlaylistItemNumber);
Message.AppendUInt(SongId);
Message.AppendInt32(0);
Message.AppendInt32(SyncTimestampMs);
}
return Message;
}
示例13: Compose
internal static ServerMessage Compose(Achievement Achievement, int TargetLevel, AchievementLevel TargetLevelData,
int TotalLevels, UserAchievement UserData)
{
ServerMessage Message = new ServerMessage(913);
Message.AppendUInt(Achievement.Id); // Unknown (ID?)
Message.AppendInt32(TargetLevel); // Target level
Message.AppendStringWithBreak(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(UserData != null ? UserData.Progress : 0); // Current progress
Message.AppendBoolean(UserData != null ? (UserData.Level >= TotalLevels) : false); // Set 100% completed(??)
Message.AppendStringWithBreak(Achievement.Category); // Category
Message.AppendInt32(TotalLevels); // Total amount of levels
return Message;
}
示例14: Compose
internal static ServerMessage Compose(Achievement Achievement, int Level, int PointReward, int PixelReward)
{
ServerMessage Message = new ServerMessage(437);
Message.AppendUInt(Achievement.Id); // Achievement ID
Message.AppendInt32(Level); // Achieved level
Message.AppendInt32(144); // Unknown. Random useless number.
Message.AppendStringWithBreak(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.AppendStringWithBreak(Level > 1 ? Achievement.GroupName + (Level - 1) : string.Empty);
Message.AppendStringWithBreak(Achievement.Category);
return Message;
}
示例15: Searialize
internal void Searialize(ServerMessage reply)
{
reply.AppendUInt(userID);
reply.AppendStringWithBreak(username);
reply.AppendStringWithBreak(motto);
bool Online = (ButterflyEnvironment.GetGame().GetClientManager().GetClient(userID) != null);
reply.AppendBoolean(Online);
reply.AppendBoolean(false);
reply.AppendStringWithBreak(string.Empty);
reply.AppendBoolean(false);
reply.AppendStringWithBreak(look);
reply.AppendStringWithBreak(last_online);
reply.AppendStringWithBreak(string.Empty);
}