mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[10504] Prevent damage player in sanctuary by pet or other controlled unit.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
20f4a16f01
commit
e766102457
2 changed files with 8 additions and 8 deletions
|
|
@ -489,7 +489,7 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
|
|||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
//You still see it in the combat log though
|
||||
if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (pVictim != this && IsCharmerOrOwnerPlayerOrPlayerItself() && pVictim->IsCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if (area && area->flags & AREA_FLAG_SANCTUARY) //sanctuary
|
||||
|
|
@ -1308,7 +1308,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
|
|||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
//You still see it in the combat log though
|
||||
if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (pVictim != this && IsCharmerOrOwnerPlayerOrPlayerItself() && pVictim->IsCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if (area && area->flags & AREA_FLAG_SANCTUARY) // sanctuary
|
||||
|
|
@ -1612,7 +1612,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
|||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
//You still see it in the combat log though
|
||||
if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (pVictim != this && IsCharmerOrOwnerPlayerOrPlayerItself() && pVictim->IsCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if (area && area->flags & AREA_FLAG_SANCTUARY) // sanctuary
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10503"
|
||||
#define REVISION_NR "10504"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue