*Fix grounding totem.
*Fix runic power regeneration of butchery *Fix some problems with master of subtlety buff expire. *Do not allow arcane intellect and brillance to stack. --HG-- branch : trunk
This commit is contained in:
@@ -15844,7 +15844,6 @@ void Player::_SaveAuras()
|
||||
// passive auras and stances
|
||||
if (itr->second->IsPassive()
|
||||
|| itr->second->IsAuraType(SPELL_AURA_MOD_SHAPESHIFT)
|
||||
|| itr->second->IsAuraType(SPELL_AURA_MOD_STEALTH)
|
||||
|| itr->second->IsRemovedOnShapeLost())
|
||||
continue;
|
||||
bool isCaster = itr->second->GetCasterGUID() == GetGUID();
|
||||
|
||||
+6
-6
@@ -1665,14 +1665,14 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
|
||||
switch(cur)
|
||||
{
|
||||
case TARGET_UNIT_TARGET_ENEMY:
|
||||
if(Unit *magnet = m_caster->SelectMagnetTarget(target))
|
||||
if(Unit *magnet = m_caster->SelectMagnetTarget(target, m_spellInfo))
|
||||
if(magnet != target)
|
||||
m_targets.setUnitTarget(magnet);
|
||||
pushType = PUSH_CHAIN;
|
||||
break;
|
||||
case TARGET_UNIT_TARGET_ANY:
|
||||
if(!IsPositiveSpell(m_spellInfo->Id))
|
||||
if(Unit *magnet = m_caster->SelectMagnetTarget(target))
|
||||
if(Unit *magnet = m_caster->SelectMagnetTarget(target, m_spellInfo))
|
||||
if(magnet != target)
|
||||
m_targets.setUnitTarget(magnet);
|
||||
pushType = PUSH_CHAIN;
|
||||
@@ -2181,7 +2181,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
|
||||
for(std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
|
||||
AddUnitTarget(*itr, i);
|
||||
}
|
||||
} // Chain or Area
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura)
|
||||
@@ -3667,7 +3667,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
|
||||
|
||||
uint8 eff = m_spellInfo->Effect[i];
|
||||
|
||||
sLog.outDebug( "Spell: Effect : %u", eff);
|
||||
sLog.outDebug( "Spell: %u Effect : %u", m_spellInfo->Id, eff);
|
||||
|
||||
//we do not need DamageMultiplier here.
|
||||
damage = CalculateDamage(i, NULL);
|
||||
@@ -5310,11 +5310,11 @@ SpellCastResult Spell::CheckItems()
|
||||
|
||||
// skip spell if no weapon in slot or broken
|
||||
if(!item || item->IsBroken() )
|
||||
return SPELL_FAILED_EQUIPPED_ITEM_CLASS;
|
||||
return m_IsTriggeredSpell? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_EQUIPPED_ITEM_CLASS;
|
||||
|
||||
// skip spell if weapon not fit to triggered spell
|
||||
if(!item->IsFitToSpellRequirements(m_spellInfo))
|
||||
return SPELL_FAILED_EQUIPPED_ITEM_CLASS;
|
||||
return m_IsTriggeredSpell? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_EQUIPPED_ITEM_CLASS;
|
||||
}
|
||||
|
||||
// offhand hand weapon required
|
||||
|
||||
@@ -1257,7 +1257,7 @@ void Aura::DropAuraCharge()
|
||||
if(--m_procCharges) // Send charge change
|
||||
SendAuraUpdate();
|
||||
else // Last charge dropped
|
||||
m_target->RemoveAura(this);
|
||||
m_target->RemoveAura(this, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6223,6 +6223,13 @@ void AuraEffect::PeriodicTick()
|
||||
// cannibalize anim
|
||||
m_target->HandleEmoteCommand(EMOTE_STATE_CANNIBALIZE);
|
||||
}
|
||||
// Butchery
|
||||
else if (m_spellProto->SpellFamilyName==SPELLFAMILY_DEATHKNIGHT
|
||||
&& m_spellProto->SpellIconID==2664)
|
||||
{
|
||||
if (m_target->isInCombat())
|
||||
m_target->ModifyPower(pt,m_amount);
|
||||
}
|
||||
|
||||
// Anger Management
|
||||
// amount = 1+ 16 = 17 = 3,4*5 = 10,2*5/3
|
||||
|
||||
@@ -365,6 +365,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
if (spellInfo->SpellFamilyFlags[0] & 0x12040000)
|
||||
return SPELL_MAGE_ARMOR;
|
||||
|
||||
// Arcane brillance and Arcane intelect (normal check fails because of flags difference)
|
||||
if (spellInfo->SpellFamilyFlags[0] & 0x400)
|
||||
return SPELL_MAGE_ARCANE_BRILLANCE;
|
||||
|
||||
if ((spellInfo->SpellFamilyFlags[0] & 0x1000000) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)
|
||||
return SPELL_MAGE_POLYMORPH;
|
||||
|
||||
@@ -498,6 +502,7 @@ bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2)
|
||||
case SPELL_FOOD:
|
||||
case SPELL_CHARM:
|
||||
case SPELL_SCROLL:
|
||||
case SPELL_MAGE_ARCANE_BRILLANCE:
|
||||
return spellSpec1==spellSpec2;
|
||||
case SPELL_BATTLE_ELIXIR:
|
||||
return spellSpec2==SPELL_BATTLE_ELIXIR
|
||||
@@ -1462,6 +1467,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
||||
{
|
||||
if (spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags)
|
||||
return false;
|
||||
if (!spellInfo_1->SpellFamilyFlags)
|
||||
return false;
|
||||
}
|
||||
|
||||
//use data of highest rank spell(needed for spells which ranks have different effects)
|
||||
@@ -1471,9 +1478,6 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
||||
//if spells have exactly the same effect they cannot stack
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i]
|
||||
// Allow dummy auras stack (needed by 31666 and 58428)
|
||||
|| spellInfo_1->EffectApplyAuraName[i] == SPELL_AURA_DUMMY
|
||||
|| spellInfo_1->EffectApplyAuraName[i] == SPELL_AURA_PERIODIC_DUMMY
|
||||
|| spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]
|
||||
|| spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i]) // paladin resist aura
|
||||
return false; // need itemtype check? need an example to add that check
|
||||
|
||||
+2
-1
@@ -137,7 +137,8 @@ enum SpellSpecific
|
||||
SPELL_FOOD = 20,
|
||||
SPELL_PRESENCE = 21,
|
||||
SPELL_CHARM = 22,
|
||||
SPELL_SCROLL = 23
|
||||
SPELL_SCROLL = 23,
|
||||
SPELL_MAGE_ARCANE_BRILLANCE = 24
|
||||
};
|
||||
|
||||
#define SPELL_LINKED_MAX_SPELLS 200000
|
||||
|
||||
@@ -35,6 +35,7 @@ class TempSummon : public Creature
|
||||
void SetTempSummonType(TempSummonType type);
|
||||
void SaveToDB();
|
||||
Unit* GetSummoner() const;
|
||||
uint64 const& GetSummonerGUID() { return m_summonerGUID; }
|
||||
|
||||
SummonPropertiesEntry const *m_Properties;
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ class Totem : public Minion
|
||||
void UpdateMaxPower(Powers /*power*/) {}
|
||||
void UpdateAttackPowerAndDamage(bool /*ranged*/ ) {}
|
||||
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
|
||||
void SetDuration(int32 dur) { m_duration = dur; }
|
||||
|
||||
bool IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const;
|
||||
|
||||
|
||||
+11
-5
@@ -1016,7 +1016,6 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
|
||||
|
||||
if (!originalCaster && GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem())
|
||||
if (Unit * owner = GetOwner())
|
||||
if (owner->GetTypeId()==TYPEID_PLAYER)
|
||||
originalCaster=owner->GetGUID();
|
||||
|
||||
SpellCastTargets targets;
|
||||
@@ -4111,6 +4110,13 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
|
||||
|
||||
Aur->_RemoveAura();
|
||||
|
||||
// Remove totem at next update if totem looses its aura
|
||||
if (GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem()&& ((TempSummon*)this)->GetSummonerGUID()==Aur->GetCasterGUID())
|
||||
{
|
||||
if (((Totem*)this)->GetSpell()==Aur->GetId())
|
||||
((Totem*)this)->setDeathState(JUST_DIED);
|
||||
}
|
||||
|
||||
// only way correctly remove all auras from list
|
||||
i = m_Auras.begin();
|
||||
}
|
||||
@@ -8316,10 +8322,11 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
|
||||
|
||||
Unit::AuraEffectList const& magnetAuras = victim->GetAurasByType(SPELL_AURA_SPELL_MAGNET);
|
||||
for(Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
|
||||
if(Unit* magnet = (*itr)->GetCaster())
|
||||
if(Unit* magnet = (*itr)->IsAreaAura() ? ((AreaAuraEffect*)(*itr))->GetFormalCaster():(*itr)->GetCaster() )
|
||||
if(magnet->isAlive())
|
||||
{
|
||||
(*itr)->GetParentAura()->DropAuraCharge();
|
||||
if (Aura * aur = magnet->GetAura((*itr)->GetId(),(*itr)->GetCasterGUID()))
|
||||
aur->DropAuraCharge();
|
||||
return magnet;
|
||||
}
|
||||
}
|
||||
@@ -8328,7 +8335,7 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
|
||||
{
|
||||
AuraEffectList const& hitTriggerAuras = victim->GetAurasByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER);
|
||||
for(AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i)
|
||||
if(Unit* magnet = (*i)->GetCaster())
|
||||
if(Unit* magnet = (*i)->IsAreaAura() ? ((AreaAuraEffect*)(*i))->GetFormalCaster():(*i)->GetCaster() )
|
||||
if(magnet->isAlive() && magnet->IsWithinLOSInMap(this))
|
||||
if(roll_chance_i((*i)->GetAmount()))
|
||||
{
|
||||
@@ -10413,7 +10420,6 @@ void Unit::setDeathState(DeathState s)
|
||||
RemoveAllControlled();
|
||||
RemoveAllAurasOnDeath();
|
||||
ExitVehicle();
|
||||
//This is needed to clear visible auras after unit dies
|
||||
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
|
||||
Reference in New Issue
Block a user