本文整理匯總了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);
}
示例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();
}
}