CoreSpells: Typofixes: fix area auras autocast and usage of items in combat.

This commit is contained in:
QAston
2011-07-28 13:21:31 +02:00
parent f33a0c23ca
commit 045dec19fa
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -13877,7 +13877,7 @@ void CharmInfo::InitPossessCreateSpells()
{ {
uint32 spellId = m_unit->ToCreature()->m_spells[i]; uint32 spellId = m_unit->ToCreature()->m_spells[i];
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (spellInfo && spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD) if (spellInfo && !spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_DEAD)
{ {
if (spellInfo->IsPassive()) if (spellInfo->IsPassive())
m_unit->CastSpell(m_unit, spellInfo, true); m_unit->CastSpell(m_unit, spellInfo, true);
@@ -141,7 +141,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
{ {
if (SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(proto->Spells[i].SpellId)) if (SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(proto->Spells[i].SpellId))
{ {
if (spellInfo->CanBeUsedInCombat()) if (!spellInfo->CanBeUsedInCombat())
{ {
pUser->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT, pItem, NULL); pUser->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT, pItem, NULL);
return; return;
+1 -1
View File
@@ -5693,7 +5693,7 @@ bool Spell::CanAutoCast(Unit* target)
return false; return false;
} }
} }
else if (m_spellInfo->Effects[j].IsArea()) else if (m_spellInfo->Effects[j].IsAreaAuraEffect())
{ {
if (target->HasAuraEffect(m_spellInfo->Id, j)) if (target->HasAuraEffect(m_spellInfo->Id, j))
return false; return false;