mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Backed out changeset 7fab27a57ecc - mangos [8218]
--HG-- branch : trunk
This commit is contained in:
@@ -465,7 +465,6 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
return;
|
||||
|
||||
bool IsActivateToQuest = false;
|
||||
bool IsPerCasterAuraState = false;
|
||||
if (updatetype == UPDATETYPE_CREATE_OBJECT || updatetype == UPDATETYPE_CREATE_OBJECT2)
|
||||
{
|
||||
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
|
||||
@@ -478,14 +477,6 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
if (((GameObject*)this)->GetGoArtKit())
|
||||
updateMask->SetBit(GAMEOBJECT_BYTES_1);
|
||||
}
|
||||
else if (isType(TYPEMASK_UNIT))
|
||||
{
|
||||
if( ((Unit*)this)->HasAuraState(AURA_STATE_CONFLAGRATE))
|
||||
{
|
||||
IsPerCasterAuraState = true;
|
||||
updateMask->SetBit(UNIT_FIELD_AURASTATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // case UPDATETYPE_VALUES
|
||||
{
|
||||
@@ -498,14 +489,6 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
updateMask->SetBit(GAMEOBJECT_DYNAMIC);
|
||||
updateMask->SetBit(GAMEOBJECT_BYTES_1);
|
||||
}
|
||||
else if (isType(TYPEMASK_UNIT))
|
||||
{
|
||||
if( ((Unit*)this)->HasAuraState(AURA_STATE_CONFLAGRATE))
|
||||
{
|
||||
IsPerCasterAuraState = true;
|
||||
updateMask->SetBit(UNIT_FIELD_AURASTATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WPAssert(updateMask && updateMask->GetCount() == m_valuesCount);
|
||||
@@ -530,19 +513,6 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
|
||||
*data << uint32(appendValue);
|
||||
}
|
||||
else if (index == UNIT_FIELD_AURASTATE)
|
||||
{
|
||||
if(IsPerCasterAuraState)
|
||||
{
|
||||
// IsPerCasterAuraState set if related pet caster aura state set already
|
||||
if (((Unit*)this)->HasAuraState(AURA_STATE_CONFLAGRATE, NULL, target))
|
||||
*data << m_uint32Values[ index ];
|
||||
else
|
||||
*data << (m_uint32Values[ index ] & ~(1 << (AURA_STATE_CONFLAGRATE-1)));
|
||||
}
|
||||
else
|
||||
*data << m_uint32Values[ index ];
|
||||
}
|
||||
// FIXME: Some values at server stored in float format but must be sent to client in uint32 format
|
||||
else if(index >= UNIT_FIELD_BASEATTACKTIME && index <= UNIT_FIELD_RANGEDATTACKTIME)
|
||||
{
|
||||
|
||||
@@ -908,7 +908,7 @@ enum AuraState
|
||||
//AURA_STATE_UNKNOWN11 = 11, // t|
|
||||
AURA_STATE_FAERIE_FIRE = 12, // c t|
|
||||
AURA_STATE_HEALTHLESS_35_PERCENT = 13, // C T |
|
||||
AURA_STATE_CONFLAGRATE = 14, // T | per-caster
|
||||
AURA_STATE_CONFLAGRATE = 14, // T |
|
||||
AURA_STATE_SWIFTMEND = 15, // T |
|
||||
AURA_STATE_DEADLY_POISON = 16, // T |
|
||||
AURA_STATE_ENRAGE = 17, // C |
|
||||
|
||||
@@ -8536,48 +8536,6 @@ void Unit::RemoveAllAttackers()
|
||||
}
|
||||
}
|
||||
|
||||
bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit * Caster) const
|
||||
{
|
||||
if (Caster && spellProto)
|
||||
{
|
||||
AuraEffectList const& stateAuras = Caster->GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
for(AuraEffectList::const_iterator j = stateAuras.begin();j != stateAuras.end(); ++j)
|
||||
if((*j)->isAffectedOnSpell(spellProto))
|
||||
return true;
|
||||
}
|
||||
return HasFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1));
|
||||
}
|
||||
|
||||
/*
|
||||
bool Unit::HasAuraStateForCaster(AuraState flag, uint64 caster) const
|
||||
{
|
||||
if(!HasAuraState(flag))
|
||||
return false;
|
||||
|
||||
// single per-caster aura state
|
||||
if(flag == AURA_STATE_CONFLAGRATE)
|
||||
{
|
||||
Unit::AuraList const& dotList = GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
for(Unit::AuraList::const_iterator i = dotList.begin(); i != dotList.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
||||
(*i)->GetCasterGUID() == caster &&
|
||||
// Immolate
|
||||
(((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004)) ||
|
||||
// Shadowflame
|
||||
((*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
void Unit::ModifyAuraState(AuraState flag, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
@@ -8623,6 +8581,18 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
|
||||
}
|
||||
}
|
||||
|
||||
bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit * Caster) const
|
||||
{
|
||||
if (Caster && spellProto)
|
||||
{
|
||||
AuraEffectList const& stateAuras = Caster->GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
for(AuraEffectList::const_iterator j = stateAuras.begin();j != stateAuras.end(); ++j)
|
||||
if((*j)->isAffectedOnSpell(spellProto))
|
||||
return true;
|
||||
}
|
||||
return HasFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1));
|
||||
}
|
||||
|
||||
Unit *Unit::GetOwner() const
|
||||
{
|
||||
if(uint64 ownerid = GetOwnerGUID())
|
||||
|
||||
Reference in New Issue
Block a user