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


C# Player.setTeleblockTime方法代碼示例

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


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

示例1: teleblockPlayer

 public static void teleblockPlayer(Player killer, Player target)
 {
     int teleblockDelay = 300000;
     if (target.getPrayers().getHeadIcon() == PrayerData.MAGIC)
     {
         teleblockDelay = 150000;
     }
     target.setTemporaryAttribute("teleblocked", true);
     target.setTeleblockTime(Environment.TickCount + teleblockDelay);
     Event removeTeleBlockEvent = new Event(teleblockDelay);
     removeTeleBlockEvent.setAction(() =>
     {
         removeTeleBlockEvent.stop();
         if (target != null)
         {
             target.removeTemporaryAttribute("teleblocked");
             target.setTeleblockTime(0);
         }
     });
     Server.registerEvent(removeTeleBlockEvent);
 }
開發者ID:ramatronics,項目名稱:rsps,代碼行數:21,代碼來源:MagicCombat.cs

示例2: resetVariables

 private void resetVariables(Player p)
 {
     p.setSkullCycles(0);
     p.getSpecialAttack().resetSpecial();
     p.setLastkiller(null);
     p.setDead(false);
     p.setEntityFocus(65535);
     p.setPoisonAmount(0);
     p.clearKillersHits();
     p.setLastVengeanceTime(0);
     p.setVengeance(false);
     p.removeTemporaryAttribute("willDie");
     p.setFrozen(false);
     p.removeTemporaryAttribute("unmovable");
     p.setAntifireCycles(0);
     p.setSuperAntipoisonCycles(0);
     p.setTeleblockTime(0);
     p.removeTemporaryAttribute("teleblocked");
     p.setTarget(null);
     p.setAttacker(null);
     foreach (Skills.SKILL skill in Enum.GetValues(typeof(Skills.SKILL)))
         p.getSkills().setCurLevel(skill, p.getSkills().getMaxLevel(skill));
     p.getPackets().sendSkillLevels();
     Prayer.deactivateAllPrayers(p);
     if (p.getTemporaryAttribute("cantDoAnything") != null)
     {
         p.getAppearance().setInvisible(false);
         p.getUpdateFlags().setAppearanceUpdateRequired(true);
         p.removeTemporaryAttribute("cantDoAnything");
         p.removeTemporaryAttribute("unmovable");
         teleportToWaitingRoom(p, false);
         p.getPackets().closeInterfaces();
         p.getPackets().setMinimapStatus(0);
         p.getPackets().clearMapFlag();
     }
 }
開發者ID:ramatronics,項目名稱:rsps,代碼行數:36,代碼來源:FightPits.cs


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