aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-07-28 13:21:31 +0200
committerQAston <qaston@gmail.com>2011-07-28 13:21:31 +0200
commit045dec19fa0322840d2e0e8ff4b1cda88c87ee5c (patch)
tree96dd5bcbd7fbe18b9f5299803953588ab79dfc00
parentf33a0c23caf9897223e47d3be318ed8d5a09de46 (diff)
CoreSpells: Typofixes: fix area auras autocast and usage of items in combat.
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/SpellHandler.cpp2
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 808a2da3a0d..a7d84a4187f 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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);
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index 0f309ea5fc2..247d2c5ceee 100755
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -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;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 628ec1a0f16..a40ff40d935 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -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;