aboutsummaryrefslogtreecommitdiff
path: root/src/game/CombatHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-30 16:31:05 -0500
committermegamage <none@none>2009-04-30 16:31:05 -0500
commit48dab8af91eadec76f59d0cd3d99fc7fca3a69e9 (patch)
tree97dbed833e095599a50d5877aa8c4943660d9fb1 /src/game/CombatHandler.cpp
parentd6b1013763a4405ec844ace19398c2bda5b5940e (diff)
parenteb9328e4dbd5e136728f90ae794da1066688953f (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/CombatHandler.cpp')
-rw-r--r--src/game/CombatHandler.cpp10
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);
}