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

View File

@@ -13877,7 +13877,7 @@ void CharmInfo::InitPossessCreateSpells()
{
uint32 spellId = m_unit->ToCreature()->m_spells[i];
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())
m_unit->CastSpell(m_unit, spellInfo, true);

View File

@@ -141,7 +141,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
{
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);
return;

View File

@@ -5693,7 +5693,7 @@ bool Spell::CanAutoCast(Unit* target)
return false;
}
}
else if (m_spellInfo->Effects[j].IsArea())
else if (m_spellInfo->Effects[j].IsAreaAuraEffect())
{
if (target->HasAuraEffect(m_spellInfo->Id, j))
return false;