Fixed issue #143 - When casting spells without autocast your player will always move next to the player you casted a spell on. (#147)

Fixed issue #143 - When casting spells without autocast your player will always move next to the player you casted a spell on.
This commit is contained in:
Gptaqbc
2019-11-09 15:09:59 -05:00
committed by Daniel Ginovker
parent 452ee7a637
commit 2ade1073b9
2 changed files with 0 additions and 21 deletions
@@ -930,9 +930,6 @@ public class CombatAssistant {
resetPlayerAttack();
return;
}
// c.getPacketDispatcher().sendMessage("Made it here0.");
c.followId = i;
c.followId2 = 0;
if (c.attackTimer <= 0) {
c.usingBow = false;
c.specEffect = 0;
@@ -953,8 +950,6 @@ public class CombatAssistant {
c.attackTimer = 0;
return;
}
// c.getPacketDispatcher().sendMessage("Made it here1.");
if (!c.usingMagic) {
for (int bowId : RangeData.BOWS) {
if (c.playerEquipment[c.playerWeapon] == bowId) {
@@ -977,7 +972,6 @@ public class CombatAssistant {
c.spellId = c.autocastId;
c.usingMagic = true;
}
// c.getPacketDispatcher().sendMessage("Made it here2.");
if (c.spellId > 0) {
c.usingMagic = true;
}
@@ -997,7 +991,6 @@ public class CombatAssistant {
return;
}
}
// c.getPacketDispatcher().sendMessage("Made it here3.");
if (c.duelRule[2] && (usingBow || usingOtherRangeWeapons)) {
c.getActionSender().sendMessage(
"Range has been disabled in this duel!");
@@ -1189,8 +1182,6 @@ public class CombatAssistant {
CombatSounds.getMagicSound(c, c.spellId), 100,
0);
}
c.mageFollow = true;
c.followId = c.playerIndex;
}
PlayerHandler.players[i].underAttackBy = c.playerId;
PlayerHandler.players[i].logoutDelay = System.currentTimeMillis();
@@ -181,7 +181,6 @@ public class AttackPlayer implements PacketType {
* Attack player with magic
**/
case MAGE_PLAYER:
c.getActionSender().sendMessage("maging");
if (!c.mageAllowed) {
c.mageAllowed = true;
break;
@@ -305,17 +304,6 @@ public class AttackPlayer implements PacketType {
c.stopMovement();
c.getCombatAssistant().resetPlayerAttack();
}
if (c.usingMagic) {
if (c.goodDistance(c.getX(), c.getY(), PlayerHandler.players[c.playerIndex].getX(), PlayerHandler.players[c.playerIndex].getY(), 7))
{
c.stopMovement();
}
if (c.getCombatAssistant().checkReqs()) {
c.followId = c.playerIndex;
c.mageFollow = true;
}
}
}
break;
}