當前位置: 首頁>>代碼示例>>C#>>正文


C# Player.getBarrowKillCount方法代碼示例

本文整理匯總了C#中WorldServer.player.Player.getBarrowKillCount方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.getBarrowKillCount方法的具體用法?C# Player.getBarrowKillCount怎麽用?C# Player.getBarrowKillCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WorldServer.player.Player的用法示例。


在下文中一共展示了Player.getBarrowKillCount方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: getBarrowReward

 protected static void getBarrowReward(Player p)
 {
     int barrowChance = misc.random(BARROWS_CHANCE);
     int killCount = p.getBarrowKillCount();
     if (barrowChance == 0) {
         int reward = BARROW_REWARDS[misc.random(BARROW_REWARDS.Length - 1)];
         p.getInventory().addItemOrGround(reward);
     }
     if (misc.random(20) == 0) {
         p.getInventory().addItemOrGround(1149); // Dragon med helm.
     } else if (misc.random(15) == 0) {
         int halfKey = misc.random(1) == 0 ? 985 : 987;
         p.getInventory().addItemOrGround(halfKey); // Half key.
     }
     if (misc.random(3) == 0 || p.getBarrowTunnel() == KARIL) { // Bolt racks.
         int amount = getAmountOfReward(4740, killCount);
         p.getInventory().addItemOrGround(4740, amount);
     }
     if (misc.random(3) == 0) { // Blood runes
         int amount = getAmountOfReward(565, killCount);
         p.getInventory().addItemOrGround(565, amount);
     }
     if (misc.random(2) == 0) { // Death runes
         int amount = getAmountOfReward(560, killCount);
         p.getInventory().addItemOrGround(560, amount);
     }
     if (misc.random(1) == 0) { // Chaos runes
         int amount = getAmountOfReward(562, killCount);
         p.getInventory().addItemOrGround(562, amount);
     }
     if (misc.random(1) == 0) { // Coins
         int amount = getAmountOfReward(995, killCount);
         p.getInventory().addItemOrGround(995, amount);
     }
     if (misc.random(1) == 0) {
         int amount = getAmountOfReward(558, killCount); // Mind runes.
         p.getInventory().addItemOrGround(558, amount);
     }
 }
開發者ID:Krill156,項目名稱:SharpEMU,代碼行數:39,代碼來源:Barrows.cs

示例2: killBrother

 public static void killBrother(Player p, int id)
 {
     for (int i = 0; i < BROTHER_ID.Length; i++) {
         if (id == BROTHER_ID[i]) {
             p.setBarrowBrothersKilled(i, true);
             p.setBarrowKillCount(p.getBarrowKillCount() + 1);
             p.getPackets().modifyText("Kill Count: "+p.getBarrowKillCount(), 24, 0);
             break;
         }
     }
 }
開發者ID:Krill156,項目名稱:SharpEMU,代碼行數:11,代碼來源:Barrows.cs

示例3: updateVariables

        /*
         * NOTE: Anything that goes in here and varies between HD and LD,
         * reset the variable in ActionSender.configureGameScreen
         */
        public void updateVariables(Player p)
        {
            int currentLevel = p.getLocation().wildernessLevel();
            if (currentLevel != -1)
            { //Is in wilderness.
                int lastWildLevel = (p.getTemporaryAttribute("wildLvl") == null) ? -1 : (int)p.getTemporaryAttribute("wildLvl");

                if (currentLevel != lastWildLevel)
                {
                    if (currentLevel > 0)
                    {
                        p.setTemporaryAttribute("wildLvl", currentLevel);
                        if (p.getTemporaryAttribute("inWild") == null)
                        {
                            p.getPackets().sendPlayerOption("Attack", 1, 1);
                            p.getPackets().sendOverlay(381);
                            p.setTemporaryAttribute("inWild", true);
                        }
                    }
                    else
                    {
                        if (p.getTemporaryAttribute("inWild") != null)
                        {
                            p.getPackets().sendPlayerOption("null", 1, 1);
                            p.getPackets().sendRemoveOverlay();
                            p.removeTemporaryAttribute("wildLvl");
                            p.removeTemporaryAttribute("inWild");
                        }
                    }
                }
            }
            if (Location.inMultiCombat(p.getLocation()))
            {
                if (p.getTemporaryAttribute("inMulti") == null)
                {
                    p.getPackets().displayMultiIcon();
                    p.setTemporaryAttribute("inMulti", true);
                }
            }
            else
            {
                if (p.getTemporaryAttribute("inMulti") != null)
                {
                    p.getPackets().removeMultiIcon();
                    p.removeTemporaryAttribute("inMulti");
                }
            }
            if (Location.atDuelArena(p.getLocation()))
            {
                if (p.getDuel() != null)
                {
                    if (p.getDuel().getStatus() == 5 || p.getDuel().getStatus() == 6)
                    {
                        p.getPackets().sendPlayerOption("Fight", 1, 1);
                    }
                }
                if (p.getTemporaryAttribute("challengeUpdate") != null)
                {
                    p.getPackets().sendPlayerOption("Challenge", 1, 0);
                    p.removeTemporaryAttribute("challengeUpdate");
                }
                if (p.getTemporaryAttribute("atDuelArea") == null)
                {
                    p.getPackets().sendPlayerOption("Challenge", 1, 0);
                    p.getPackets().sendOverlay(638);
                    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;
//.........這裏部分代碼省略.........
開發者ID:Krill156,項目名稱:SharpEMU,代碼行數:101,代碼來源:AreaVariables.cs


注:本文中的WorldServer.player.Player.getBarrowKillCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。