Core: Step 3 - removed all warnings from core

related to #121

Next step: Scripts and extractor tools
This commit is contained in:
Yehonal
2017-09-16 19:13:21 +02:00
parent 247490dc84
commit 82be574cda
30 changed files with 116 additions and 107 deletions

View File

@@ -2787,7 +2787,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
// Xinef: eg. rogue poisions can proc off cheap shot, etc. so this block should be here also
// Xinef: ofc count only spells that HIT the target, little hack used to fool the system
if ((procEx & PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT) && caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->HasAttribute(SPELL_ATTR0_STOP_ATTACK_TARGET) == 0 &&
if (((procEx & PROC_EX_NORMAL_HIT)|PROC_EX_CRITICAL_HIT) && caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->HasAttribute(SPELL_ATTR0_STOP_ATTACK_TARGET) == 0 &&
m_spellInfo->HasAttribute(SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS) == 0 && (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE || m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED))
caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim|PROC_FLAG_TAKEN_DAMAGE, procEx);
}
@@ -3138,12 +3138,14 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
// trigger linked auras remove/apply
// TODO: remove/cleanup this, as this table is not documented and people are doing stupid things with it
if (std::vector<int32> const* spellTriggered = sSpellMgr->GetSpellLinked(m_spellInfo->Id + SPELL_LINK_HIT))
if (std::vector<int32> const* spellTriggered = sSpellMgr->GetSpellLinked(m_spellInfo->Id + SPELL_LINK_HIT)) {
for (std::vector<int32>::const_iterator i = spellTriggered->begin(); i != spellTriggered->end(); ++i)
if (*i < 0)
if (*i < 0) {
unit->RemoveAurasDueToSpell(-(*i));
else
} else {
unit->CastSpell(unit, *i, true, 0, 0, m_caster->GetGUID());
}
}
}
void Spell::DoAllEffectOnTarget(GOTargetInfo* target)