diff --git a/Source/player.cpp b/Source/player.cpp index ef1bc0c1bb4..d33b54e611d 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -949,16 +949,18 @@ bool DoRangeAttack(Player &player) arrows = 2; } - // Obtain target position upon arrow shot, rather than when initiating the cast for accuracy - auto targetId = player.targetId; - if (player.hasPlayerTarget) { - assert(targetId >= 0 && targetId < Players.size()); - auto &targetPlayer = Players[player.targetId]; - player.position.temp = targetPlayer.position.future; - } else if (player.hasMonsterTarget) { - assert(targetId >= 0 && targetId < MaxMonsters); - auto &targetMonster = Monsters[player.targetId]; - player.position.temp = targetMonster.position.future; + // PVP REBALANCE: Obtain target position upon arrow shot, rather than when initiating the cast for accuracy in arenas. + if (player.isOnArenaLevel()) { + auto targetId = player.targetId; + if (player.hasPlayerTarget) { + assert(targetId >= 0 && targetId < Players.size()); + auto &targetPlayer = Players[player.targetId]; + player.position.temp = targetPlayer.position.future; + } else if (player.hasMonsterTarget) { + assert(targetId >= 0 && targetId < MaxMonsters); + auto &targetMonster = Monsters[player.targetId]; + player.position.temp = targetMonster.position.future; + } } for (int arrow = 0; arrow < arrows; arrow++) { diff --git a/Source/spells.cpp b/Source/spells.cpp index eb1019fa71c..4bed33c6d09 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -216,13 +216,15 @@ void CastSpell(Player &player, SpellID spl, WorldTilePosition src, WorldTilePosi dir = player.tempDirection; } - // Obtain target position upon spell effect, rather than when initiating the cast for accuracy - if (hasPlayerTarget) { - assert(targetId >= 0 && targetId < Players.size()); - dst = Players[targetId].position.future; - } else if (hasMonsterTarget) { - assert(targetId >= 0 && targetId < MaxMonsters); - dst = Monsters[targetId].position.future; + // PVP REBALANCE: Obtain target position upon spell effect, rather than when initiating the cast for accuracy in arenas. + if (player.isOnArenaLevel()) { + if (hasPlayerTarget) { + assert(targetId >= 0 && targetId < Players.size()); + dst = Players[targetId].position.future; + } else if (hasMonsterTarget) { + assert(targetId >= 0 && targetId < MaxMonsters); + dst = Monsters[targetId].position.future; + } } bool fizzled = false;