mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Refactoring
This commit is contained in:
+1
-1
@@ -4219,7 +4219,7 @@ void Bot::GetBotItems(std::string* errorMessage, InventoryOld &inv) {
|
||||
aug[4] = (uint32)atoul(row[8]);
|
||||
bool instnodrop = (row[9] && (uint16)atoi(row[9])) ? true : false;
|
||||
|
||||
ItemInst* inst = database.CreateItem(item_id, charges, aug[0], aug[1], aug[2], aug[3], aug[4]);
|
||||
ItemInst* inst = database.CreateItemOld(item_id, charges, aug[0], aug[1], aug[2], aug[3], aug[4]);
|
||||
if (!inst) {
|
||||
Log.Out(Logs::General, Logs::Error, "Warning: botid %i has an invalid item_id %i in inventory slot %i", this->GetBotID(), item_id, slot_id);
|
||||
continue;
|
||||
|
||||
+2
-2
@@ -5423,7 +5423,7 @@ bool Client::TryReward(uint32 claim_id) {
|
||||
}
|
||||
|
||||
InternalVeteranReward ivr = (*iter);
|
||||
ItemInst *claim = database.CreateItem(ivr.items[0].item_id, ivr.items[0].charges);
|
||||
ItemInst *claim = database.CreateItemOld(ivr.items[0].item_id, ivr.items[0].charges);
|
||||
if(!claim) {
|
||||
Save();
|
||||
return true;
|
||||
@@ -5433,7 +5433,7 @@ bool Client::TryReward(uint32 claim_id) {
|
||||
|
||||
for(int y = 1; y < 8; y++)
|
||||
if(ivr.items[y].item_id && claim->GetItem()->ItemClass == 1) {
|
||||
ItemInst *item_temp = database.CreateItem(ivr.items[y].item_id, ivr.items[y].charges);
|
||||
ItemInst *item_temp = database.CreateItemOld(ivr.items[y].item_id, ivr.items[y].charges);
|
||||
if(item_temp) {
|
||||
if(CheckLoreConflict(item_temp->GetItem())) {
|
||||
lore_conflict = true;
|
||||
|
||||
@@ -2056,7 +2056,7 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app)
|
||||
if (item->MaxCharges != 0)
|
||||
charges = item->MaxCharges;
|
||||
|
||||
ItemInst *inst = database.CreateItem(item, charges);
|
||||
ItemInst *inst = database.CreateItemOld(item, charges);
|
||||
if (!AutoPutLootInInventory(*inst, true, true))
|
||||
{
|
||||
PutLootInInventory(MainCursor, *inst);
|
||||
@@ -2579,7 +2579,7 @@ void Client::Handle_OP_AltCurrencyPurchase(const EQApplicationPacket *app)
|
||||
if (item->MaxCharges != 0)
|
||||
charges = item->MaxCharges;
|
||||
|
||||
ItemInst *inst = database.CreateItem(item, charges);
|
||||
ItemInst *inst = database.CreateItemOld(item, charges);
|
||||
if (!AutoPutLootInInventory(*inst, true, true))
|
||||
{
|
||||
PutLootInInventory(MainCursor, *inst);
|
||||
@@ -3383,7 +3383,7 @@ void Client::Handle_OP_Barter(const EQApplicationPacket *app)
|
||||
Message(13, "Error: This item does not exist!");
|
||||
else
|
||||
{
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
if (inst)
|
||||
{
|
||||
SendItemPacket(0, inst, ItemPacketViewLink);
|
||||
@@ -3416,7 +3416,7 @@ void Client::Handle_OP_Barter(const EQApplicationPacket *app)
|
||||
Message(13, "Error: This item does not exist!");
|
||||
else
|
||||
{
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
if (inst)
|
||||
{
|
||||
SendItemPacket(0, inst, ItemPacketViewLink);
|
||||
@@ -3456,7 +3456,7 @@ void Client::Handle_OP_BazaarInspect(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
|
||||
if (inst) {
|
||||
SendItemPacket(0, inst, ItemPacketViewLink);
|
||||
@@ -8081,7 +8081,7 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
|
||||
|
||||
}
|
||||
|
||||
ItemInst* inst = database.CreateItem(item, item->MaxCharges, ivrs->augments[0], ivrs->augments[1], ivrs->augments[2], ivrs->augments[3], ivrs->augments[4], ivrs->augments[5]);
|
||||
ItemInst* inst = database.CreateItemOld(item, item->MaxCharges, ivrs->augments[0], ivrs->augments[1], ivrs->augments[2], ivrs->augments[3], ivrs->augments[4], ivrs->augments[5]);
|
||||
if (inst) {
|
||||
SendItemPacket(0, inst, ItemPacketViewLink);
|
||||
safe_delete(inst);
|
||||
@@ -8096,7 +8096,7 @@ void Client::Handle_OP_ItemLinkResponse(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
LDONItemViewRequest_Struct* item = (LDONItemViewRequest_Struct*)app->pBuffer;
|
||||
ItemInst* inst = database.CreateItem(item->item_id);
|
||||
ItemInst* inst = database.CreateItemOld(item->item_id);
|
||||
if (inst) {
|
||||
SendItemPacket(0, inst, ItemPacketViewLink);
|
||||
safe_delete(inst);
|
||||
@@ -12064,7 +12064,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
|
||||
else
|
||||
charges = item->MaxCharges;
|
||||
|
||||
ItemInst* inst = database.CreateItem(item, charges);
|
||||
ItemInst* inst = database.CreateItemOld(item, charges);
|
||||
|
||||
int SinglePrice = 0;
|
||||
if (RuleB(Merchant, UsePriceMod))
|
||||
|
||||
@@ -962,7 +962,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
int charges = 1;
|
||||
if (item->ItemClass == ItemClassCommon)
|
||||
charges = item->MaxCharges;
|
||||
ItemInst* inst = database.CreateItem(item, charges);
|
||||
ItemInst* inst = database.CreateItemOld(item, charges);
|
||||
if (inst) {
|
||||
if (RuleB(Merchant, UsePriceMod)) {
|
||||
inst->SetPrice((item->Price * (RuleR(Merchant, SellCostMod)) * item->SellRate * Client::CalcPriceMod(merch, false)));
|
||||
@@ -1003,7 +1003,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
// charges=ml.charges;
|
||||
//else
|
||||
charges = item->MaxCharges;
|
||||
ItemInst* inst = database.CreateItem(item, charges);
|
||||
ItemInst* inst = database.CreateItemOld(item, charges);
|
||||
if (inst) {
|
||||
if (RuleB(Merchant, UsePriceMod)) {
|
||||
inst->SetPrice((item->Price * (RuleR(Merchant, SellCostMod)) * item->SellRate * Client::CalcPriceMod(merch, false)));
|
||||
|
||||
+1
-1
@@ -10201,7 +10201,7 @@ void command_zopp(Client *c, const Seperator *sep)
|
||||
c->Message(0, "Processing request..results may cause unpredictable behavior.");
|
||||
}
|
||||
|
||||
ItemInst* FakeItemInst = database.CreateItem(FakeItem, charges);
|
||||
ItemInst* FakeItemInst = database.CreateItemOld(FakeItem, charges);
|
||||
c->SendItemPacket(slotid, FakeItemInst, packettype);
|
||||
c->Message(0, "Sending zephyr op packet to client - [%s] %s (%u) with %i %s to slot %i.",
|
||||
packettype == ItemPacketTrade ? "Trade" : "Summon", FakeItem->Name, itemid, charges,
|
||||
|
||||
+4
-4
@@ -972,7 +972,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
|
||||
if(Loot_Request_Type == 5) {
|
||||
int pkitem = GetPlayerKillItem();
|
||||
const ItemData* item = database.GetItem(pkitem);
|
||||
ItemInst* inst = database.CreateItem(item, item->MaxCharges);
|
||||
ItemInst* inst = database.CreateItemOld(item, item->MaxCharges);
|
||||
if(inst) {
|
||||
if (item->RecastDelay)
|
||||
inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0);
|
||||
@@ -1005,7 +1005,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
|
||||
if(i < corpselootlimit) {
|
||||
item = database.GetItem(item_data->item_id);
|
||||
if(client && item) {
|
||||
ItemInst* inst = database.CreateItem(item, item_data->charges, item_data->aug_1, item_data->aug_2, item_data->aug_3, item_data->aug_4, item_data->aug_5, item_data->aug_6, item_data->attuned);
|
||||
ItemInst* inst = database.CreateItemOld(item, item_data->charges, item_data->aug_1, item_data->aug_2, item_data->aug_3, item_data->aug_4, item_data->aug_5, item_data->aug_6, item_data->attuned);
|
||||
if(inst) {
|
||||
if (item->RecastDelay)
|
||||
inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0);
|
||||
@@ -1122,10 +1122,10 @@ void Corpse::LootItem(Client* client, const EQApplicationPacket* app) {
|
||||
|
||||
if (item != 0) {
|
||||
if (item_data){
|
||||
inst = database.CreateItem(item, item_data ? item_data->charges : 0, item_data->aug_1, item_data->aug_2, item_data->aug_3, item_data->aug_4, item_data->aug_5, item_data->aug_6, item_data->attuned);
|
||||
inst = database.CreateItemOld(item, item_data ? item_data->charges : 0, item_data->aug_1, item_data->aug_2, item_data->aug_3, item_data->aug_4, item_data->aug_5, item_data->aug_6, item_data->attuned);
|
||||
}
|
||||
else {
|
||||
inst = database.CreateItem(item);
|
||||
inst = database.CreateItemOld(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -298,7 +298,7 @@ void Client::GoFish()
|
||||
const ItemData* food_item = database.GetItem(food_id);
|
||||
|
||||
Message_StringID(MT_Skills, FISHING_SUCCESS);
|
||||
ItemInst* inst = database.CreateItem(food_item, 1);
|
||||
ItemInst* inst = database.CreateItemOld(food_item, 1);
|
||||
if(inst != nullptr) {
|
||||
if(CheckLoreConflict(inst->GetItem()))
|
||||
{
|
||||
@@ -414,7 +414,7 @@ void Client::ForageItem(bool guarantee) {
|
||||
}
|
||||
|
||||
Message_StringID(MT_Skills, stringid);
|
||||
ItemInst* inst = database.CreateItem(food_item, 1);
|
||||
ItemInst* inst = database.CreateItemOld(food_item, 1);
|
||||
if(inst != nullptr) {
|
||||
// check to make sure it isn't a foraged lore item
|
||||
if(CheckLoreConflict(inst->GetItem()))
|
||||
|
||||
+2
-2
@@ -1021,7 +1021,7 @@ ItemInst* GuildBankManager::GetItem(uint32 GuildID, uint16 Area, uint16 SlotID,
|
||||
if((SlotID > (GUILD_BANK_DEPOSIT_AREA_SIZE - 1)))
|
||||
return nullptr;
|
||||
|
||||
inst = database.CreateItem((*Iterator)->Items.DepositArea[SlotID].ItemID);
|
||||
inst = database.CreateItemOld((*Iterator)->Items.DepositArea[SlotID].ItemID);
|
||||
|
||||
if(!inst)
|
||||
return nullptr;
|
||||
@@ -1034,7 +1034,7 @@ ItemInst* GuildBankManager::GetItem(uint32 GuildID, uint16 Area, uint16 SlotID,
|
||||
if((SlotID > (GUILD_BANK_MAIN_AREA_SIZE - 1)))
|
||||
return nullptr;
|
||||
|
||||
inst = database.CreateItem((*Iterator)->Items.MainArea[SlotID].ItemID);
|
||||
inst = database.CreateItemOld((*Iterator)->Items.MainArea[SlotID].ItemID);
|
||||
|
||||
if(!inst)
|
||||
return nullptr;
|
||||
|
||||
+7
-7
@@ -528,7 +528,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
|
||||
// in any other situation just use charges as passed
|
||||
|
||||
ItemInst* inst = database.CreateItem(item, charges);
|
||||
ItemInst* inst = database.CreateItemOld(item, charges);
|
||||
|
||||
if(inst == nullptr) {
|
||||
Message(13, "An unknown server error has occurred and your item was not created.");
|
||||
@@ -900,7 +900,7 @@ void Client::PutLootInInventory(int16 slot_id, const ItemInst &inst, ServerLootI
|
||||
for(int i = SUB_BEGIN; i < EmuConstants::ITEM_CONTAINER_SIZE; i++) {
|
||||
if(bag_item_data[i] == nullptr)
|
||||
continue;
|
||||
const ItemInst *bagitem = database.CreateItem(bag_item_data[i]->item_id, bag_item_data[i]->charges, bag_item_data[i]->aug_1, bag_item_data[i]->aug_2, bag_item_data[i]->aug_3, bag_item_data[i]->aug_4, bag_item_data[i]->aug_5, bag_item_data[i]->aug_6, bag_item_data[i]->attuned);
|
||||
const ItemInst *bagitem = database.CreateItemOld(bag_item_data[i]->item_id, bag_item_data[i]->charges, bag_item_data[i]->aug_1, bag_item_data[i]->aug_2, bag_item_data[i]->aug_3, bag_item_data[i]->aug_4, bag_item_data[i]->aug_5, bag_item_data[i]->aug_6, bag_item_data[i]->attuned);
|
||||
interior_slot = InventoryOld::CalcSlotId(slot_id, i);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Putting bag loot item %s (%d) into slot %d (bag slot %d)", inst.GetItem()->Name, inst.GetItem()->ID, interior_slot, i);
|
||||
PutLootInInventory(interior_slot, *bagitem);
|
||||
@@ -1707,7 +1707,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
// Split into two
|
||||
src_inst->SetCharges(src_inst->GetCharges() - move_in->number_in_stack);
|
||||
Log.Out(Logs::Detail, Logs::Inventory, "Split stack of %s (%d) from slot %d to %d with stack size %d. Src keeps %d.", src_inst->GetItem()->Name, src_inst->GetItem()->ID, src_slot_id, dst_slot_id, move_in->number_in_stack, src_inst->GetCharges());
|
||||
ItemInst* inst = database.CreateItem(src_inst->GetItem(), move_in->number_in_stack);
|
||||
ItemInst* inst = database.CreateItemOld(src_inst->GetItem(), move_in->number_in_stack);
|
||||
m_inv.PutItem(dst_slot_id, *inst);
|
||||
safe_delete(inst);
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
|
||||
if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) {
|
||||
// This prevents the client from crashing when closing any 'phantom' bags -U
|
||||
const ItemData* token_struct = database.GetItem(22292); // 'Copper Coin'
|
||||
ItemInst* token_inst = database.CreateItem(token_struct, 1);
|
||||
ItemInst* token_inst = database.CreateItemOld(token_struct, 1);
|
||||
|
||||
SendItemPacket(resync_slot, token_inst, ItemPacketTrade);
|
||||
|
||||
@@ -1827,7 +1827,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
|
||||
if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) {
|
||||
if(m_inv[resync_slot]) {
|
||||
const ItemData* token_struct = database.GetItem(22292); // 'Copper Coin'
|
||||
ItemInst* token_inst = database.CreateItem(token_struct, 1);
|
||||
ItemInst* token_inst = database.CreateItemOld(token_struct, 1);
|
||||
|
||||
SendItemPacket(resync_slot, token_inst, ItemPacketTrade);
|
||||
SendItemPacket(resync_slot, m_inv[resync_slot], ItemPacketTrade);
|
||||
@@ -1844,7 +1844,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
|
||||
int16 resync_slot = (InventoryOld::CalcSlotId(move_slots->to_slot) == INVALID_INDEX) ? move_slots->to_slot : InventoryOld::CalcSlotId(move_slots->to_slot);
|
||||
if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) {
|
||||
const ItemData* token_struct = database.GetItem(22292); // 'Copper Coin'
|
||||
ItemInst* token_inst = database.CreateItem(token_struct, 1);
|
||||
ItemInst* token_inst = database.CreateItemOld(token_struct, 1);
|
||||
|
||||
SendItemPacket(resync_slot, token_inst, ItemPacketTrade);
|
||||
|
||||
@@ -1869,7 +1869,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
|
||||
if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) {
|
||||
if(m_inv[resync_slot]) {
|
||||
const ItemData* token_struct = database.GetItem(22292); // 'Copper Coin'
|
||||
ItemInst* token_inst = database.CreateItem(token_struct, 1);
|
||||
ItemInst* token_inst = database.CreateItemOld(token_struct, 1);
|
||||
|
||||
SendItemPacket(resync_slot, token_inst, ItemPacketTrade);
|
||||
SendItemPacket(resync_slot, m_inv[resync_slot], ItemPacketTrade);
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#include "lua_item.h"
|
||||
|
||||
Lua_ItemInst::Lua_ItemInst(int item_id) {
|
||||
SetLuaPtrData(database.CreateItem(item_id));
|
||||
SetLuaPtrData(database.CreateItemOld(item_id));
|
||||
cloned_ = true;
|
||||
}
|
||||
|
||||
Lua_ItemInst::Lua_ItemInst(int item_id, int charges) {
|
||||
SetLuaPtrData(database.CreateItem(item_id, charges));
|
||||
SetLuaPtrData(database.CreateItemOld(item_id, charges));
|
||||
cloned_ = true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3665,7 +3665,7 @@ void Mob::TrySympatheticProc(Mob *target, uint32 spell_id)
|
||||
|
||||
int32 Mob::GetItemStat(uint32 itemid, const char *identifier)
|
||||
{
|
||||
const ItemInst* inst = database.CreateItem(itemid);
|
||||
const ItemInst* inst = database.CreateItemOld(itemid);
|
||||
if (!inst)
|
||||
return 0;
|
||||
|
||||
|
||||
+2
-2
@@ -1378,7 +1378,7 @@ void NPC::PickPocket(Client* thief) {
|
||||
const ItemData* item = database.GetItem(citem->item_id);
|
||||
if (item)
|
||||
{
|
||||
inst = database.CreateItem(item, citem->charges);
|
||||
inst = database.CreateItemOld(item, citem->charges);
|
||||
bool is_arrow = (item->ItemType == ItemTypeArrow) ? true : false;
|
||||
int slot_id = thief->GetInv().FindFreeSlot(false, true, inst->GetItem()->Size, is_arrow);
|
||||
if (/*!Equipped(item->ID) &&*/
|
||||
@@ -1398,7 +1398,7 @@ void NPC::PickPocket(Client* thief) {
|
||||
if (x > 0)
|
||||
{
|
||||
int random = zone->random.Int(0, x-1);
|
||||
inst = database.CreateItem(steal_items[random], charges[random]);
|
||||
inst = database.CreateItemOld(steal_items[random], charges[random]);
|
||||
if (inst)
|
||||
{
|
||||
const ItemData* item = inst->GetItem();
|
||||
|
||||
+1
-1
@@ -876,7 +876,7 @@ void Object::SetItemID(uint32 itemid)
|
||||
|
||||
if (itemid)
|
||||
{
|
||||
this->m_inst = database.CreateItem(itemid);
|
||||
this->m_inst = database.CreateItemOld(itemid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1171,7 +1171,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
c->SendItemPacket(MainCursor, SummonedItem, ItemPacketSummonItem);
|
||||
safe_delete(SummonedItem);
|
||||
}
|
||||
SummonedItem = database.CreateItem(spell.base[i], charges);
|
||||
SummonedItem = database.CreateItemOld(spell.base[i], charges);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1208,7 +1208,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
if (charges < 1)
|
||||
charges = 1;
|
||||
|
||||
ItemInst *SubItem = database.CreateItem(spell.base[i], charges);
|
||||
ItemInst *SubItem = database.CreateItemOld(spell.base[i], charges);
|
||||
if (SubItem != nullptr) {
|
||||
SummonedItem->PutItem(slot, *SubItem);
|
||||
safe_delete(SubItem);
|
||||
|
||||
+4
-4
@@ -1165,7 +1165,7 @@ void Client::SendTraderItem(uint32 ItemID, uint16 Quantity) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemInst* inst = database.CreateItem(item, Quantity);
|
||||
ItemInst* inst = database.CreateItemOld(item, Quantity);
|
||||
|
||||
if (inst)
|
||||
{
|
||||
@@ -1204,7 +1204,7 @@ void Client::BulkSendTraderInventory(uint32 char_id) {
|
||||
item=database.GetItem(TraderItems->ItemID[i]);
|
||||
|
||||
if (item && (item->NoDrop!=0)) {
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
if (inst) {
|
||||
inst->SetSerialNumber(TraderItems->SerialNumber[i]);
|
||||
if(TraderItems->Charges[i] > 0)
|
||||
@@ -2025,7 +2025,7 @@ static void UpdateTraderCustomerItemsAdded(uint32 CustomerID, TraderCharges_Stru
|
||||
|
||||
if(!item) return;
|
||||
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
|
||||
if(!inst) return;
|
||||
|
||||
@@ -2106,7 +2106,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Trading, "Sending price updates to customer %s", Customer->GetName());
|
||||
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
|
||||
if(!inst) return;
|
||||
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ void Client::DoTributeUpdate() {
|
||||
uint32 item_id = tier.tribute_item_id;
|
||||
|
||||
//summon the item for them
|
||||
const ItemInst* inst = database.CreateItem(item_id, 1);
|
||||
const ItemInst* inst = database.CreateItemOld(item_id, 1);
|
||||
if(inst == nullptr)
|
||||
continue;
|
||||
|
||||
|
||||
+2
-2
@@ -257,7 +257,7 @@ bool Zone::LoadZoneObjects() {
|
||||
}
|
||||
else {
|
||||
// Groundspawn object
|
||||
inst = database.CreateItem(itemid);
|
||||
inst = database.CreateItemOld(itemid);
|
||||
}
|
||||
|
||||
//Father Nitwit's fix... not perfect...
|
||||
@@ -295,7 +295,7 @@ bool Zone::LoadGroundSpawns() {
|
||||
for(gsindex=0;gsindex<50;gsindex++){
|
||||
if(groundspawn.spawn[gsindex].item>0 && groundspawn.spawn[gsindex].item<500000){
|
||||
ItemInst* inst = nullptr;
|
||||
inst = database.CreateItem(groundspawn.spawn[gsindex].item);
|
||||
inst = database.CreateItemOld(groundspawn.spawn[gsindex].item);
|
||||
gsnumber=groundspawn.spawn[gsindex].max_allowed;
|
||||
ix=0;
|
||||
if(inst){
|
||||
|
||||
+2
-2
@@ -495,7 +495,7 @@ void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container)
|
||||
aug[4] = (uint32)atoi(row[7]);
|
||||
aug[5] = (uint32)atoi(row[8]);
|
||||
|
||||
ItemInst* inst = database.CreateItem(item_id, charges);
|
||||
ItemInst* inst = database.CreateItemOld(item_id, charges);
|
||||
if (inst && inst->GetItem()->ItemClass == ItemClassCommon) {
|
||||
for(int i = AUG_BEGIN; i < EmuConstants::ITEM_COMMON_SIZE; i++)
|
||||
if (aug[i])
|
||||
@@ -640,7 +640,7 @@ ItemInst* ZoneDatabase::LoadSingleTraderItem(uint32 CharID, int SerialNumber) {
|
||||
if (item->NoDrop == 0)
|
||||
return nullptr;
|
||||
|
||||
ItemInst* inst = database.CreateItem(item);
|
||||
ItemInst* inst = database.CreateItemOld(item);
|
||||
if(!inst) {
|
||||
Log.Out(Logs::Detail, Logs::Trading, "Unable to create item instance\n");
|
||||
fflush(stdout);
|
||||
|
||||
Reference in New Issue
Block a user