mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-17 05:19:40 -04:00
CoreSpells: Typofixes: fix area auras autocast and usage of items in combat.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user