diff options
| author | BroodWyrm <none@none> | 2009-05-01 09:45:51 +0200 |
|---|---|---|
| committer | BroodWyrm <none@none> | 2009-05-01 09:45:51 +0200 |
| commit | db977d7005d0982ab672cfa0c7758b0d480b06b2 (patch) | |
| tree | 7594076355436651090a07f4c62e11f728cdbe5b /src/game/CombatHandler.cpp | |
| parent | 94e896ebd6aaf4cf0be661fa8250ad90d89f9b5c (diff) | |
| parent | 85fbe3ada2bf9fd08acb97e40e2dddefc6e38e0a (diff) | |
*Merge.
--HG--
branch : trunk
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 878d8e35648..f732f128fd0 100644 --- a/src/game/CombatHandler.cpp +++ b/src/game/CombatHandler.cpp @@ -49,7 +49,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)); @@ -58,14 +58,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); } |
