aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorleak <leak@bitmx.net>2012-03-14 18:51:51 +0100
committerleak <leak@bitmx.net>2012-03-14 18:51:51 +0100
commit2a5caef4a64645f788f6d3e33d6159725358f1dd (patch)
tree82978b70c72e756d5252bbce68fdec359e71f423 /src/server/scripts/World
parentb02a012b4784e2073593a75315616e093327e738 (diff)
Revert "Core: more more cleanup" - Build test anyone?
This reverts commit 20cd4c71ee6336610daab304959909b2f6397287.
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/item_scripts.cpp34
-rw-r--r--src/server/scripts/World/npc_professions.cpp8
2 files changed, 21 insertions, 21 deletions
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index bb5d7380695..cf55bb14895 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -47,9 +47,9 @@ class item_only_for_flight : public ItemScript
public:
item_only_for_flight() : ItemScript("item_only_for_flight") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
+ bool OnUse(Player* player, Item* pItem, SpellCastTargets const& /*targets*/)
{
- uint32 itemId = item->GetEntry();
+ uint32 itemId = pItem->GetEntry();
bool disabled = false;
//for special scripts
@@ -74,7 +74,7 @@ public:
return false;
// error
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
return true;
}
};
@@ -110,13 +110,13 @@ class item_gor_dreks_ointment : public ItemScript
public:
item_gor_dreks_ointment() : ItemScript("item_gor_dreks_ointment") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
+ bool OnUse(Player* player, Item* pItem, SpellCastTargets const& targets)
{
if (targets.GetUnitTarget() && targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT &&
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
return false;
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
return true;
}
};
@@ -130,13 +130,13 @@ class item_incendiary_explosives : public ItemScript
public:
item_incendiary_explosives() : ItemScript("item_incendiary_explosives") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const & /*targets*/)
+ bool OnUse(Player* player, Item* pItem, SpellCastTargets const & /*targets*/)
{
if (player->FindNearestCreature(26248, 15) || player->FindNearestCreature(26249, 15))
return false;
else
{
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
return true;
}
}
@@ -219,7 +219,7 @@ class item_pile_fake_furs : public ItemScript
public:
item_pile_fake_furs() : ItemScript("item_pile_fake_furs") { }
- bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const & /*targets*/)
+ bool OnUse(Player* player, Item* /*pItem*/, SpellCastTargets const & /*targets*/)
{
GameObject* go = NULL;
for (uint8 i = 0; i < CaribouTrapsNum; ++i)
@@ -264,14 +264,14 @@ class item_petrov_cluster_bombs : public ItemScript
public:
item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { }
- bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/)
+ bool OnUse(Player* player, Item* pItem, const SpellCastTargets & /*targets*/)
{
if (player->GetZoneId() != ZONE_ID_HOWLING)
return false;
if (!player->GetTransport() || player->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
{
- player->SendEquipError(EQUIP_ERR_NONE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_NONE, pItem, NULL);
if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(SPELL_PETROV_BOMB))
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_HERE);
@@ -330,7 +330,7 @@ class item_dehta_trap_smasher : public ItemScript
public:
item_dehta_trap_smasher() : ItemScript("item_dehta_trap_smasher") { }
- bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/)
+ bool OnUse(Player* player, Item* /*pItem*/, const SpellCastTargets & /*targets*/)
{
if (player->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) != QUEST_STATUS_INCOMPLETE)
return false;
@@ -367,7 +367,7 @@ class item_trident_of_nazjan : public ItemScript
public:
item_trident_of_nazjan() : ItemScript("item_Trident_of_Nazjan") { }
- bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/)
+ bool OnUse(Player* player, Item* pItem, const SpellCastTargets & /*targets*/)
{
if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
{
@@ -376,9 +376,9 @@ public:
pLeviroth->AI()->AttackStart(player);
return false;
} else
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
} else
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
return true;
}
};
@@ -394,17 +394,17 @@ class item_captured_frog : public ItemScript
public:
item_captured_frog() : ItemScript("item_captured_frog") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
+ bool OnUse(Player* player, Item* pItem, SpellCastTargets const& /*targets*/)
{
if (player->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE)
{
if (player->FindNearestCreature(NPC_VANIRAS_SENTRY_TOTEM, 10.0f))
return false;
else
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
}
else
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
return true;
}
};
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 48be9bdba33..a1920e06ad1 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -241,14 +241,14 @@ bool EquippedOk(Player* player, uint32 spellId)
if (!reqSpell)
continue;
- Item* item;
+ Item* pItem;
for (uint8 j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; ++j)
{
- item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, j);
- if (item && item->GetTemplate()->RequiredSpell == reqSpell)
+ pItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, j);
+ if (pItem && pItem->GetTemplate()->RequiredSpell == reqSpell)
{
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
- sLog->outDebug(LOG_FILTER_TSCR, "TSCR: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
+ sLog->outDebug(LOG_FILTER_TSCR, "TSCR: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, pItem->GetEntry());
return false;
}
}