本文整理汇总了C#中WorldServer.player.Player.getAttackSpeed方法的典型用法代码示例。如果您正苦于以下问题:C# Player.getAttackSpeed方法的具体用法?C# Player.getAttackSpeed怎么用?C# Player.getAttackSpeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldServer.player.Player
的用法示例。
在下文中一共展示了Player.getAttackSpeed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: newMagicAttack
//.........这里部分代码省略.........
if (target is Player) {
mp = ((Player) target).getPrayers().getHeadIcon() == PrayerData.MAGIC;
}
if (magicProtect) {
damage *= 0.60;
}
if (p.getEquipment().getItemInSlot(ItemData.EQUIP.WEAPON) == 8841) {
damage *= 1.10; // void mace 10% hit increase.
}
if (damage == 0 && index != 41 && index != 42 && index != 43 && index != 44 && index != 45 && index != 46 && index != 47) {
endGfx = 85;
}
if (!deleteRunes(p, RUNES[index], RUNE_AMOUNTS[index])) {
p.setTarget(null);
return;
}
p.getFollow().setFollowing(null);
p.getWalkingQueue().resetWalkingQueue();
p.getPackets().clearMapFlag();
p.setFaceLocation(target.getLocation());
if (HANDS_GFX[index] != -1) {
p.setLastGraphics(new Graphics(HANDS_GFX[index], 0 , getStartingGraphicHeight(index)));
}
p.setLastAnimation(new Animation(SPELL_ANIM[index]));
p.getPackets().closeInterfaces();
if (target is Player) {
((Player) target).getPackets().closeInterfaces();
}
target.setAttacker(p);
p.setTarget(target);
target.setLastAttacked(Environment.TickCount);
p.setLastAttack(Environment.TickCount);
p.setLastMagicAttack(Environment.TickCount);
p.setCombatTurns(p.getAttackSpeed());
Combat.setSkull(p, target);
if (damage > 0) {
frozen = freezeTarget(index, target);
if (!frozen && index == 31) {
endGfx = 1677;
}
}
if (AIR_GFX[index] != -1 || ((index == 31 || index == 27) && target is Player && ((Player)target).getWalkingQueue().isRunning())) {
sendProjectile(index, target, p);
}
if (damage > target.getHp()) {
damage = target.getHp();
}
if (index == 47 && misc.random(2) == 0) {
endGfx = 85;
}
Combat.checkIfWillDie(target, damage);
Event doMagicAttackEvent = new Event(getSpellHitDelay(index));
doMagicAttackEvent.setAction(() => {
doMagicAttackEvent.stop();
if (p == null || p.isDead() || !fakeNPC && (target.isDead() || target.isHidden() || target.isDestroyed())) {
return;
}
if (target.isAutoRetaliating() && target.getTarget() == null && damage > 0) {
if (target is Npc) {
} else {
if (((Player) target).getTemporaryAttribute("autoCastSpell") != null) {
int autoCastSpell = (int)((Player) target).getTemporaryAttribute("autoCastSpell");
((Player) target).setTemporaryAttribute("autoCasting", true);
target.setTarget(p);
MagicCombat.newMagicAttack((Player) target, p, autoCastSpell, ((Player) target).getTemporaryAttribute("autoCastAncients") != null);
}