本文整理汇总了C#中WorldServer.player.Player.getBarrowBrothersKilled方法的典型用法代码示例。如果您正苦于以下问题:C# Player.getBarrowBrothersKilled方法的具体用法?C# Player.getBarrowBrothersKilled怎么用?C# Player.getBarrowBrothersKilled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldServer.player.Player
的用法示例。
在下文中一共展示了Player.getBarrowBrothersKilled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: openCoffin
public static bool openCoffin(Player p, int objectId)
{
if (objectId != 6823 && objectId != 6771 && objectId != 6821 && objectId != 6773 && objectId != 6822 && objectId != 6772) {
return false;
}
int cryptIndex = getCryptIndex(p);
if (cryptIndex == -1) {
return false;
}
if (p.getBarrowBrothersKilled(cryptIndex)) {
p.getPackets().sendMessage("You don't find anything.");
return true;
}
if (p.getBarrowTunnel() == cryptIndex){
p.getPackets().modifyText("You find a hidden tunnel, do you want to enter?", 210, 1);
p.getPackets().sendChatboxInterface(210);
p.setTemporaryAttribute("barrowTunnel", 1);
return true;
}
foreach(Npc n in Server.getNpcList()) {
if (n.getId() == BROTHER_ID[cryptIndex]) {
if (n.getOwner().Equals(p)) {
p.getPackets().sendMessage("You don't find anything.");
return true;
}
}
}
Npc npc = new Npc(BROTHER_ID[cryptIndex]);
npc.setLocation(p.getLocation());
npc.setEntityFocus(p.getClientIndex());
npc.setOwner(p);
npc.setTarget(p);
npc.setCombatTurns(npc.getAttackSpeed());
Server.getNpcList().Add(npc);
p.getPackets().setArrowOnEntity(1, npc.getClientIndex());
return true;
}
示例2: updateVariables
//.........这里部分代码省略.........
p.setTemporaryAttribute("atDuelArea", true);
}
}
else
{
if (p.getTemporaryAttribute("atDuelArea") != null)
{
p.getPackets().sendPlayerOption("null", 1, 0);
p.getPackets().sendRemoveOverlay();
p.removeTemporaryAttribute("atDuelArea");
}
}
if (Location.atBarrows(p.getLocation()))
{
if (p.getTemporaryAttribute("atBarrows") == null)
{
p.getPackets().sendOverlay(24);
p.getPackets().setMinimapStatus(2);
p.getPackets().sendConfig(452, 2652256); // doors
if (p.getTemporaryAttribute("betweenDoors") == null)
{
if (Barrows.betweenDoors(p))
{
p.setTemporaryAttribute("betweenDoors", true);
p.getPackets().sendConfig(1270, 1);
}
}
p.getPackets().modifyText("Kill Count: " + p.getBarrowKillCount(), 24, 0);
p.setTemporaryAttribute("atBarrows", true);
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");