commit
51ca512b61
@ -462,6 +462,22 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, UpdateMask* u
|
|||||||
if (send_value & UNIT_DYNFLAG_TAPPED && is_tapped)
|
if (send_value & UNIT_DYNFLAG_TAPPED && is_tapped)
|
||||||
{ send_value = send_value & ~UNIT_DYNFLAG_TAPPED; }
|
{ send_value = send_value & ~UNIT_DYNFLAG_TAPPED; }
|
||||||
|
|
||||||
|
// Checking SPELL_AURA_EMPATHY and caster
|
||||||
|
if (send_value & UNIT_DYNFLAG_SPECIALINFO && ((Unit*)this)->IsAlive())
|
||||||
|
{
|
||||||
|
bool bIsEmpathy = false;
|
||||||
|
bool bIsCaster = false;
|
||||||
|
Unit::AuraList const& mAuraEmpathy = ((Unit*)this)->GetAurasByType(SPELL_AURA_EMPATHY);
|
||||||
|
for (Unit::AuraList::const_iterator itr = mAuraEmpathy.begin(); !bIsCaster && itr != mAuraEmpathy.end(); ++itr)
|
||||||
|
{
|
||||||
|
bIsEmpathy = true; // Empathy by aura set
|
||||||
|
if ((*itr)->GetCasterGuid() == target->GetObjectGuid())
|
||||||
|
bIsCaster = true; // target is the caster of an empathy aura
|
||||||
|
}
|
||||||
|
if (bIsEmpathy && !bIsCaster) // Empathy by aura, but target is not the caster
|
||||||
|
send_value &= ~UNIT_DYNFLAG_SPECIALINFO;
|
||||||
|
}
|
||||||
|
|
||||||
*data << send_value;
|
*data << send_value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1507,6 +1507,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||||||
Powers PowerType = POWER_MANA;
|
Powers PowerType = POWER_MANA;
|
||||||
Unit* target = GetTarget();
|
Unit* target = GetTarget();
|
||||||
|
|
||||||
|
// remove SPELL_AURA_EMPATHY
|
||||||
|
target->RemoveSpellsCausingAura(SPELL_AURA_EMPATHY);
|
||||||
|
|
||||||
|
|
||||||
switch (form)
|
switch (form)
|
||||||
{
|
{
|
||||||
case FORM_CAT:
|
case FORM_CAT:
|
||||||
@ -4108,12 +4112,12 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||||||
|
|
||||||
void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/)
|
void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/)
|
||||||
{
|
{
|
||||||
if (GetTarget()->GetTypeId() != TYPEID_UNIT)
|
Unit* target = GetTarget();
|
||||||
{ return; }
|
|
||||||
|
|
||||||
CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(GetTarget()->GetEntry());
|
// This aura is expected to only work with CREATURE_TYPE_BEAST or players
|
||||||
if (ci && ci->CreatureType == CREATURE_TYPE_BEAST)
|
CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(target->GetEntry());
|
||||||
{ GetTarget()->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply); }
|
if (target->GetTypeId() == TYPEID_PLAYER || (target->GetTypeId() == TYPEID_UNIT && ci && ci->CreatureType == CREATURE_TYPE_BEAST))
|
||||||
|
target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aura::HandleAuraUntrackable(bool apply, bool /*Real*/)
|
void Aura::HandleAuraUntrackable(bool apply, bool /*Real*/)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user