mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Fix a bug in 307. Only the trigger effect should be applied but not the whole spell.
*Restore build in Linux. *Change "Added aura" log to level: detail. --HG-- branch : trunk
This commit is contained in:
@@ -14292,7 +14292,7 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
||||
damage = aura->GetModifier()->m_amount;
|
||||
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
|
||||
AddAura(aura);
|
||||
sLog.outString("Added aura spellid %u, effect %u", spellproto->Id, effindex);
|
||||
sLog.outDetail("Added aura spellid %u, effect %u", spellproto->Id, effindex);
|
||||
}
|
||||
}
|
||||
while( result->NextRow() );
|
||||
|
||||
@@ -712,17 +712,11 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
target.processed = false; // Effects not apply on target
|
||||
|
||||
// Calculate hit result
|
||||
if(m_spellInfo->Effect[effIndex] == SPELL_EFFECT_DUMMY)
|
||||
target.missCondition = SPELL_MISS_NONE;
|
||||
else if(m_originalCaster)
|
||||
if(m_originalCaster)
|
||||
target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
|
||||
else
|
||||
target.missCondition = SPELL_MISS_EVADE; //SPELL_MISS_NONE;
|
||||
|
||||
if(target.missCondition == SPELL_MISS_IMMUNE // Mass Dispel
|
||||
&& m_spellInfo->Effect[effIndex] == SPELL_EFFECT_TRIGGER_SPELL)
|
||||
target.missCondition = SPELL_MISS_NONE;
|
||||
|
||||
if (target.missCondition == SPELL_MISS_NONE)
|
||||
++m_countOfHit;
|
||||
else
|
||||
@@ -947,6 +941,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him
|
||||
DoSpellHitOnUnit(m_caster, mask);
|
||||
}
|
||||
else //TODO: This is a hack. need fix
|
||||
{
|
||||
uint32 tempMask = 0;
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
if(m_spellInfo->Effect[i] == SPELL_EFFECT_DUMMY
|
||||
|| m_spellInfo->Effect[i] == SPELL_EFFECT_TRIGGER_SPELL)
|
||||
tempMask |= 1<<i;
|
||||
if(tempMask &= mask)
|
||||
DoSpellHitOnUnit(unit, tempMask);
|
||||
}
|
||||
|
||||
// Do triggers only on miss/resist/parry/dodge
|
||||
if (missInfo!=SPELL_MISS_NONE)
|
||||
|
||||
@@ -179,9 +179,9 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
|
||||
m_type = TOTEM_STATUE; //Jewelery statue
|
||||
}
|
||||
|
||||
/*bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
|
||||
bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
|
||||
{
|
||||
for (int i=0;i<3;i++)
|
||||
/* for (int i=0;i<3;i++)
|
||||
{
|
||||
switch(spellInfo->EffectApplyAuraName[i])
|
||||
{
|
||||
@@ -191,6 +191,6 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
return Creature::IsImmunedToSpell(spellInfo, useCharges);
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user