mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge commit 'origin/master' into 320
Conflicts: src/game/BattleGround.cpp
This commit is contained in:
commit
546f7a7fe5
47 changed files with 985 additions and 1264 deletions
|
|
@ -3403,7 +3403,7 @@ bool Unit::AddAura(Aura *Aur)
|
|||
|
||||
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load)
|
||||
if( !isAlive() && !IsDeathPersistentSpell(aurSpellInfo) &&
|
||||
Aur->GetId() != 2584 && // Waiting to Resurrect (not have death persistence flag)
|
||||
!IsDeathOnlySpell(aurSpellInfo) &&
|
||||
(GetTypeId()!=TYPEID_PLAYER || !((Player*)this)->GetSession()->PlayerLoading()) )
|
||||
{
|
||||
delete Aur;
|
||||
|
|
@ -9416,7 +9416,7 @@ void Unit::ClearInCombat()
|
|||
((Player*)this)->UpdatePotionCooldown();
|
||||
}
|
||||
|
||||
bool Unit::isTargetableForAttack() const
|
||||
bool Unit::isTargetableForAttack(bool inverseAlive /*=false*/) const
|
||||
{
|
||||
if (GetTypeId()==TYPEID_PLAYER && ((Player *)this)->isGameMaster())
|
||||
return false;
|
||||
|
|
@ -9428,7 +9428,10 @@ bool Unit::isTargetableForAttack() const
|
|||
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
|
||||
return false;
|
||||
|
||||
return IsInWorld() && isAlive() && !hasUnitState(UNIT_STAT_DIED)&& !isInFlight() /*&& !isStealth()*/;
|
||||
if (!(isAlive() ^ inverseAlive))
|
||||
return false;
|
||||
|
||||
return IsInWorld() && !hasUnitState(UNIT_STAT_DIED)&& !isInFlight() /*&& !isStealth()*/;
|
||||
}
|
||||
|
||||
int32 Unit::ModifyHealth(int32 dVal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue