diff options
| -rw-r--r-- | src/crcombat.cc | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/crcombat.cc b/src/crcombat.cc index ef4b2f7..e8bede9 100644 --- a/src/crcombat.cc +++ b/src/crcombat.cc @@ -400,19 +400,15 @@ void TCombat::SetAttackDest(uint32 TargetID, bool Follow){ } } - if(WorldType == NON_PVP){ - if(!Master->IsPeaceful() || !Target->IsPeaceful()){ - if(Target->Type == NPC){ - this->StopAttack(0); - throw ATTACKNOTALLOWED; - } - } + if(Target->Type == NPC){ + this->StopAttack(0); + throw ATTACKNOTALLOWED; + } - if(Master->Type == PLAYER){ - if(Target->Type == NPC || !CheckRight(Master->ID, ATTACK_EVERYWHERE)){ - this->StopAttack(0); - throw ATTACKNOTALLOWED; - } + if(WorldType == NON_PVP && Master->IsPeaceful() && Target->IsPeaceful()){ + if(Master->Type != PLAYER || !CheckRight(Master->ID, ATTACK_EVERYWHERE)){ + this->StopAttack(0); + throw ATTACKNOTALLOWED; } } } |
