当前位置: 首页>>代码示例>>C#>>正文


C# ServerMessage.AppendRawInt32方法代码示例

本文整理汇总了C#中Phoenix.Messages.ServerMessage.AppendRawInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendRawInt32方法的具体用法?C# ServerMessage.AppendRawInt32怎么用?C# ServerMessage.AppendRawInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Phoenix.Messages.ServerMessage的用法示例。


在下文中一共展示了ServerMessage.AppendRawInt32方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TryRedeemVoucher

		public void TryRedeemVoucher(GameClient Session, string Code)
		{
			if (!IsValidCode(Code))
			{
				ServerMessage Message = new ServerMessage(213);
				Message.AppendRawInt32(0);
				Session.SendMessage(Message);
			}
			else
			{
				DataRow row = null;
				using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
				{
					adapter.AddParamWithValue("code", Code);
					row = adapter.ReadDataRow("SELECT * FROM vouchers WHERE code = @code LIMIT 1");
				}
				int Credits = (int)row["credits"];
				int Pixels = (int)row["pixels"];
				int Points = (int)row["vip_points"];
				this.DeleteVoucher(Code);
				if (Credits > 0)
				{
					Session.GetHabbo().Credits += Credits;
					Session.GetHabbo().UpdateCreditsBalance(true);
				}
				if (Pixels > 0)
				{
					Session.GetHabbo().ActivityPoints += Pixels;
					Session.GetHabbo().UpdateActivityPointsBalance(true);
				}
				if (Points > 0)
				{
					Session.GetHabbo().shells += Points;
					Session.GetHabbo().UpdateShellsBalance(false, true);
				}
				Session.SendMessage(new ServerMessage(212));
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:38,代码来源:VoucherHandler.cs

示例2: RemoveBot

 public void RemoveBot(int int_17, bool bool_13)
 {
     RoomUser @class = this.GetRoomUserByVirtualId(int_17);
     if (@class != null && @class.IsBot)
     {
         @class.BotAI.OnSelfLeaveRoom(bool_13);
         ServerMessage Message = new ServerMessage(29u);
         Message.AppendRawInt32(@class.VirtualId);
         this.SendMessage(Message, null);
         uint num = @class.HabboId;
         for (int i = 0; i < this.UserList.Length; i++)
         {
             RoomUser class2 = this.UserList[i];
             if (class2 != null && class2.HabboId == num)
             {
                 this.UserList[i] = null;
             }
         }
     }
 }
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:20,代码来源:Room.cs

示例3: RemoveUserFromRoom

        public void RemoveUserFromRoom(GameClient Session, bool bool_13, bool bool_14)
        {
            int num = 1;
            if (!bool_14 || !Session.GetHabbo().isAaron)
            {
                if (this.bool_12)
                {
                    if (bool_13 && Session != null)
                    {
                        if (bool_14)
                        {
                            ServerMessage Message = new ServerMessage(33u);
                            Message.AppendInt32(4008);
                            Session.SendMessage(Message);
                        }
                        ServerMessage Message5_ = new ServerMessage(18u);
                        Session.SendMessage(Message5_);
                    }
                }
                else
                {
                    try
                    {
                        if (Session != null && Session.GetHabbo() != null)
                        {
                            num = 2;
                            RoomUser @class = this.GetRoomUserByHabbo(Session.GetHabbo().Id);
                            if (@class != null)
                            {
                                this.UserList[@class.CurrentFurniFX] = null;
                                @class.CurrentFurniFX = -1;
                                this.byte_0[@class.X, @class.Y] = @class.SqState;
                            }
                            num = 3;
                            if (bool_13)
                            {
                                if (bool_14)
                                {
                                    ServerMessage Message = new ServerMessage(33u);
                                    Message.AppendInt32(4008);
                                    Session.SendMessage(Message);
                                }
                                ServerMessage Message5_ = new ServerMessage(18u);
                                Session.SendMessage(Message5_);
                            }
                            num = 4;
                            if (@class != null && [email protected])
                            {
                                if (@class.byte_1 > 0 && @class.GetClient() != null)
                                {
                                    @class.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect = -1;
                                }
                                this.byte_0[@class.X, @class.Y] = @class.SqState;
                                if (!this.IsPublic)
                                {
                                    ServerMessage Message2 = new ServerMessage(700u);
                                    Message2.AppendBoolean(false);
                                    Session.SendMessage(Message2);
                                }
                                ServerMessage Message3 = new ServerMessage(29u);
                                Message3.AppendRawInt32(@class.VirtualId);
                                this.SendMessage(Message3, null);
                                if (this.HasActiveTrade(Session.GetHabbo().Id))
                                {
                                    this.TryStopTrade(Session.GetHabbo().Id);
                                }
                                num = 5;
                                if (Session.GetHabbo().Username.ToLower() == this.Owner.ToLower() && this.HasOngoingEvent)
                                {
                                    this.Event = null;
                                    ServerMessage Logging = new ServerMessage(370u);
                                    Logging.AppendStringWithBreak("-1");
                                    this.SendMessage(Logging, null);
                                }
                                num = 6;
                                if (@class.Riding != null)
                                {
                                    @class.Riding.Rider = null;
                                    @class.Riding = null;
                                    Session.GetHabbo().GetAvatarEffectsInventoryComponent().CurrentEffect = -1;
                                }
                                Session.GetHabbo().OnLeaveRoom();
                                this.bool_10 = true;
                                this.method_51();
                                List<RoomUser> list = new List<RoomUser>();
                                for (int i = 0; i < this.UserList.Length; i++)
                                {
                                    RoomUser class2 = this.UserList[i];
                                    if (class2 != null && class2.IsBot)
                                    {
                                        list.Add(class2);
                                    }
                                }
                                num = 7;
                                foreach (RoomUser current in list)
                                {
                                    current.BotAI.OnUserLeaveRoom(Session);
                                }
                            }
                        }
//.........这里部分代码省略.........
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:101,代码来源:Room.cs

示例4: method_33


//.........这里部分代码省略.........
                                        num3++;
                                        if (class3.GetClient().GetHabbo() != null && class3.GetClient().GetHabbo().MuteLength > 0)
                                        {
                                            class3.GetClient().GetHabbo().MuteLength--;
                                            if (class3.GetClient().GetHabbo().MuteLength == 0)
                                            {
                                                class3.GetClient().GetHabbo().Muted = false;
                                            }
                                        }
                                    }
                                    if (this.musicController != null)
                                    {
                                        this.musicController.Update(this);
                                    }
                                    class3.IdleTime++;
                                    num = 2;
                                    if (!class3.IsAsleep && class3.IdleTime >= GlobalClass.IdleSleep)
                                    {
                                        class3.IsAsleep = true;
                                        ServerMessage Message = new ServerMessage(486u);
                                        Message.AppendInt32(class3.VirtualId);
                                        Message.AppendBoolean(true);
                                        this.SendMessage(Message, null);
                                    }
                                    num = 3;
                                    if (class3.GetClient() == null && !class3.IsBot)
                                    {
                                        this.UserList[i] = null;
                                        if (!class3.AllowOverride)
                                        {
                                            this.byte_0[class3.X, class3.Y] = class3.SqState;
                                        }
                                        ServerMessage Message2 = new ServerMessage(29u);
                                        Message2.AppendRawInt32(class3.VirtualId);
                                        this.SendMessage(Message2, null);
                                        this.method_50();
                                    }
                                    num = 4;
                                    if (class3.NeedsAutokick && !list.Contains(class3.HabboId))
                                    {
                                        list.Add(class3.HabboId);
                                    }
                                    num = 5;
                                    if (class3.CarryItemID > 0)
                                    {
                                        class3.CarryTimer--;
                                        if (class3.CarryTimer <= 0)
                                        {
                                            class3.CarryItem(0);
                                        }
                                    }
                                    num = 6;
                                    if (class3.SetStep && class3.Riding == null)
                                    {
                                        num = 7;
                                        if (class3.IsBot && class3.BotData.Rider != null && this.CanWalk(class3.SetX, class3.SetY, 0.0, true, true))
                                        {
                                            num = 8;
                                            this.method_85(class3);
                                            class3.X = class3.SetX;
                                            class3.Y = class3.SetY;
                                            class3.Z = class3.SetZ;
                                            class3.BotData.Rider.X = class3.SetX;
                                            class3.BotData.Rider.Y = class3.SetY;
                                            class3.BotData.Rider.Z = class3.SetZ + 1.0;
                                            class3.BotData.Rider.SetStep = false;
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:67,代码来源:Room.cs


注:本文中的Phoenix.Messages.ServerMessage.AppendRawInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。