mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7262] Check security level of target for .die command for case when this command have lesser security level from default setting.
Original patch provided by NewAge.
This commit is contained in:
parent
f58d1a179a
commit
edfa757020
2 changed files with 7 additions and 1 deletions
|
|
@ -3298,6 +3298,12 @@ bool ChatHandler::HandleDieCommand(const char* /*args*/)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(target->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
if(HasLowerSecurity((Player*)target,0,false))
|
||||
return false;
|
||||
}
|
||||
|
||||
if( target->isAlive() )
|
||||
{
|
||||
m_session->GetPlayer()->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue