*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:
+1
-1
@@ -14292,7 +14292,7 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
|||||||
damage = aura->GetModifier()->m_amount;
|
damage = aura->GetModifier()->m_amount;
|
||||||
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
|
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
|
||||||
AddAura(aura);
|
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() );
|
while( result->NextRow() );
|
||||||
|
|||||||
+11
-7
@@ -712,17 +712,11 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
|||||||
target.processed = false; // Effects not apply on target
|
target.processed = false; // Effects not apply on target
|
||||||
|
|
||||||
// Calculate hit result
|
// Calculate hit result
|
||||||
if(m_spellInfo->Effect[effIndex] == SPELL_EFFECT_DUMMY)
|
if(m_originalCaster)
|
||||||
target.missCondition = SPELL_MISS_NONE;
|
|
||||||
else if(m_originalCaster)
|
|
||||||
target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
|
target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
|
||||||
else
|
else
|
||||||
target.missCondition = SPELL_MISS_EVADE; //SPELL_MISS_NONE;
|
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)
|
if (target.missCondition == SPELL_MISS_NONE)
|
||||||
++m_countOfHit;
|
++m_countOfHit;
|
||||||
else
|
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
|
if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him
|
||||||
DoSpellHitOnUnit(m_caster, mask);
|
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
|
// Do triggers only on miss/resist/parry/dodge
|
||||||
if (missInfo!=SPELL_MISS_NONE)
|
if (missInfo!=SPELL_MISS_NONE)
|
||||||
|
|||||||
+4
-4
@@ -179,9 +179,9 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
|
|||||||
m_type = TOTEM_STATUE; //Jewelery statue
|
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])
|
switch(spellInfo->EffectApplyAuraName[i])
|
||||||
{
|
{
|
||||||
@@ -191,6 +191,6 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
|
|||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return Creature::IsImmunedToSpell(spellInfo, useCharges);
|
|
||||||
}*/
|
}*/
|
||||||
|
return Creature::IsImmunedToSpell(spellInfo, useCharges);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user