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/scripts/World | |
| parent | 1ff5b836570332a80c7749cf69bbc47f172f7f28 (diff) | |
Core/Misc: Add default count param to HasItemCount
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/go_scripts.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/World/npc_taxi.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/World/npcs_special.cpp | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 2a5d58122ed..ddb0044a888 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -677,28 +677,28 @@ public: switch (go->GetEntry()) { case MATRIX_PUNCHOGRAPH_3005_A: - if (player->HasItemCount(ITEM_WHITE_PUNCH_CARD, 1)) + if (player->HasItemCount(ITEM_WHITE_PUNCH_CARD)) { player->DestroyItemCount(ITEM_WHITE_PUNCH_CARD, 1, true); player->CastSpell(player, SPELL_YELLOW_PUNCH_CARD, true); } break; case MATRIX_PUNCHOGRAPH_3005_B: - if (player->HasItemCount(ITEM_YELLOW_PUNCH_CARD, 1)) + if (player->HasItemCount(ITEM_YELLOW_PUNCH_CARD)) { player->DestroyItemCount(ITEM_YELLOW_PUNCH_CARD, 1, true); player->CastSpell(player, SPELL_BLUE_PUNCH_CARD, true); } break; case MATRIX_PUNCHOGRAPH_3005_C: - if (player->HasItemCount(ITEM_BLUE_PUNCH_CARD, 1)) + if (player->HasItemCount(ITEM_BLUE_PUNCH_CARD)) { player->DestroyItemCount(ITEM_BLUE_PUNCH_CARD, 1, true); player->CastSpell(player, SPELL_RED_PUNCH_CARD, true); } break; case MATRIX_PUNCHOGRAPH_3005_D: - if (player->HasItemCount(ITEM_RED_PUNCH_CARD, 1)) + if (player->HasItemCount(ITEM_RED_PUNCH_CARD)) { player->DestroyItemCount(ITEM_RED_PUNCH_CARD, 1, true); player->CastSpell(player, SPELL_PRISMATIC_PUNCH_CARD, true); @@ -884,7 +884,7 @@ public: bool OnGossipHello(Player* player, GameObject* /*go*/) { - if (player->HasItemCount(ITEM_CUERGOS_KEY, 1)) + if (player->HasItemCount(ITEM_CUERGOS_KEY)) return false; player->CastSpell(player, SPELL_SUMMON_PIRATES_TREASURE_AND_TRIGGER_MOB, true); @@ -910,7 +910,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { - if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK, 1)) + if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK)) return false; go->SummonCreature(NPC_IMAGE_WIND_TRADER, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); @@ -998,7 +998,7 @@ class go_soulwell : public GameObjectScript return true; // Don't try to add a stone if we already have one. - if (player->HasItemCount(_stoneId, 1)) + if (player->HasItemCount(_stoneId)) { if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(_stoneSpell)) Spell::SendCastResult(player, spell, 0, SPELL_FAILED_TOO_MANY_OF_ITEM); @@ -1007,7 +1007,7 @@ class go_soulwell : public GameObjectScript owner->CastSpell(player, _stoneSpell, true); // Item has to actually be created to remove a charge on the well. - if (player->HasItemCount(_stoneId, 1)) + if (player->HasItemCount(_stoneId)) go->AddUse(); return false; @@ -1158,7 +1158,7 @@ public: go->CastSpell(target, SPELL_INDISPOSED_III); } go->CastSpell(player, SPELL_INDISPOSED); - if (player->HasItemCount(ITEM_ANDERHOLS_SLIDER_CIDER, 1)) + if (player->HasItemCount(ITEM_ANDERHOLS_SLIDER_CIDER)) go->CastSpell(player, SPELL_CREATE_AMBERSEEDS); return true; } diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp index 6241978fbd2..efdd4da73d6 100644 --- a/src/server/scripts/World/npc_taxi.cpp +++ b/src/server/scripts/World/npc_taxi.cpp @@ -77,7 +77,7 @@ public: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SUSURRUS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); break; case 20903: // Netherstorm - Protectorate Nether Drake - if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778, 1)) + if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NETHER_DRAKE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); break; case 18725: // Old Hillsbrad Foothills - Brazen @@ -203,7 +203,7 @@ public: player->ActivateTaxiPathTo(627); //TaxiPath 627 (possibly 627+628(152->153->154->155)) break; case GOSSIP_ACTION_INFO_DEF + 2: - if (!player->HasItemCount(25853, 1)) + if (!player->HasItemCount(25853)) player->SEND_GOSSIP_MENU(9780, creature->GetGUID()); else { diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index b291b9751b4..4f0687ef11d 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1268,7 +1268,7 @@ public: if (player->GetSpecsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(player) && player->getLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE3, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_LEARNDUALSPEC); - if (player->getClass() == CLASS_ROGUE && player->getLevel() >= 24 && !player->HasItemCount(17126, 1) && !player->GetQuestRewardStatus(6681)) + if (player->getClass() == CLASS_ROGUE && player->getLevel() >= 24 && !player->HasItemCount(17126) && !player->GetQuestRewardStatus(6681)) { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_ROGUE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(5996, creature->GetGUID()); |
