diff options
Diffstat (limited to 'src/game/CombatHandler.cpp')
-rw-r--r-- | src/game/CombatHandler.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/game/CombatHandler.cpp b/src/game/CombatHandler.cpp index fb212870822..f9fb4fd7ee0 100644 --- a/src/game/CombatHandler.cpp +++ b/src/game/CombatHandler.cpp @@ -50,7 +50,7 @@ void WorldSession::HandleAttackSwingOpcode( WorldPacket & recv_data ) return; } - if(_player->IsFriendlyTo(pEnemy) || pEnemy->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE)) + if(!_player->canAttack(pEnemy)) { sLog.outError( "WORLD: Enemy %s %u is friendly",(IS_PLAYER_GUID(guid) ? "player" : "creature"),GUID_LOPART(guid)); @@ -59,14 +59,6 @@ void WorldSession::HandleAttackSwingOpcode( WorldPacket & recv_data ) return; } - if(!pEnemy->isAlive()) - { - // client can generate swing to known dead target if autoswitch between autoshot and autohit is enabled in client options - // stop attack state at client - SendAttackStop(pEnemy); - return; - } - _player->Attack(pEnemy,true); } |