Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition

This commit is contained in:
Uleat
2016-04-22 07:34:55 -04:00
parent b3475d7b50
commit 1890d006a2
65 changed files with 1835 additions and 1849 deletions
+7 -7
View File
@@ -153,7 +153,7 @@ uint32 ZoneDatabase::GetZoneFishing(uint32 ZoneID, uint8 skill, uint32 &npc_id,
//we need this function to immediately determine, after we receive OP_Fishing, if we can even try to fish, otherwise we have to wait a while to get the failure
bool Client::CanFish() {
//make sure we still have a fishing pole on:
const ItemInst* Pole = m_inv[SlotPrimary];
const ItemInst* Pole = m_inv[EQEmu::legacy::SlotPrimary];
int32 bslot = m_inv.HasItemByUse(ItemTypeFishingBait, 1, invWhereWorn|invWherePersonal);
const ItemInst* Bait = nullptr;
if (bslot != INVALID_INDEX)
@@ -258,7 +258,7 @@ void Client::GoFish()
Bait = m_inv.GetItem(bslot);
//if the bait isnt equipped, need to add its skill bonus
if (bslot >= EQEmu::constants::GENERAL_BEGIN && Bait != nullptr && Bait->GetItem()->SkillModType == SkillFishing) {
if (bslot >= EQEmu::legacy::GENERAL_BEGIN && Bait != nullptr && Bait->GetItem()->SkillModType == SkillFishing) {
fishing_skill += Bait->GetItem()->SkillModValue;
}
@@ -317,12 +317,12 @@ void Client::GoFish()
else
{
PushItemOnCursor(*inst);
SendItemPacket(SlotCursor, inst, ItemPacketSummonItem);
SendItemPacket(EQEmu::legacy::SlotCursor, inst, ItemPacketSummonItem);
if(RuleB(TaskSystem, EnableTaskSystem))
UpdateTasksForItem(ActivityFish, food_id);
safe_delete(inst);
inst = m_inv.GetItem(SlotCursor);
inst = m_inv.GetItem(EQEmu::legacy::SlotCursor);
}
if(inst) {
@@ -354,7 +354,7 @@ void Client::GoFish()
//and then swap out items in primary slot... too lazy to fix right now
if (zone->random.Int(0, 49) == 1) {
Message_StringID(MT_Skills, FISHING_POLE_BROKE); //Your fishing pole broke!
DeleteItemInInventory(SlotPrimary, 0, true);
DeleteItemInInventory(EQEmu::legacy::SlotPrimary, 0, true);
}
if(CheckIncreaseSkill(SkillFishing, nullptr, 5))
@@ -433,12 +433,12 @@ void Client::ForageItem(bool guarantee) {
}
else {
PushItemOnCursor(*inst);
SendItemPacket(SlotCursor, inst, ItemPacketSummonItem);
SendItemPacket(EQEmu::legacy::SlotCursor, inst, ItemPacketSummonItem);
if(RuleB(TaskSystem, EnableTaskSystem))
UpdateTasksForItem(ActivityForage, foragedfood);
safe_delete(inst);
inst = m_inv.GetItem(SlotCursor);
inst = m_inv.GetItem(EQEmu::legacy::SlotCursor);
}
if(inst) {