diff options
| author | Spp <spp@jorge.gr> | 2012-10-23 13:11:08 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2012-10-23 13:11:57 +0200 |
| commit | 663db1cee3ab9bd3de76f210bc7c178f4991953e (patch) | |
| tree | 13f110026335fd886f64c326af11729009dceaf5 /src/server/game/Spells/Spell.cpp | |
| parent | 1ff5b836570332a80c7749cf69bbc47f172f7f28 (diff) | |
Core/Misc: Add default count param to HasItemCount
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 295c8216b7f..8790bf035cc 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5846,7 +5846,7 @@ SpellCastResult Spell::CheckItems() else { uint32 itemid = m_CastItem->GetEntry(); - if (!p_caster->HasItemCount(itemid, 1)) + if (!p_caster->HasItemCount(itemid)) return SPELL_FAILED_ITEM_NOT_READY; ItemTemplate const* proto = m_CastItem->GetTemplate(); @@ -5998,7 +5998,7 @@ SpellCastResult Spell::CheckItems() { if (m_spellInfo->Totem[i] != 0) { - if (p_caster->HasItemCount(m_spellInfo->Totem[i], 1)) + if (p_caster->HasItemCount(m_spellInfo->Totem[i])) { totems -= 1; continue; @@ -6053,7 +6053,7 @@ SpellCastResult Spell::CheckItems() { if (!(m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (m_spellInfo->SpellFamilyFlags[0] & 0x40000000))) return SPELL_FAILED_TOO_MANY_OF_ITEM; - else if (!(p_caster->HasItemCount(m_spellInfo->Effects[i].ItemType, 1))) + else if (!(p_caster->HasItemCount(m_spellInfo->Effects[i].ItemType))) return SPELL_FAILED_TOO_MANY_OF_ITEM; else p_caster->CastSpell(m_caster, m_spellInfo->Effects[EFFECT_1].CalcValue(), false); // move this to anywhere @@ -6232,7 +6232,7 @@ SpellCastResult Spell::CheckItems() case ITEM_SUBCLASS_WEAPON_THROWN: { uint32 ammo = pItem->GetEntry(); - if (!m_caster->ToPlayer()->HasItemCount(ammo, 1)) + if (!m_caster->ToPlayer()->HasItemCount(ammo)) return SPELL_FAILED_NO_AMMO; }; break; @@ -6273,7 +6273,7 @@ SpellCastResult Spell::CheckItems() return SPELL_FAILED_NO_AMMO; } - if (!m_caster->ToPlayer()->HasItemCount(ammo, 1)) + if (!m_caster->ToPlayer()->HasItemCount(ammo)) { m_caster->ToPlayer()->SetUInt32Value(PLAYER_AMMO_ID, 0); return SPELL_FAILED_NO_AMMO; |
