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


C# RoomItem.method_8方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例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: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     RoomUser @class = null;
     if (Session != null)
     {
         @class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
         if (@class == null)
         {
             return;
         }
     }
     if (Session == null || RoomItem_0.method_8().method_99(RoomItem_0.Int32_0, RoomItem_0.Int32_1, @class.int_3, @class.int_4))
     {
         if (RoomItem_0.ExtraData != "-1")
         {
             if (int_0 == -1)
             {
                 RoomItem_0.ExtraData = "0";
                 RoomItem_0.method_4();
             }
             else
             {
                 RoomItem_0.uint_3 = @class.uint_0;
                 RoomItem_0.ExtraData = "-1";
                 RoomItem_0.UpdateState(false, true);
                 RoomItem_0.ReqUpdate(4);
             }
         }
     }
     else
     {
         if (Session != null && @class != null && @class.bool_0)
         {
             try
             {
                 @class.method_4(RoomItem_0.GStruct1_1);
             }
             catch
             {
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:43,代码来源:InteractorDice.cs

示例6: FreezeUser

 public void FreezeUser(RoomItem Item, RoomItem Item2)
 {
     if (Item.method_8().frzTimer == true)
     {
         for (int i = 0; i < Item.method_8().RoomUser_0.Length; i++)
         {
             RoomUser User2 = Item.method_8().RoomUser_0[i];
             if (User2 != null)
             {
                 if (User2.int_3 == Item2.Int32_0 && User2.int_4 == Item2.Int32_1)
                 {
                     ThreadPool.QueueUserWorkItem(o =>
                     {
                         Item.method_8().GetFreeze().FreezeUser(User2);
                     });
                 }
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:20,代码来源:InteractorFreezeIceBlock.cs

示例7: BreakIceBlock

        public bool BreakIceBlock(RoomItem Item, RoomItem Item2)
        {
            if (Item.method_8().frzTimer == true)
            {
                Item2.ExtraData = "11200";
                Item2.UpdateState(false, true);

                int rand = GoldTreeEnvironment.GetRandomNumber(1, 11);
                foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeBlocks.Values)
                {
                    if (Item2.Int32_0 == Item3.Int32_0 && Item2.Int32_1 == Item3.Int32_1)
                    {
                        if (string.IsNullOrEmpty(Item3.ExtraData))
                        {
                            Item3.method_8().GetFreeze().SetRandomPowerUp(Item3);
                            return true;
                        }
                    }
                }
            }
            return false;
        }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:22,代码来源:InteractorFreezeIceBlock.cs

示例8: OnRemove

 public override void OnRemove(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_6();
         }
         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_6();
         }
         RoomItem_0.uint_4 = 0u;
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:22,代码来源:InteractorHopper.cs

示例9: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (RoomItem_0.GetBaseItem().Height_Adjustable.Count > 1)
     {
         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);
         RoomItem_0.method_8().method_22();
         RoomItem_0.method_8().method_87(RoomItem_0.method_8().method_43(RoomItem_0.Int32_0, RoomItem_0.Int32_1), true, true);
         foreach (AffectedTile current in dictionary.Values)
         {
             RoomItem_0.method_8().method_87(RoomItem_0.method_8().method_43(current.Int32_0, current.Int32_1), true, true);
         }
     }
     if (Session != null)
     {
         RoomUser RoomUser_ = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
         RoomItem_0.method_8().method_10(RoomUser_, RoomItem_0);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:18,代码来源:InteractorNotUsed.cs

示例10: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (Session != null)
     {
         RoomUser @class = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
         Room class2 = RoomItem_0.method_8();
         if (RoomItem_0.method_8().method_99(RoomItem_0.Int32_0, RoomItem_0.Int32_1, @class.int_3, @class.int_4))
         {
             RoomItem_0.method_8().method_10(@class, RoomItem_0);
             int num = RoomItem_0.Int32_0;
             int num2 = RoomItem_0.Int32_1;
             RoomItem_0.ExtraData = "11";
             if (@class.int_8 == 4)
             {
                 num2--;
             }
             else
             {
                 if (@class.int_8 == 0)
                 {
                     num2++;
                 }
                 else
                 {
                     if (@class.int_8 == 6)
                     {
                         num++;
                     }
                     else
                     {
                         if (@class.int_8 == 2)
                         {
                             num--;
                         }
                         else
                         {
                             if (@class.int_8 == 3)
                             {
                                 num--;
                                 num2--;
                             }
                             else
                             {
                                 if (@class.int_8 == 1)
                                 {
                                     num--;
                                     num2++;
                                 }
                                 else
                                 {
                                     if (@class.int_8 == 7)
                                     {
                                         num++;
                                         num2++;
                                     }
                                     else
                                     {
                                         if (@class.int_8 == 5)
                                         {
                                             num++;
                                             num2--;
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
             @class.MoveTo(RoomItem_0.Int32_0, RoomItem_0.Int32_1);
             class2.method_79(null, RoomItem_0, num, num2, 0, false, true, true);
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:74,代码来源:InteractorFootball.cs

示例11: OnTrigger

        public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            Room @class = Item.method_8();
            RoomUser User = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User.Freezed == false)
            {
                if (User.team != Rooms.Games.Team.None)
                {
                    if (Item.method_8().frzTimer == true)
                    {
                        if (Item.Int32_0 == User.int_3 || Item.Int32_0 - 1 == User.int_3 || Item.Int32_0 + 1 == User.int_3)
                        {
                            if (Item.Int32_1 == User.int_4 || Item.Int32_1 - 1 == User.int_4 || Item.Int32_1 + 1 == User.int_4)
                            {
                                ThreadPool.QueueUserWorkItem(o =>
                                {
                                    if (User.FreezeBalls > 0)
                                    {
                                        foreach (RoomItem Item2 in Item.method_8().GetFreeze().freezeTiles.Values)
                                        {
                                            if (Item2.Int32_0 == Item.Int32_0 && Item2.Int32_1 == Item.Int32_1 && (!string.IsNullOrEmpty(Item2.ExtraData)))
                                            {
                                                Rooms.Games.FreezePowerUp BallType = User.freezePowerUp;
                                                User.freezePowerUp = Rooms.Games.FreezePowerUp.None;

                                                bool pX, pY, pD1, pD2, nX, nY, nD1, nD2;
                                                pX = false; pY = false; pD1 = false; pD2 = false; nX = false; nY = false; nD1 = false; nD2 = false;

                                                if (BallType == Rooms.Games.FreezePowerUp.OrangeSnowball)
                                                {
                                                    User.FreezeBalls -= 1;
                                                    Item2.ExtraData = "6000";
                                                    Item2.UpdateState(false, true);
                                                    Thread.Sleep(2000);
                                                    BreakIceBlock(Item2, Item2);
                                                    FreezeUser(Item2, Item2);
                                                }
                                                else
                                                {
                                                    User.FreezeBalls -= 1;
                                                    Item2.ExtraData = "1000";
                                                    Item2.UpdateState(false, true);
                                                    Thread.Sleep(2000);
                                                    BreakIceBlock(Item2, Item2);
                                                    FreezeUser(Item2, Item2);
                                                }

                                                if (BallType == Rooms.Games.FreezePowerUp.None)
                                                {
                                                    BallType = Rooms.Games.FreezePowerUp.None;
                                                    for (int i = 1; i < 20; i++)
                                                    {
                                                        if (User.FreezeRange >= i)
                                                        {
                                                            Thread.Sleep(200);
                                                            foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeTiles.Values)
                                                            {
                                                                if (Item3.Int32_0 == Item.Int32_0 && Item3.Int32_1 == Item.Int32_1 + i && !pX) { pX = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 && Item3.Int32_1 == Item.Int32_1 - i && !pY) { pY = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 && !nX) { nX = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 - i && Item3.Int32_1 == Item.Int32_1 && !nY) { nY = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            }
                                                        }
                                                    }
                                                }

                                                else if (BallType == Rooms.Games.FreezePowerUp.GreenArrow)
                                                {
                                                    BallType = Rooms.Games.FreezePowerUp.None;
                                                    for (int i = 1; i < 20; i++)
                                                    {
                                                        if (User.FreezeRange >= i)
                                                        {
                                                            Thread.Sleep(200);
                                                            foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeTiles.Values)
                                                            {
                                                                if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 + i && !pD1) { pD1 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 - i && !nD1) { nD1 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 - i && Item3.Int32_1 == Item.Int32_1 + i && !pD2) { pD2 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 - i && Item3.Int32_1 == Item.Int32_1 - i && !nD2) { nD2 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            }
                                                        }
                                                    }
                                                    User.freezePowerUp = Rooms.Games.FreezePowerUp.None;
                                                }

                                                else if (BallType == Rooms.Games.FreezePowerUp.OrangeSnowball)
                                                {
                                                    BallType = Rooms.Games.FreezePowerUp.None;
                                                    for (int i = 1; i < 20; i++)
                                                    {
                                                        if (User.FreezeRange >= i)
                                                        {
                                                            Thread.Sleep(200);
                                                            foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeTiles.Values)
                                                            {
                                                                if (Item3.Int32_0 == Item.Int32_0 && Item3.Int32_1 == Item.Int32_1 + i && !pX) { pX = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 && Item3.Int32_1 == Item.Int32_1 - i && !pY) { pY = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                                if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 && !nX) { nX = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
//.........这里部分代码省略.........
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:101,代码来源:InteractorFreezeIceBlock.cs

示例12: OnTrigger

        public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            RoomUser User = Item.method_8().GetRoomUserByHabbo((uint)Session.GetHabbo().Id);

            if (User == null)
            {
                return;
            }

            if (Request == 0 && Item.FireWorkCount > 0 && Item.ExtraData == "1")
            {
                Item.ExtraData = "2";
                Item.UpdateState(false, true);

                if (Item.FireWorkCount > 0)
                {
                    Task T = null;
                    T = new Task(delegate() { Action(Item, T, "1"); });
                    T.Start();
                }
                else
                {
                    Task T = null;
                    T = new Task(delegate() { Action(Item, T, "0"); });
                    T.Start();
                }
            }
            else if (Request == 1)
            {
                ServerMessage PixelMessage = new ServerMessage(629);
                PixelMessage.AppendUInt(Item.uint_0);
                PixelMessage.AppendInt32(Item.FireWorkCount);
                PixelMessage.AppendBoolean(false);
                PixelMessage.AppendInt32(Pixels); // pixels :D
                PixelMessage.AppendBoolean(false);
                PixelMessage.AppendInt32(Fireworks); // 10 fireworks :D
                Session.SendMessage(PixelMessage);
            }
            else if (Request == 2 && Session.GetHabbo().ActivityPoints >= 20)
            {
                Item.FireWorkCount += Fireworks;

                Session.GetHabbo().FireworkPixelLoadedCount += Pixels;
                Session.GetHabbo().ActivityPoints -= 20;
                Session.GetHabbo().method_15(true);

                using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
                {
                    dbClient.AddParamWithValue("itemid", Item.uint_0);
                    dbClient.AddParamWithValue("sessionid", Session.GetHabbo().Id);
                    dbClient.ExecuteQuery("UPDATE items SET fw_count = fw_count + '" + Fireworks + "' WHERE id = @itemid LIMIT 1");
                    dbClient.ExecuteQuery("UPDATE user_stats SET fireworks = fireworks + '" + Pixels + "' WHERE id = @sessionid LIMIT 1");
                }

                ServerMessage PixelMessage = new ServerMessage(629);
                PixelMessage.AppendUInt(Item.uint_0);
                PixelMessage.AppendInt32(Item.FireWorkCount);
                PixelMessage.AppendBoolean(false);
                PixelMessage.AppendInt32(Pixels); // pixels :D
                PixelMessage.AppendBoolean(false);
                PixelMessage.AppendInt32(Fireworks); // 10 fireworks :D
                Session.SendMessage(PixelMessage);

                if (Item.ExtraData == "0")
                {
                    Item.ExtraData = "1";
                    Item.UpdateState(true, true);
                }

                Session.GetHabbo().CheckFireworkAchievements();
            }
        }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:72,代码来源:InteractorFirework.cs

示例13: OnTrigger

        public async override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            if (Session == null || Session.GetHabbo() == null)
            {
                return;
            }

            if (string.IsNullOrEmpty(Item.ExtraData))
            {
                return;
            }

            if (Item == null || Item.method_8() == null)
            {
                return;
            }

            Room @class = Item.method_8();

            if (@class == null)
            {
                return;
            }

            RoomUser User = @class.GetRoomUserByHabbo(Session.GetHabbo().Id);

            if (User.Freezed == false)
            {
                if (User.team != Rooms.Games.Team.None)
                {
                    if (Item.method_8().frzTimer == true)
                    {
                        if (Item.Int32_0 == User.int_3 || Item.Int32_0 - 1 == User.int_3 || Item.Int32_0 + 1 == User.int_3)
                        {
                            if (Item.Int32_1 == User.int_4 || Item.Int32_1 - 1 == User.int_4 || Item.Int32_1 + 1 == User.int_4)
                            {
                                if (User.FreezeBalls > 0)
                                {
                                    foreach (RoomItem Item2 in Item.method_8().GetFreeze().freezeTiles.Values)
                                    {
                                        if (Item2.Int32_0 == Item.Int32_0 && Item2.Int32_1 == Item.Int32_1 && (Item2.ExtraData == "11200" || string.IsNullOrEmpty(Item2.ExtraData)))
                                        {
                                            Rooms.Games.FreezePowerUp BallType = User.freezePowerUp;
                                            User.freezePowerUp = Rooms.Games.FreezePowerUp.None;

                                            bool pX, pY, pD1, pD2, nX, nY, nD1, nD2;
                                            pX = false; pY = false; pD1 = false; pD2 = false; nX = false; nY = false; nD1 = false; nD2 = false;

                                            if (BallType == Rooms.Games.FreezePowerUp.OrangeSnowball)
                                            {
                                                User.FreezeBalls -= 1;
                                                Item2.ExtraData = "6000";
                                                Item2.UpdateState(false, true);
                                                await Task.Delay(2000);
                                                BreakIceBlock(Item2, Item2);
                                                FreezeUser(Item2, Item2);
                                            }
                                            else
                                            {
                                                User.FreezeBalls -= 1;
                                                Item2.ExtraData = "1000";
                                                Item2.UpdateState(false, true);
                                                await Task.Delay(2000);
                                                BreakIceBlock(Item2, Item2);
                                                FreezeUser(Item2, Item2);
                                            }

                                            if (BallType == Rooms.Games.FreezePowerUp.None)
                                            {
                                                for (int i = 1; i < 20; i++)
                                                {
                                                    if (User.FreezeRange >= i)
                                                    {
                                                        await Task.Delay(200);
                                                        foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeTiles.Values)
                                                        {
                                                            if (Item3.Int32_0 == Item.Int32_0 && Item3.Int32_1 == Item.Int32_1 + i && !pX) { pX = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            if (Item3.Int32_0 == Item.Int32_0 && Item3.Int32_1 == Item.Int32_1 - i && !pY) { pY = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 && !nX) { nX = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            if (Item3.Int32_0 == Item.Int32_0 - i && Item3.Int32_1 == Item.Int32_1 && !nY) { nY = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                        }
                                                    }
                                                }
                                            }

                                            else if (BallType == Rooms.Games.FreezePowerUp.GreenArrow)
                                            {
                                                for (int i = 1; i < 20; i++)
                                                {
                                                    if (User.FreezeRange >= i)
                                                    {
                                                        await Task.Delay(200);
                                                        foreach (RoomItem Item3 in Item.method_8().GetFreeze().freezeTiles.Values)
                                                        {
                                                            if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 + i && !pD1) { pD1 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            if (Item3.Int32_0 == Item.Int32_0 + i && Item3.Int32_1 == Item.Int32_1 - i && !nD1) { nD1 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            if (Item3.Int32_0 == Item.Int32_0 - i && Item3.Int32_1 == Item.Int32_1 + i && !pD2) { pD2 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                            if (Item3.Int32_0 == Item.Int32_0 - i && Item3.Int32_1 == Item.Int32_1 - i && !nD2) { nD2 = BreakIceBlock(Item, Item3); FreezeUser(Item, Item3); }
                                                        }
                                                    }
//.........这里部分代码省略.........
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:101,代码来源:InteractorFreezeIceBlock.cs

示例14: UnlockGate

 private void UnlockGate(RoomItem item)
 {
     switch (item.GetBaseItem().InteractionType)
     {
         case "freeze_blue_gate":
         case "freeze_red_gate":
         case "freeze_green_gate":
         case "freeze_yellow_gate":
             item.method_8().method_38(item.Int32_0, item.Int32_1);
             break;
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:12,代码来源:GameManager.cs

示例15: method_25

        public void method_25()
        {
            this.hashtable_0.Clear();
            this.hashtable_4.Clear();
            DataTable dataTable;
            using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
            {
                dataTable = @class.ReadDataTable("SELECT Id, base_item, extra_data, x, y, z, rot, wall_pos FROM items WHERE room_id = '" + this.uint_0 + "' ORDER BY room_id DESC");
            }
            if (dataTable != null)
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    RoomItem class2 = new RoomItem((uint)dataRow["Id"], this.Id, (uint)dataRow["base_item"], (string)dataRow["extra_data"], (int)dataRow["x"], (int)dataRow["y"], (double)dataRow["z"], (int)dataRow["rot"], (string)dataRow["wall_pos"], this);
                    if (class2.Boolean_0)
                    {
                        this.bool_11 = true;
                    }
                    if (class2.GetBaseItem().InteractionType.ToLower().Contains("wf_") || class2.GetBaseItem().InteractionType.ToLower().Contains("fbgate"))
                    {
                        DataRow dataRow2;
                        using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                        {
                            dataRow2 = @class.ReadDataRow("SELECT extra1,extra2,extra3,extra4,extra5 FROM wired_items WHERE item_id = '" + class2.uint_0 + "'");
                        }
                        if (dataRow2 != null)
                        {
                            class2.string_2 = (string)dataRow2["extra1"];
                            class2.string_3 = (string)dataRow2["extra2"];
                            class2.string_4 = (string)dataRow2["extra3"];
                            class2.string_5 = (string)dataRow2["extra4"];
                            class2.string_6 = (string)dataRow2["extra5"];
                        }
                    }
                    if (class2.GetBaseItem().InteractionType.ToLower() == "firework")
                    {
                        DataRow dataRow2;
                        using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                        {
                            dataRow2 = @class.ReadDataRow("SELECT fw_count FROM items WHERE id = '" + class2.uint_0 + "'");
                        }
                        if (dataRow2 != null)
                        {
                            class2.FireWorkCount = (int)dataRow2["fw_count"];
                        }
                    }

                    if (class2.GetBaseItem().InteractionType.ToLower() == "jukebox")
                    {
                        RoomMusicController roomMusicController = class2.method_8().GetRoomMusicController();
                        roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(class2);
                    }
                    string text = class2.GetBaseItem().InteractionType.ToLower();
                    switch (text)
                    {
                        case "dice":
                            if (class2.ExtraData == "-1")
                            {
                                class2.ExtraData = "0";
                            }
                            break;
                        case "fbgate":
                            if (class2.ExtraData != "" && class2.ExtraData.Contains(','))
                            {
                                class2.string_2 = class2.ExtraData.Split(new char[]
                            {
                                ','
                            })[0];
                                class2.string_3 = class2.ExtraData.Split(new char[]
                            {
                                ','
                            })[1];
                            }
                            break;
                        case "dimmer":
                            if (this.class67_0 == null)
                            {
                                this.class67_0 = new MoodlightData(class2.uint_0);
                            }
                            break;
                        case "bb_patch":
                            this.list_5.Add(class2);
                            if (class2.ExtraData == "5")
                            {
                                this.list_6.Add(class2);
                            }
                            else
                            {
                                if (class2.ExtraData == "8")
                                {
                                    this.list_7.Add(class2);
                                }
                                else
                                {
                                    if (class2.ExtraData == "11")
                                    {
                                        this.list_9.Add(class2);
                                    }
                                    else
                                    {
//.........这里部分代码省略.........
开发者ID:vaguinhogato,项目名称:Gold-Tree-Emulator,代码行数:101,代码来源:Room.cs


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