[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:
VladimirMangos 2009-02-10 12:10:09 +03:00
parent f58d1a179a
commit edfa757020
2 changed files with 7 additions and 1 deletions

View file

@ -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);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7261"
#define REVISION_NR "7262"
#endif // __REVISION_NR_H__