Quests and combopoints should work once again.

This commit is contained in:
tomrus88 2010-03-31 16:23:52 +04:00
parent 50bed7c7da
commit a4a56adf3d
4 changed files with 23 additions and 33 deletions

View file

@ -353,7 +353,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, ObjectGuid o
UpdateOriginalCasterPointer();
for(int i = 0; i < MAX_EFFECT_INDEX; ++i)
m_currentBasePoints[i] = m_spellInfo->EffectBasePoints[i];
m_currentBasePoints[i] = m_spellInfo->CalculateSimpleValue(SpellEffectIndex(i));
m_spellState = SPELL_STATE_NULL;
@ -3889,29 +3889,19 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
damage = int32(CalculateDamage(i, unitTarget) * DamageMultiplier);
sLog.outDebug( "Spell %u Effect%d : %u", m_spellInfo->Id, i, eff);
sLog.outDebug("Spell %u Effect%d : %u", m_spellInfo->Id, i, eff);
if(eff<TOTAL_SPELL_EFFECTS)
if(eff < TOTAL_SPELL_EFFECTS)
{
//sLog.outDebug( "WORLD: Spell FX %d < TOTAL_SPELL_EFFECTS ", eff);
(*this.*SpellEffects[eff])(i);
}
/*
else
{
sLog.outDebug( "WORLD: Spell FX %d > TOTAL_SPELL_EFFECTS ", eff);
if (m_CastItem)
EffectEnchantItemTmp(i);
else
{
sLog.outError("SPELL: unknown effect %u spell id %u",
eff, m_spellInfo->Id);
}
sLog.outError("WORLD: Spell FX %d > TOTAL_SPELL_EFFECTS ", eff);
}
*/
}
void Spell::AddTriggeredSpell( uint32 spellId )
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId );
@ -6265,7 +6255,7 @@ SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, Ski
{
// skill bonus provided by casting spell (mostly item spells)
// add the damage modifier from the spell casted (cheat lock / skeleton key etc.) (use m_currentBasePoints, CalculateDamage returns wrong value)
uint32 spellSkillBonus = uint32(m_currentBasePoints[effIndex]+1);
uint32 spellSkillBonus = uint32(m_currentBasePoints[effIndex]);
reqSkillValue = lockInfo->Skill[j];
// castitem check: rogue using skeleton keys. the skill values should not be added in this case.