mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Positive auras can be cancelled once again :)
This commit is contained in:
parent
1d3667e765
commit
2c1671ef5c
3 changed files with 10 additions and 7 deletions
|
|
@ -17753,6 +17753,9 @@ void Player::learnSkillRewardedSpells()
|
|||
|
||||
void Player::SendAurasForTarget(Unit *target)
|
||||
{
|
||||
if(target->GetVisibleAuras()->empty()) // speedup things
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_AURA_UPDATE_ALL);
|
||||
data.append(target->GetPackGUID());
|
||||
|
||||
|
|
@ -17776,7 +17779,7 @@ void Player::SendAurasForTarget(Unit *target)
|
|||
// charges
|
||||
data << uint8(aura->m_procCharges);
|
||||
|
||||
if(!(auraFlags & AFLAG_NOT_GUID))
|
||||
if(!(auraFlags & AFLAG_NOT_CASTER))
|
||||
{
|
||||
data << uint8(0); // packed GUID of someone (caster?)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ enum AURA_FLAGS
|
|||
AFLAG_EFF_INDEX_0 = 0x01,
|
||||
AFLAG_EFF_INDEX_1 = 0x02,
|
||||
AFLAG_EFF_INDEX_2 = 0x04,
|
||||
AFLAG_NOT_GUID = 0x08, // caster guid?
|
||||
AFLAG_UNK1 = 0x10, // positive?
|
||||
AFLAG_NOT_CASTER = 0x08,
|
||||
AFLAG_POSITIVE = 0x10,
|
||||
AFLAG_DURATION = 0x20,
|
||||
AFLAG_UNK2 = 0x40,
|
||||
AFLAG_NEGATIVE = 0x80
|
||||
|
|
|
|||
|
|
@ -969,7 +969,7 @@ void Aura::_AddAura()
|
|||
if(slot < MAX_AURAS) // slot found
|
||||
{
|
||||
SetAura(false);
|
||||
SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_GUID | (GetAuraMaxDuration() ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_NONE : AFLAG_NEGATIVE));
|
||||
SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
|
||||
SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
|
||||
UpdateAuraCharges();
|
||||
SendAuraUpdate(false);
|
||||
|
|
@ -1126,7 +1126,7 @@ void Aura::SendAuraUpdate(bool remove)
|
|||
data << uint8(GetAuraLevel());
|
||||
data << uint8(GetAuraCharges());
|
||||
|
||||
if(!(auraFlags & AFLAG_NOT_GUID))
|
||||
if(!(auraFlags & AFLAG_NOT_CASTER))
|
||||
{
|
||||
data << uint8(0); // pguid
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue