本文整理匯總了C#中RS2.Server.player.Player.setAgilityArenaStatus方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.setAgilityArenaStatus方法的具體用法?C# Player.setAgilityArenaStatus怎麽用?C# Player.setAgilityArenaStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RS2.Server.player.Player
的用法示例。
在下文中一共展示了Player.setAgilityArenaStatus方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: updateVariables
//.........這裏部分代碼省略.........
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)
{
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");
}
}
示例2: 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);
}