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


C# Player.setTaggedLastAgilityPillar方法代码示例

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


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

示例1: tagPillar

	    public static void tagPillar(Player p, int pillarIndex) {
            AreaEvent tagPillarAreaEvent = new AreaEvent(p,  AGILITY_ARENA_PILLARS[pillarIndex][1]-1, AGILITY_ARENA_PILLARS[pillarIndex][2]-1, AGILITY_ARENA_PILLARS[pillarIndex][1]+1, AGILITY_ARENA_PILLARS[pillarIndex][2]+1);
            tagPillarAreaEvent.setAction(() => {
				if (p.getLocation().getZ() == 3) {
					p.setFaceLocation(new Location(AGILITY_ARENA_PILLARS[pillarIndex][1], AGILITY_ARENA_PILLARS[pillarIndex][2], 3));
					if (pillarIndex != currentPillar) {
						p.getPackets().sendMessage("You can only get a ticket when the flashing arrow is above the pillar!");
						return;
					}
                    if (p.isTaggedLastAgilityPillar())
                    {
						p.getPackets().sendMessage("You have already tagged this pillar, wait until the arrow moves again.");
						return;
					}
					int currentStatus = p.getAgilityArenaStatus();
					if (currentStatus == 0) {
						p.getPackets().sendConfig(309, 4);
						p.getPackets().sendMessage("You get tickets by tagging more than one pillar in a row. Tag the next pillar!");
					} else {
						p.getInventory().addItem(2996);
						p.getPackets().sendMessage("You recieve an Agility Arena ticket!");
					}
					p.setAgilityArenaStatus(currentStatus == 0 ? 1 : 1);
					p.setTaggedLastAgilityPillar(true);
				}
		    });
            Server.registerCoordinateEvent(tagPillarAreaEvent);
	    }
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:28,代码来源:AgilityArena.cs

示例2: updateVariables


//.........这里部分代码省略.........
                        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)
                    {
                        p.getPackets().sendOverlay(5);
                        AgilityArena.updatePillarForPlayer(p);
                        p.setTemporaryAttribute("atAgilityArena", true);
                    }
                    if (p.getLocation().getZ() == 0)
                    {
                        p.removeTemporaryAttribute("atAgilityArena");
                        p.getPackets().sendRemoveOverlay();
                        p.setAgilityArenaStatus(0);
                        p.setTaggedLastAgilityPillar(false);
                    }
                }
                else
                {
                    if (p.getTemporaryAttribute("atAgilityArena") != null)
                    {
                        p.getPackets().sendRemoveOverlay();
                        p.setAgilityArenaStatus(0);
                        p.setTaggedLastAgilityPillar(false);
                        p.removeTemporaryAttribute("atAgilityArena");
                    }
                }
                /*
                 * We check the cantDoAnything variable to determine whether they're using the orb.
                 */
                if (Location.inFightPitsWaitingArea(p.getLocation()))
                {
                    if (p.getTemporaryAttribute("waitingForFightPits") == null)
                    {
                        Server.getMinigames().getFightPits().addWaitingPlayer(p);
                        p.setTemporaryAttribute("waitingForFightPits", true);
                    }
                }
                else
                {
                    if (p.getTemporaryAttribute("waitingForFightPits") != null && p.getTemporaryAttribute("cantDoAnything") == null)
                    {
                        Server.getMinigames().getFightPits().removeWaitingPlayer(p);
                        p.removeTemporaryAttribute("waitingForFightPits");
                    }
                }
                if (Location.inFightPits(p.getLocation()))
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:67,代码来源:AreaVariables.cs


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