Reintegration of inventory-based EQDictionary references

This commit is contained in:
Uleat
2018-07-05 21:05:26 -04:00
parent d2683022e1
commit c435a77813
91 changed files with 4474 additions and 4546 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 EQEmu::ItemInstance* Pole = m_inv[EQEmu::inventory::slotPrimary];
const EQEmu::ItemInstance* Pole = m_inv[EQEmu::invslot::slotPrimary];
int32 bslot = m_inv.HasItemByUse(EQEmu::item::ItemTypeFishingBait, 1, invWhereWorn | invWherePersonal);
const EQEmu::ItemInstance* 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::legacy::GENERAL_BEGIN && Bait != nullptr && Bait->GetItem()->SkillModType == EQEmu::skills::SkillFishing) {
if (bslot >= EQEmu::invslot::GENERAL_BEGIN && Bait != nullptr && Bait->GetItem()->SkillModType == EQEmu::skills::SkillFishing) {
fishing_skill += Bait->GetItem()->SkillModValue;
}
@@ -331,12 +331,12 @@ void Client::GoFish()
else
{
PushItemOnCursor(*inst);
SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo);
SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo);
if(RuleB(TaskSystem, EnableTaskSystem))
UpdateTasksForItem(ActivityFish, food_id);
safe_delete(inst);
inst = m_inv.GetItem(EQEmu::inventory::slotCursor);
inst = m_inv.GetItem(EQEmu::invslot::slotCursor);
}
if(inst) {
@@ -368,7 +368,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(EQEmu::inventory::slotPrimary, 0, true);
DeleteItemInInventory(EQEmu::invslot::slotPrimary, 0, true);
}
if (CheckIncreaseSkill(EQEmu::skills::SkillFishing, nullptr, 5))
@@ -445,12 +445,12 @@ void Client::ForageItem(bool guarantee) {
}
else {
PushItemOnCursor(*inst);
SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo);
SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo);
if(RuleB(TaskSystem, EnableTaskSystem))
UpdateTasksForItem(ActivityForage, foragedfood);
safe_delete(inst);
inst = m_inv.GetItem(EQEmu::inventory::slotCursor);
inst = m_inv.GetItem(EQEmu::invslot::slotCursor);
}
if(inst) {