Свернуть ↑
Index: AE-go_GameServer/src/com/aionemu/gameserver/skillengine/model/SkillTemplate.java
================================================== =================
--- AE-go_GameServer/src/com/aionemu/gameserver/skillengine/model/SkillTemplate.java (revision 2281)
+++ AE-go_GameServer/src/com/aionemu/gameserver/skillengine/model/SkillTemplate.java (working copy)
@@ -70,7 +70,7 @@
protected ActivationAttribute activationAttribute;
@XmlAttribute(required = true)
protected int duration;
- @XmlAttribute
+ @XmlAttribute(name = "cooldown")
protected int cooldown;
@XmlAttribute(name = "penalty_skill_id")
protected int penaltySkillId;
Index: AE-go_GameServer/src/com/aionemu/gameserver/controllers/PlayerController.java
================================================== =================
--- AE-go_GameServer/src/com/aionemu/gameserver/controllers/PlayerController.java (revision 2281)
+++ AE-go_GameServer/src/com/aionemu/gameserver/controllers/PlayerController.java (working copy)
@@ -37,6 +37,7 @@
import com.aionemu.gameserver.model.gameobjects.state.Cre atureVisualState;
import com.aionemu.gameserver.model.gameobjects.stats.Pla yerGameStats;
import com.aionemu.gameserver.model.templates.quest.Quest Items;
+import com.aionemu.gameserver.model.gameobjects.stats.Sta tEnum;
import com.aionemu.gameserver.model.templates.stats.Playe rStatsTemplate;
import com.aionemu.gameserver.network.aion.serverpackets. SM_ATTACK;
import com.aionemu.gameserver.network.aion.serverpackets. SM_ATTACK_STATUS;
@@ -76,7 +77,7 @@
* This class is for controlling players.
*
* @author -Nemesiss-, ATracer (2009-09-29), xavier, Sarynth
- *
+ * @author RotO (Attack-speed hack protection)
*/
public class PlayerController extends CreatureController<Player>
{
@@ -87,6 +88,8 @@
*/
private volatile byte zoneUpdateMask;
+ private long lastAttackMilis = 0;
+
/**
* {@inheritDoc}
*/
@@ -325,7 +328,18 @@
if(!RestrictionsManager.canAttack(player, target))
return;
-
+
+ int attackSpeed = gameStats.getCurrentStat(StatEnum.ATTACK_SPEED);
+ long milis = System.currentTimeMillis();
+ if (milis - lastAttackMilis < attackSpeed)
+ {
+ /**
+ * Hack!
+ */
+ return;
+ }
+ lastAttackMilis = milis;
+
/**
* notify attack observers
*/
@@ -674,4 +688,4 @@
{
return sp.getItemService().addItems(getOwner(), Collections.singletonList(new QuestItems(itemId, count)));
}
-}
\ No newline at end of file
+}
Index: AE-go_GameServer/src/com/aionemu/gameserver/controllers/SummonController.java
================================================== =================
--- AE-go_GameServer/src/com/aionemu/gameserver/controllers/SummonController.java (revision 2281)
+++ AE-go_GameServer/src/com/aionemu/gameserver/controllers/SummonController.java (working copy)
@@ -26,6 +26,7 @@
import com.aionemu.gameserver.model.gameobjects.VisibleOb ject;
import com.aionemu.gameserver.model.gameobjects.Summon.Su mmonMode;
import com.aionemu.gameserver.model.gameobjects.player.Pl ayer;
+import com.aionemu.gameserver.model.gameobjects.stats.Sta tEnum;
import com.aionemu.gameserver.network.aion.serverpackets. SM_ATTACK;
import com.aionemu.gameserver.network.aion.serverpackets. SM_ATTACK_STATUS;
import com.aionemu.gameserver.network.aion.serverpackets. SM_EMOTION;
@@ -43,10 +44,12 @@
/**
* @author ATracer
- *
+ * @author RotO (Attack-speed hack protection)
*/
public class SummonController extends CreatureController<Summon>
{
+ private long lastAttackMilis = 0;
+
@Override
public void notSee(VisibleObject object, boolean isOutOfRange)
{
@@ -180,6 +183,18 @@
if(!summon.isEnemy(target))
return;
+
+ int attackSpeed = summon.getGameStats().getCurrentStat(StatEnum.ATTA CK_SPEED);
+ long milis = System.currentTimeMillis();
+ if (milis - lastAttackMilis < attackSpeed)
+ {
+ /**
+ * Hack!
+ */
+ return;
+ }
+ lastAttackMilis = milis;
+
/**
* notify attack observers
*/