mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16: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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(target->GetTypeId()==TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
if(HasLowerSecurity((Player*)target,0,false))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( target->isAlive() )
|
if( target->isAlive() )
|
||||||
{
|
{
|
||||||
m_session->GetPlayer()->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_session->GetPlayer()->DealDamage(target, target->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7261"
|
#define REVISION_NR "7262"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue