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


C# Player.getPrayers方法代码示例

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


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

示例1: deactivateAllPrayers

        public static void deactivateAllPrayers(Player p)
        {
            p.getPrayers().setPrayerDrain(0.0);
            p.getPrayers().setSuperPrayer(0);
            p.getPrayers().setAttackPrayer(0);
            p.getPrayers().setDefencePrayer(0);
            p.getPrayers().setStrengthPrayer(0);
            p.getPrayers().setRangePrayer(0);
            p.getPrayers().setMagicPrayer(0);
            p.getPrayers().setOverheadPrayer(0);
            p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
            p.getPrayers().setProtectItem(false);
            p.getPrayers().setRapidRestore(false);
            p.getPrayers().setRapidHeal(false);
            //TODO: figure out why it sends the same sendConfig 3 times for the same prayers LOL.
            //TODO: Uncomment this loop after?
            //This loop below would unset all those prayer config's without doing them 3 times and less code.
            /*foreach (int prayerConfigId in PRAYER_CONFIG)
            {
                p.getPackets().sendConfig(prayerConfigId, 0);
            }*/

            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.RAPID_RESTORE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.RAPID_HEAL], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PROTECT_ITEM], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.THICK_SKIN], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ROCK_SKIN], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.STEEL_SKIN], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.BURST_OF_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SUPERHUMAN_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ULTIMATE_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CLARITY_OF_THOUGHT], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.IMPROVED_REFLEXES], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.INCREDIBLE_REFLEXES], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SHARP_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.EAGLE_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.HAWK_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_WILL], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_LORE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_MIGHT], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PROTECT_FROM_RANGED], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PROTECT_FROM_MELEE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.RETRIBUTION], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.REDEMPTION], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SMITE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PROTECT_FROM_MAGIC], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.BURST_OF_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SUPERHUMAN_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ULTIMATE_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CLARITY_OF_THOUGHT], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.IMPROVED_REFLEXES], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.INCREDIBLE_REFLEXES], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.HAWK_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.EAGLE_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_WILL], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_LORE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_MIGHT], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SHARP_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.BURST_OF_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SUPERHUMAN_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ULTIMATE_STRENGTH], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CLARITY_OF_THOUGHT], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.IMPROVED_REFLEXES], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.INCREDIBLE_REFLEXES], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SHARP_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.HAWK_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.EAGLE_EYE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_LORE], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_MIGHT], 0);
            p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_WILL], 0);

            foreach (Prayer prayer in Enum.GetValues(typeof(Prayer))) {
                p.getPrayers().setPrayerActive(prayer, false);
            }
        }
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:81,代码来源:Prayer.cs

示例2: startPrayerDrainEvent

 public static void startPrayerDrainEvent(Player p)
 {
     Event prayerDrainEvent = new Event(600);
     prayerDrainEvent.setAction(() => {
         if (p == null || p.isDead() || !isPrayerActive(p)) {
             prayerDrainEvent.stop();
             return;
         }
         double amountDrain = 0.0;
         foreach (Prayer prayer in Enum.GetValues(typeof(Prayer)))
         {
             if(p.getPrayers().isPrayerActive(prayer)) {
                 double drain = DRAIN_RATE[(int)prayer];
                 double bonus = (0.035 * p.getEquipment().getBonus(Equipment.BONUS.PRAYER));
                 drain = drain * (1 + bonus);
                 drain = 0.6 / drain;
                 amountDrain += drain;
             }
         }
         p.decreasePrayerPoints(amountDrain);
         if(p.getSkills().getCurLevel(Skills.SKILL.PRAYER) <= 0)
             prayerDrainEvent.stop();
     });
     Server.registerEvent(prayerDrainEvent);
 }
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:25,代码来源:Prayer.cs

示例3: togglePrayer

 public static void togglePrayer(Player p, Prayer prayer)
 {
     if (p.isDead()) {
         return;
     }
     if (p.getSkills().getCurLevel(Skills.SKILL.PRAYER) <= 0)
     {
         deactivateAllPrayers(p);
         return;
     }
     p.getPackets().softCloseInterfaces();
     bool usingPrayer = isPrayerActive(p);
     switch(prayer) {
             case Prayer.THICK_SKIN: // thick skin
                 if (p.getPrayers().getDefencePrayer() != 1) {
                     p.getPrayers().setDefencePrayer(1);
                     p.getPrayers().setSuperPrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ROCK_SKIN], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.STEEL_SKIN], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.THICK_SKIN], 1);
                     p.getPrayers().setPrayerActive(Prayer.THICK_SKIN, true); // thick skin
                     p.getPrayers().setPrayerActive(Prayer.ROCK_SKIN, false); // rock skin
                     p.getPrayers().setPrayerActive(Prayer.STEEL_SKIN, false); // steel skin
                     p.getPrayers().setPrayerActive(Prayer.CHIVALRY, false); // chivalry
                     p.getPrayers().setPrayerActive(Prayer.PIETY, false); // piety
                 } else if (p.getPrayers().getDefencePrayer() == 1) {
                     p.getPrayers().setDefencePrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.THICK_SKIN], 0);
                     p.getPrayers().setPrayerActive(Prayer.THICK_SKIN, false);
                 }
                 break;
             case Prayer.ROCK_SKIN: // rock skin
                 if (p.getPrayers().getDefencePrayer() != 2) {
                     p.getPrayers().setDefencePrayer(2);
                     p.getPrayers().setSuperPrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.THICK_SKIN], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.STEEL_SKIN], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ROCK_SKIN], 1);
                     p.getPrayers().setPrayerActive(Prayer.THICK_SKIN, false); // thick skin
                     p.getPrayers().setPrayerActive(Prayer.ROCK_SKIN, true); // rock skin
                     p.getPrayers().setPrayerActive(Prayer.STEEL_SKIN, false); // steel skin
                     p.getPrayers().setPrayerActive(Prayer.CHIVALRY, false); // chivalry
                     p.getPrayers().setPrayerActive(Prayer.PIETY, false); // piety
                 } else if (p.getPrayers().getDefencePrayer() == 2) {
                     p.getPrayers().setDefencePrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ROCK_SKIN], 0);
                     p.getPrayers().setPrayerActive(Prayer.ROCK_SKIN, false);
                 }
                 break;
             case Prayer.STEEL_SKIN: // steel skin
                 if (p.getPrayers().getDefencePrayer() != 3) {
                     p.getPrayers().setDefencePrayer(3);
                     p.getPrayers().setSuperPrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.THICK_SKIN], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ROCK_SKIN], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.STEEL_SKIN], 1);
                     p.getPrayers().setPrayerActive(Prayer.THICK_SKIN, false); // thick skin
                     p.getPrayers().setPrayerActive(Prayer.ROCK_SKIN, false); // rock skin
                     p.getPrayers().setPrayerActive(Prayer.STEEL_SKIN, true); // steel skin
                     p.getPrayers().setPrayerActive(Prayer.CHIVALRY, false); // chivalry
                     p.getPrayers().setPrayerActive(Prayer.PIETY, false); // piety
                 } else if (p.getPrayers().getDefencePrayer() == 3) {
                     p.getPrayers().setDefencePrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.STEEL_SKIN], 0);
                     p.getPrayers().setPrayerActive(Prayer.STEEL_SKIN, false);
                 }
                 break;
             case Prayer.BURST_OF_STRENGTH: // burst of strength
                 if (p.getPrayers().getStrengthPrayer() != 1) {
                     p.getPrayers().setStrengthPrayer(1);
                     p.getPrayers().setSuperPrayer(0);
                     p.getPrayers().setRangePrayer(0);
                     p.getPrayers().setMagicPrayer(0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SUPERHUMAN_STRENGTH], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.ULTIMATE_STRENGTH], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.CHIVALRY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PIETY], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.SHARP_EYE], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.EAGLE_EYE], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.HAWK_EYE], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_WILL], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_LORE], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.MYSTIC_MIGHT], 0);
                     p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.BURST_OF_STRENGTH], 1);
                     p.getPrayers().setPrayerActive(Prayer.BURST_OF_STRENGTH, true); // burst of strength
                     p.getPrayers().setPrayerActive(Prayer.SUPERHUMAN_STRENGTH, false); // superhuman strength
                     p.getPrayers().setPrayerActive(Prayer.ULTIMATE_STRENGTH, false); // ultimate strength
                     p.getPrayers().setPrayerActive(Prayer.CHIVALRY, false); // chivalry
                     p.getPrayers().setPrayerActive(Prayer.PIETY, false); // piety
                     p.getPrayers().setPrayerActive(Prayer.SHARP_EYE, false); // sharp eye
                     p.getPrayers().setPrayerActive(Prayer.HAWK_EYE, false); // hawk eye
                     p.getPrayers().setPrayerActive(Prayer.EAGLE_EYE, false); // eagle eye
                     p.getPrayers().setPrayerActive(Prayer.MYSTIC_WILL, false); // mystic will
                     p.getPrayers().setPrayerActive(Prayer.MYSTIC_LORE, false); // mystic lore
//.........这里部分代码省略.........
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:101,代码来源:Prayer.cs

示例4: forcePrayerOff

 /**
  * This is used for SpecialAttack Dragon Scimitar
  * Which turns of certain Prayer to be forced off.
  * Can be used for other things in the future.
  */
 public static void forcePrayerOff(Player p, Prayer prayer)
 {
     if (p.getPrayers().isPrayerActive(prayer))
     {
         switch (prayer)
         {
             case Prayer.THICK_SKIN: // thick skin
                 p.getPrayers().setDefencePrayer(0);
                 break;
             case Prayer.ROCK_SKIN: // rock skin
                 p.getPrayers().setDefencePrayer(0);
                 break;
             case Prayer.STEEL_SKIN: // steel skin
                 p.getPrayers().setDefencePrayer(0);
                 break;
             case Prayer.BURST_OF_STRENGTH: // burst of strength
                 p.getPrayers().setStrengthPrayer(0);
                 break;
             case Prayer.SUPERHUMAN_STRENGTH: // superhuman strength
                 p.getPrayers().setStrengthPrayer(0);
                 break;
             case Prayer.ULTIMATE_STRENGTH: // ultimate strength
                 p.getPrayers().setStrengthPrayer(0);
                 break;
             case Prayer.CLARITY_OF_THOUGHT: // clarity of thought
                 p.getPrayers().setAttackPrayer(0);
                 break;
             case Prayer.IMPROVED_REFLEXES: // improved reflexes
                 p.getPrayers().setAttackPrayer(0);
                 break;
             case Prayer.INCREDIBLE_REFLEXES: // incredible reflexes
                 p.getPrayers().setAttackPrayer(0);
                 break;
             case Prayer.PROTECT_FROM_MAGIC: // Magic protect
                 p.getPrayers().setOverheadPrayer(0);
                 p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
                 break;
             case Prayer.PROTECT_FROM_RANGED: // Ranged protect
                 p.getPrayers().setOverheadPrayer(0);
                 p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
                 break;
             case Prayer.PROTECT_FROM_MELEE: // Melee protect
                 p.getPrayers().setOverheadPrayer(0);
                 p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
                 break;
             case Prayer.RETRIBUTION: // Retribution
                 p.getPrayers().setOverheadPrayer(0);
                 p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
                 break;
             case Prayer.REDEMPTION: // Redemption
                 p.getPrayers().setOverheadPrayer(0);
                 p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
                 break;
             case Prayer.SMITE: // Smite
                 p.getPrayers().setOverheadPrayer(0);
                 p.getPrayers().setHeadIcon(PrayerHeadIcon.NOTHING);
                 break;
             case Prayer.CHIVALRY: // Chivalry
                 p.getPrayers().setSuperPrayer(0);
                 break;
             case Prayer.PIETY: // Piety
                 p.getPrayers().setSuperPrayer(0);
                 break;
             case Prayer.PROTECT_ITEM:
                 p.getPrayers().setProtectItem(false);
                 break;
             case Prayer.RAPID_RESTORE: // Rapid restore.
                 p.getPrayers().setRapidRestore(false);
                 break;
             case Prayer.RAPID_HEAL: // Rapid heal.
                 p.getPrayers().setRapidHeal(false);
                 break;
             case Prayer.SHARP_EYE: // Sharp Eye.
                 p.getPrayers().setRangePrayer(0);
                 break;
             case Prayer.HAWK_EYE: // Hawk Eye.
                 p.getPrayers().setRangePrayer(0);
                 break;
             case Prayer.EAGLE_EYE: // Eagle Eye.
                 p.getPrayers().setRangePrayer(0);
                 break;
             case Prayer.MYSTIC_WILL: // Mystic Will.
                 p.getPrayers().setMagicPrayer(0);
                 break;
             case Prayer.MYSTIC_LORE: // Mystic Lore.
                 p.getPrayers().setMagicPrayer(0);
                 break;
             case Prayer.MYSTIC_MIGHT: // Mystic Might.
                 p.getPrayers().setMagicPrayer(0);
                 break;
         }
         p.getPrayers().setPrayerActive(prayer, false);
         p.getPackets().sendConfig(PrayerData.PRAYER_CONFIG[(int)prayer], 0);
     }
 }
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:100,代码来源:Prayer.cs

示例5: isPrayerActive

 protected static bool isPrayerActive(Player p)
 {
     foreach (Prayer prayer in Enum.GetValues(typeof(Prayer))) {
         if (p.getPrayers().isPrayerActive(prayer))
             return true;
     }
     return false;
 }
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:8,代码来源:Prayer.cs

示例6: deactivateAllPrayers

 public static void deactivateAllPrayers(Player p)
 {
     p.getPrayers().setPrayerDrain(0.0);
     p.getPrayers().setSuperPrayer(0);
     p.getPrayers().setAttackPrayer(0);
     p.getPrayers().setDefencePrayer(0);
     p.getPrayers().setStrengthPrayer(0);
     p.getPrayers().setRangePrayer(0);
     p.getPrayers().setMagicPrayer(0);
     p.getPrayers().setOverheadPrayer(0);
     p.getPrayers().setHeadIcon(-1);
     p.getPrayers().setProtectItem(false);
     p.getPrayers().setRapidRestore(false);
     p.getPrayers().setRapidHeal(false);
     p.getPackets().sendConfig(89, 0);
     p.getPackets().sendConfig(90, 0);
     p.getPackets().sendConfig(91, 0);
     p.getPackets().sendConfig(83, 0);
     p.getPackets().sendConfig(86, 0);
     p.getPackets().sendConfig(92, 0);
     p.getPackets().sendConfig(84, 0);
     p.getPackets().sendConfig(87, 0);
     p.getPackets().sendConfig(93, 0);
     p.getPackets().sendConfig(85, 0);
     p.getPackets().sendConfig(88, 0);
     p.getPackets().sendConfig(94, 0);
     p.getPackets().sendConfig(862, 0);
     p.getPackets().sendConfig(866, 0);
     p.getPackets().sendConfig(864, 0);
     p.getPackets().sendConfig(863, 0);
     p.getPackets().sendConfig(865, 0);
     p.getPackets().sendConfig(867, 0);
     p.getPackets().sendConfig(1053, 0);
     p.getPackets().sendConfig(1052, 0);
     p.getPackets().sendConfig(96, 0);
     p.getPackets().sendConfig(97, 0);
     p.getPackets().sendConfig(98, 0);
     p.getPackets().sendConfig(99, 0);
     p.getPackets().sendConfig(100, 0);
     p.getPackets().sendConfig(95, 0);
     p.getPackets().sendConfig(84, 0);
     p.getPackets().sendConfig(87, 0);
     p.getPackets().sendConfig(93, 0);
     p.getPackets().sendConfig(85, 0);
     p.getPackets().sendConfig(88, 0);
     p.getPackets().sendConfig(94, 0);
     p.getPackets().sendConfig(1053, 0);
     p.getPackets().sendConfig(1052, 0);
     p.getPackets().sendConfig(864, 0);
     p.getPackets().sendConfig(866, 0);
     p.getPackets().sendConfig(863, 0);
     p.getPackets().sendConfig(865, 0);
     p.getPackets().sendConfig(867, 0);
     p.getPackets().sendConfig(862, 0);
     p.getPackets().sendConfig(84, 0);
     p.getPackets().sendConfig(87, 0);
     p.getPackets().sendConfig(93, 0);
     p.getPackets().sendConfig(85, 0);
     p.getPackets().sendConfig(88, 0);
     p.getPackets().sendConfig(94, 0);
     p.getPackets().sendConfig(1053, 0);
     p.getPackets().sendConfig(1052, 0);
     p.getPackets().sendConfig(862, 0);
     p.getPackets().sendConfig(864, 0);
     p.getPackets().sendConfig(866, 0);
     p.getPackets().sendConfig(865, 0);
     p.getPackets().sendConfig(867, 0);
     p.getPackets().sendConfig(863, 0);
     for (int i = 0; i < p.getPrayers().getPrayerActiveArray().Length; i++)
     {
         p.getPrayers().setPrayerActive(i, false);
     }
 }
开发者ID:ramatronics,项目名称:rsps,代码行数:73,代码来源:Prayer.cs

示例7: togglePrayer

        public static void togglePrayer(Player p, int prayerType, int prayerID)
        {
            if (p.isDead())
            {
                return;
            }
            if (p.getSkills().getCurLevel(Skills.SKILL.PRAYER) <= 0)
            {
                deactivateAllPrayers(p);
                return;
            }
            p.getPackets().softCloseInterfaces();
            bool usingPrayer = isPrayerActive(p);
            switch (prayerType)
            {
                case 1: // defence prayers
                    switch (prayerID)
                    {
                        case 1: // thick skin
                            if (p.getPrayers().getDefencePrayer() != 1)
                            {
                                p.getPrayers().setDefencePrayer(1);
                                p.getPrayers().setSuperPrayer(0);
                                p.getPackets().sendConfig(86, 0);
                                p.getPackets().sendConfig(92, 0);
                                p.getPackets().sendConfig(1052, 0);
                                p.getPackets().sendConfig(1053, 0);
                                p.getPackets().sendConfig(83, 1);
                                p.getPrayers().setPrayerActive(0, true); // thick skin
                                p.getPrayers().setPrayerActive(5, false); // rock skin
                                p.getPrayers().setPrayerActive(13, false); // steel skin
                                p.getPrayers().setPrayerActive(25, false); // chivalry
                                p.getPrayers().setPrayerActive(26, false); // piety
                            }
                            else if (p.getPrayers().getDefencePrayer() == 1)
                            {
                                p.getPrayers().setDefencePrayer(0);
                                p.getPackets().sendConfig(83, 0);
                                p.getPrayers().setPrayerActive(0, false);
                            }
                            break;

                        case 2: // rock skin
                            if (p.getPrayers().getDefencePrayer() != 2)
                            {
                                p.getPrayers().setDefencePrayer(2);
                                p.getPrayers().setSuperPrayer(0);
                                p.getPackets().sendConfig(83, 0);
                                p.getPackets().sendConfig(92, 0);
                                p.getPackets().sendConfig(1052, 0);
                                p.getPackets().sendConfig(1053, 0);
                                p.getPackets().sendConfig(86, 1);
                                p.getPrayers().setPrayerActive(0, false); // thick skin
                                p.getPrayers().setPrayerActive(5, true); // rock skin
                                p.getPrayers().setPrayerActive(13, false); // steel skin
                                p.getPrayers().setPrayerActive(25, false); // chivalry
                                p.getPrayers().setPrayerActive(26, false); // piety
                            }
                            else if (p.getPrayers().getDefencePrayer() == 2)
                            {
                                p.getPrayers().setDefencePrayer(0);
                                p.getPackets().sendConfig(86, 0);
                                p.getPrayers().setPrayerActive(5, false);
                            }
                            break;

                        case 3: // steel skin
                            if (p.getPrayers().getDefencePrayer() != 3)
                            {
                                p.getPrayers().setDefencePrayer(3);
                                p.getPrayers().setSuperPrayer(0);
                                p.getPackets().sendConfig(83, 0);
                                p.getPackets().sendConfig(86, 0);
                                p.getPackets().sendConfig(1052, 0);
                                p.getPackets().sendConfig(1053, 0);
                                p.getPackets().sendConfig(92, 1);
                                p.getPrayers().setPrayerActive(0, false); // thick skin
                                p.getPrayers().setPrayerActive(5, false); // rock skin
                                p.getPrayers().setPrayerActive(13, true); // steel skin
                                p.getPrayers().setPrayerActive(25, false); // chivalry
                                p.getPrayers().setPrayerActive(26, false); // piety
                            }
                            else if (p.getPrayers().getDefencePrayer() == 3)
                            {
                                p.getPrayers().setDefencePrayer(0);
                                p.getPackets().sendConfig(92, 0);
                                p.getPrayers().setPrayerActive(13, false);
                            }
                            break;
                    }
                    break;

                case 2: // strength prayers
                    switch (prayerID)
                    {
                        case 1: // burst of strength
                            if (p.getPrayers().getStrengthPrayer() != 1)
                            {
                                p.getPrayers().setStrengthPrayer(1);
                                p.getPrayers().setSuperPrayer(0);
//.........这里部分代码省略.........
开发者ID:ramatronics,项目名称:rsps,代码行数:101,代码来源:Prayer.cs

示例8: isPrayerActive

 protected static bool isPrayerActive(Player p)
 {
     for (int i = 0; i < p.getPrayers().getPrayerActiveArray().Length; i++)
     {
         if (p.getPrayers().isPrayerActive(i))
         {
             return true;
         }
     }
     return false;
 }
开发者ID:ramatronics,项目名称:rsps,代码行数:11,代码来源:Prayer.cs


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