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];
|
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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user