mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 12:28:26 +00:00
Moved struct Item_Struct into namespace EQEmu
This commit is contained in:
@@ -299,7 +299,7 @@ bool Client::Process() {
|
||||
ItemInst *ranged = GetInv().GetItem(EQEmu::legacy::SlotRange);
|
||||
if(ranged)
|
||||
{
|
||||
if(ranged->GetItem() && ranged->GetItem()->ItemType == ItemTypeBow){
|
||||
if (ranged->GetItem() && ranged->GetItem()->ItemType == EQEmu::item::ItemTypeBow){
|
||||
if(ranged_timer.Check(false)){
|
||||
if(GetTarget() && (GetTarget()->IsNPC() || GetTarget()->IsClient())){
|
||||
if(GetTarget()->InFrontMob(this, GetTarget()->GetX(), GetTarget()->GetY())){
|
||||
@@ -319,7 +319,7 @@ bool Client::Process() {
|
||||
ranged_timer.Start();
|
||||
}
|
||||
}
|
||||
else if(ranged->GetItem() && (ranged->GetItem()->ItemType == ItemTypeLargeThrowing || ranged->GetItem()->ItemType == ItemTypeSmallThrowing)){
|
||||
else if (ranged->GetItem() && (ranged->GetItem()->ItemType == EQEmu::item::ItemTypeLargeThrowing || ranged->GetItem()->ItemType == EQEmu::item::ItemTypeSmallThrowing)){
|
||||
if(ranged_timer.Check(false)){
|
||||
if(GetTarget() && (GetTarget()->IsNPC() || GetTarget()->IsClient())){
|
||||
if(GetTarget()->InFrontMob(this, GetTarget()->GetX(), GetTarget()->GetY())){
|
||||
@@ -740,8 +740,8 @@ void Client::BulkSendInventoryItems()
|
||||
for (int16 slot_id = EQEmu::legacy::TRADE_BEGIN; slot_id <= EQEmu::legacy::TRADE_END; slot_id++) {
|
||||
ItemInst* inst = m_inv.PopItem(slot_id);
|
||||
if(inst) {
|
||||
bool is_arrow = (inst->GetItem()->ItemType == ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size, is_arrow);
|
||||
bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false;
|
||||
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size, is_arrow);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Incomplete Trade Transaction: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id);
|
||||
PutItemInInventory(free_slot_id, *inst, false);
|
||||
database.SaveInventory(character_id, nullptr, slot_id);
|
||||
@@ -825,12 +825,12 @@ void Client::BulkSendInventoryItems()
|
||||
}
|
||||
|
||||
void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
const Item_Struct* handyitem = nullptr;
|
||||
const EQEmu::Item_Struct* handyitem = nullptr;
|
||||
uint32 numItemSlots = 80; //The max number of items passed in the transaction.
|
||||
if (m_ClientVersionBit & EQEmu::versions::bit_RoFAndLater) { // RoF+ can send 200 items
|
||||
numItemSlots = 200;
|
||||
}
|
||||
const Item_Struct *item;
|
||||
const EQEmu::Item_Struct *item;
|
||||
std::list<MerchantList> merlist = zone->merchanttable[merchant_id];
|
||||
std::list<MerchantList>::const_iterator itr;
|
||||
Mob* merch = entity_list.GetMobByNpcTypeID(npcid);
|
||||
@@ -869,7 +869,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
else
|
||||
handychance--;
|
||||
int charges = 1;
|
||||
if (item->ItemClass == ItemClassCommon)
|
||||
if (item->IsClassCommon())
|
||||
charges = item->MaxCharges;
|
||||
ItemInst* inst = database.CreateItem(item, charges);
|
||||
if (inst) {
|
||||
@@ -1086,9 +1086,9 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
case memSpellScribing: { // scribing spell to book
|
||||
const ItemInst* inst = m_inv[EQEmu::legacy::SlotCursor];
|
||||
|
||||
if(inst && inst->IsType(ItemClassCommon))
|
||||
if (inst && inst->IsClassCommon())
|
||||
{
|
||||
const Item_Struct* item = inst->GetItem();
|
||||
const EQEmu::Item_Struct* item = inst->GetItem();
|
||||
|
||||
if (RuleB(Character, RestrictSpellScribing) && !item->IsEquipable(GetRace(), GetClass())) {
|
||||
Message_StringID(13, CANNOT_USE_ITEM);
|
||||
|
||||
Reference in New Issue
Block a user