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


C# Items.RoomItem类代码示例

本文整理汇总了C#中GoldTree.HabboHotel.Items.RoomItem的典型用法代码示例。如果您正苦于以下问题:C# RoomItem类的具体用法?C# RoomItem怎么用?C# RoomItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RoomItem类属于GoldTree.HabboHotel.Items命名空间,在下文中一共展示了RoomItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (bool_0)
     {
         ServerMessage Message = new ServerMessage(650u);
         Message.AppendInt32(0);
         Message.AppendInt32(5);
         Message.AppendInt32(0);
         Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
         Message.AppendUInt(RoomItem_0.uint_0);
         Message.AppendStringWithBreak("");
         Message.AppendString("I");
         if (RoomItem_0.string_3.Length > 0)
         {
             Message.AppendString(RoomItem_0.string_3);
         }
         else
         {
             Message.AppendString("RB");
         }
         Message.AppendStringWithBreak("HRAH");
         Session.SendMessage(Message);
         RoomItem_0.ReqUpdate(1);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:InteractorWiredTriggerTimer.cs

示例2: OnPlace

 public override void OnPlace(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
     roomMusicController.Stop();
     Session.GetHabbo().CurrentRoom.LoadMusic();
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:InteractorJukebox.cs

示例3: OnPlace

 public override void OnPlace(GameClient Session, RoomItem RoomItem_0)
 {
     RoomItem_0.ExtraData = "0";
     if (RoomItem_0.uint_3 != 0u)
     {
         RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(RoomItem_0.uint_3);
         if (@class != null)
         {
             @class.method_3(true);
             @class.bool_1 = false;
             @class.bool_0 = true;
         }
         RoomItem_0.uint_3 = 0u;
     }
     if (RoomItem_0.uint_4 != 0u)
     {
         RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(RoomItem_0.uint_4);
         if (@class != null)
         {
             @class.method_3(true);
             @class.bool_1 = false;
             @class.bool_0 = true;
         }
         RoomItem_0.uint_4 = 0u;
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:26,代码来源:InteractorHopper.cs

示例4: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
     if (@class != null && @class.class34_1 == null)
     {
         if (ThreeDCoord.smethod_0(@class.GStruct1_0, RoomItem_0.GStruct1_0) || ThreeDCoord.smethod_0(@class.GStruct1_0, RoomItem_0.GStruct1_1))
         {
             if (RoomItem_0.uint_3 == 0u)
             {
                 @class.int_19 = -1;
                 RoomItem_0.uint_3 = @class.GetClient().GetHabbo().Id;
                 @class.RoomItem_0 = RoomItem_0;
             }
         }
         else
         {
             if (@class.bool_0)
             {
                 try
                 {
                     @class.method_4(RoomItem_0.GStruct1_1);
                 }
                 catch
                 {
                 }
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:29,代码来源:InteractorHopper.cs

示例5: OnRemove

 public override void OnRemove(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.Stop();
     roomMusicController.UnLinkRoomOutputItem();
     Item.UpdateState(true, true);
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:InteractorJukebox.cs

示例6: Action

        public void Action(RoomItem Item, Task Task, string ExtraData)
        {
            if (ExtraData == "1")
            {
                Task.Wait(7000);
                Item.FireWorkCount--;

                using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
                {
                    dbClient.AddParamWithValue("itemid", Item.uint_0);
                    dbClient.ExecuteQuery("UPDATE items SET fw_count = fw_count - 1 WHERE id = @itemid LIMIT 1");
                }
            }

            if (Item.FireWorkCount == 0)
            {
                ExtraData = "0";
            }

            Item.ExtraData = ExtraData;
            Item.UpdateState(true, true);

            Task.Wait();
            Task.Dispose();
        }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:InteractorFirework.cs

示例7: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
     if (@class != null && (RoomItem_0.GStruct1_2.x < RoomItem_0.method_8().Class28_0.int_4 && RoomItem_0.GStruct1_2.y < RoomItem_0.method_8().Class28_0.int_5))
     {
         if (ThreeDCoord.smethod_1(@class.GStruct1_0, RoomItem_0.GStruct1_1) && @class.bool_0)
         {
             @class.method_4(RoomItem_0.GStruct1_1);
         }
         else
         {
             if (RoomItem_0.method_8().method_30(RoomItem_0.GStruct1_2.x, RoomItem_0.GStruct1_2.y, RoomItem_0.Double_0, true, false) && RoomItem_0.uint_3 == 0u)
             {
                 RoomItem_0.uint_3 = @class.uint_0;
                 @class.bool_0 = false;
                 if (@class.bool_6 && (@class.int_10 != RoomItem_0.GStruct1_1.x || @class.int_11 != RoomItem_0.GStruct1_1.y))
                 {
                     @class.method_3(true);
                 }
                 @class.bool_1 = true;
                 @class.method_4(RoomItem_0.GStruct1_0);
                 RoomItem_0.ReqUpdate(3);
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:26,代码来源:InteractorOneWayGate.cs

示例8: AddFreezeScoreboard

 internal void AddFreezeScoreboard(RoomItem item)
 {
     if (this.freezeScoreboards.Contains(item.uint_0))
     {
         this.freezeScoreboards.Remove(item.uint_0);
     }
     this.freezeScoreboards.Add(item.uint_0, item);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:8,代码来源:GameManager.cs

示例9: AddFreezeGate

 internal void AddFreezeGate(RoomItem item)
 {
     if (this.freezeGates.Contains(item.uint_0))
     {
         this.freezeGates.Remove(item.uint_0);
     }
     this.freezeGates.Add(item.uint_0, item);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:8,代码来源:GameManager.cs

示例10: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (bool_0 && RoomItem_0.ExtraData != "-1")
     {
         RoomItem_0.ExtraData = "-1";
         RoomItem_0.method_4();
         RoomItem_0.ReqUpdate(10);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:9,代码来源:InteractorHabboWheel.cs

示例11: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null)
         {
             if (@class.method_72("stickiepole") > 0 || @class.method_26(Session))
             {
                 uint uint_ = Event.PopWiredUInt();
                 string text = Event.PopFixedString();
                 string[] array = text.Split(new char[]
                 {
                     ' '
                 });
                 if (array[0].Contains("-"))
                 {
                     array[0] = array[0].Replace("-", "");
                 }
                 UserItem class2 = Session.GetHabbo().method_23().method_10(uint_);
                 if (class2 != null)
                 {
                     if (array[0].StartsWith(":"))
                     {
                         string text2 = @class.method_98(text);
                         if (text2 == null)
                         {
                             ServerMessage Message = new ServerMessage(516u);
                             Message.AppendInt32(11);
                             Session.SendMessage(Message);
                             return;
                         }
                         RoomItem RoomItem_ = new RoomItem(class2.uint_0, @class.Id, class2.uint_1, class2.string_0, 0, 0, 0.0, 0, text2, @class);
                         if (@class.method_82(Session, RoomItem_, true, null))
                         {
                             Session.GetHabbo().method_23().method_12(uint_, 1u, false);
                         }
                     }
                     using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
                     {
                         class3.ExecuteQuery(string.Concat(new object[]
                         {
                             "UPDATE items SET room_id = '",
                             @class.Id,
                             "' WHERE Id = '",
                             class2.uint_0,
                             "' LIMIT 1"
                         }));
                     }
                 }
             }
         }
     }
     catch
     {
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:57,代码来源:PlacePostItMessageEvent.cs

示例12: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (RoomItem_0.ExtraData != "-1")
     {
         RoomItem_0.ExtraData = "-1";
         RoomItem_0.UpdateState(false, true);
         RoomItem_0.ReqUpdate(3);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:9,代码来源:InteractorSpinningBottle.cs

示例13: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_1, bool bool_0)
 {
     if (bool_0)
     {
         if (this.Modes == 0)
         {
             RoomItem_0.UpdateState(false, true);
         }
         int num = 0;
         int num2 = 0;
         if (RoomItem_0.ExtraData.Length > 0)
         {
             num = int.Parse(RoomItem_0.ExtraData);
         }
         if (num <= 0)
         {
             num2 = 1;
         }
         else
         {
             if (num >= this.Modes)
             {
                 num2 = 0;
             }
             else
             {
                 num2 = num + 1;
             }
         }
         if (num2 == 0)
         {
             if (RoomItem_0.method_8().method_97(RoomItem_0.Int32_0, RoomItem_0.Int32_1))
             {
                 return;
             }
             Dictionary<int, AffectedTile> dictionary = RoomItem_0.method_8().method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, RoomItem_0.Int32_0, RoomItem_0.Int32_1, RoomItem_0.int_3);
             if (dictionary == null)
             {
                 dictionary = new Dictionary<int, AffectedTile>();
             }
             foreach (AffectedTile current in dictionary.Values)
             {
                 if (RoomItem_0.method_8().method_97(current.Int32_0, current.Int32_1))
                 {
                     return;
                 }
             }
         }
         RoomItem_0.ExtraData = num2.ToString();
         RoomItem_0.method_4();
         RoomItem_0.method_8().method_22();
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:53,代码来源:InteractorGate.cs

示例14: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (bool_0)
     {
         int num = 0;
         if (RoomItem_0.ExtraData.Length > 0)
         {
             num = int.Parse(RoomItem_0.ExtraData);
         }
         if (int_0 == 0)
         {
             if (num <= -1)
             {
                 num = 0;
             }
             else
             {
                 if (num >= 0)
                 {
                     num = -1;
                 }
             }
         }
         else
         {
             if (int_0 >= 1)
             {
                 if (int_0 == 1)
                 {
                     num--;
                     if (num < 0)
                     {
                         num = 0;
                     }
                 }
                 else
                 {
                     if (int_0 == 2)
                     {
                         num++;
                         if (num >= 100)
                         {
                             num = 0;
                         }
                     }
                 }
             }
         }
         RoomItem_0.ExtraData = num.ToString();
         RoomItem_0.method_4();
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:52,代码来源:InteractorScoreboard.cs

示例15: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (bool_0)
     {
         ServerMessage Message = new ServerMessage(651u);
         Message.AppendInt32(0);
         Message.AppendInt32(5);
         Message.AppendInt32(1);
         Message.AppendUInt(RoomItem_0.uint_0);
         Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
         Message.AppendUInt(RoomItem_0.uint_0);
         Session.SendMessage(Message);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:14,代码来源:WiredInteractor.cs


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