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


C# Player.setBarrowTunnel方法代码示例

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


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

示例1: enterCrypt

	    /*
	     * The config to remove roofs is 1270
	     * The door is 6713
	     * 
	     * Random door configs 
	     * CONFIG = 452    0
           CONFIG = 452    32
           CONFIG = 452    96
           CONFIG = 452    16480
           CONFIG = 452    278624
           CONFIG = 452    802912
           CONFIG = 452    2900064
           CONFIG = 452    2637920
           CONFIG = 452    2638944
           CONFIG = 452    2640992
           CONFIG = 452    2645088
           CONFIG = 452    2653280
           CONFIG = 452    2649184
	     */
	
	
	
	    public static bool enterCrypt(Player p) {
		    for (int i = 0; i < MOUND_COORDS.Length; i++) {
			    for (int j = 0; j < MOUND_COORDS[i].Length; j++) {
                    if (p.getLocation().inArea(MOUND_COORDS[i][0], MOUND_COORDS[i][1], MOUND_COORDS[i][2], MOUND_COORDS[i][3]) && p.getLocation().getZ() == 0)
                    {
                        p.teleport(new Location(STAIR_COORDS[i][0], STAIR_COORDS[i][1], 3));
					    if (p.getBarrowTunnel() == -1) {
						    p.setBarrowTunnel(misc.random(5));
					    }
					    return true;
				    }
			    }
		    }
		    return false;
	    }
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:37,代码来源:Barrows.cs

示例2: updateVariables


//.........这里部分代码省略.........
                    Barrows.prayerDrainEvent(p);
                    bool allBrothersKilled = true;
                    for (int i = 0; i < 6; i++)
                    {
                        if (!p.getBarrowBrothersKilled(i))
                        {
                            allBrothersKilled = false;
                        }
                    }
                    if (allBrothersKilled)
                    {
                        Barrows.startEarthQuake(p);
                    }
                }
            }
            else
            {
                if (p.getTemporaryAttribute("atBarrows") != null)
                {
                    bool allBrothersKilled = true;
                    for (int i = 0; i < 6; i++)
                    {
                        if (!p.getBarrowBrothersKilled(i))
                        {
                            allBrothersKilled = false;
                        }
                    }
                    if (allBrothersKilled)
                    {
                        for (int i = 0; i < 6; i++)
                        {
                            p.setBarrowBrothersKilled(i, false);

                            p.setBarrowTunnel(-1);
                            p.setBarrowKillCount(0);
                            p.getPackets().resetCamera();
                            p.removeTemporaryAttribute("lootedBarrowChest");
                        }
                        p.getPackets().resetCamera();
                        p.getPackets().sendRemoveOverlay();
                        p.removeTemporaryAttribute("atBarrows");
                        p.removeTemporaryAttribute("barrowTunnel");
                        p.getPackets().setMinimapStatus(0);
                        Barrows.removeBrotherFromGame(p);
                    }
                }
                if (Location.atGodwars(p.getLocation()))
                {
                    if (p.getTemporaryAttribute("atGodwars") == null)
                    {
                        p.getPackets().sendOverlay(601);
                        p.setTemporaryAttribute("atGodwars", true);
                    }
                }
                else
                {
                    if (p.getTemporaryAttribute("atGodwars") != null)
                    {
                        p.getPackets().sendRemoveOverlay();
                        p.removeTemporaryAttribute("atGodwars");
                    }
                }
                if (Location.atAgilityArena(p.getLocation()))
                {
                    if (p.getTemporaryAttribute("atAgilityArena") == null)
                    {
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:67,代码来源:AreaVariables.cs


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