InventoryOld in client has been unhooked from loading/saving

This commit is contained in:
KimLS
2015-02-18 20:29:58 -08:00
parent fc2492a859
commit a5274b9b6e
10 changed files with 331 additions and 254 deletions
+1 -1
View File
@@ -1271,7 +1271,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
m_pp.platinum_shared = database.GetSharedPlatinum(this->AccountID());
database.ClearOldRecastTimestamps(cid); /* Clear out our old recast timestamps to keep the DB clean */
loaditems = database.GetInventory(cid, &m_inv); /* Load Character Inventory */
loaditems = database.GetInventory(cid, &m_inventory); /* Load Character Inventory */
database.LoadCharacterBandolier(cid, &m_pp); /* Load Character Bandolier */
database.LoadCharacterBindPoint(cid, &m_pp); /* Load Character Bind */
database.LoadCharacterMaterialColor(cid, &m_pp); /* Load Character Material */
-50
View File
@@ -814,11 +814,6 @@ void Client::OnDisconnect(bool hard_disconnect) {
Disconnect();
}
// Sends the client complete inventory used in character login
// DO WE STILL NEED THE 'ITEMCOMBINED' CONDITIONAL CODE? -U
//#ifdef ITEMCOMBINED
void Client::BulkSendInventoryItems() {
int16 slot_id = 0;
@@ -919,51 +914,6 @@ void Client::BulkSendInventoryItems() {
QueuePacket(outapp);
safe_delete(outapp);
}
/*#else
void Client::BulkSendInventoryItems()
{
// Search all inventory buckets for items
bool deletenorent=database.NoRentExpired(GetName());
// Worn items and Inventory items
int16 slot_id = 0;
if(deletenorent){//client was offline for more than 30 minutes, delete no rent items
RemoveNoRent();
}
for (slot_id=EmuConstants::POSSESSIONS_BEGIN; slot_id<=EmuConstants::POSSESSIONS_END; slot_id++) {
const ItemInst* inst = m_inv[slot_id];
if (inst){
SendItemPacket(slot_id, inst, ItemPacketCharInventory);
}
}
// Bank items
for (slot_id=EmuConstants::BANK_BEGIN; slot_id<=EmuConstants::BANK_END; slot_id++) { // 2015...
const ItemInst* inst = m_inv[slot_id];
if (inst){
SendItemPacket(slot_id, inst, ItemPacketCharInventory);
}
}
// Shared Bank items
for (slot_id=EmuConstants::SHARED_BANK_BEGIN; slot_id<=EmuConstants::SHARED_BANK_END; slot_id++) {
const ItemInst* inst = m_inv[slot_id];
if (inst){
SendItemPacket(slot_id, inst, ItemPacketCharInventory);
}
}
// LINKDEAD TRADE ITEMS
// If player went LD during a trade, they have items in the trade inventory
// slots. These items are now being put into their inventory (then queue up on cursor)
for (int16 trade_slot_id=EmuConstants::TRADE_BEGIN; trade_slot_id<=EmuConstants::TRADE_END; trade_slot_id++) {
const ItemInst* inst = m_inv[slot_id];
if (inst) {
int16 free_slot_id = m_inv.FindFreeSlot(inst->IsType(ItemClassContainer), true, inst->GetItem()->Size);
DeleteItemInInventory(trade_slot_id, 0, false);
PutItemInInventory(free_slot_id, *inst, true);
}
}
}
#endif*/
void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
const ItemData* handyitem = nullptr;
+6
View File
@@ -18,6 +18,7 @@
#ifndef MOB_H
#define MOB_H
#include "../common/inventory.h"
#include "common.h"
#include "entity.h"
#include "hate_list.h"
@@ -940,6 +941,9 @@ public:
void Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_chance, int interval, int max_loop, int avoid_override, int Msg = 0);
void Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_chance, int interval, int max_loop, int acc_override, int Msg = 0);
inline EQEmu::Inventory& GetInventory() { return m_inventory; }
inline const EQEmu::Inventory& GetInventory() const { return m_inventory; }
protected:
void CommonDamage(Mob* other, int32 &damage, const uint16 spell_id, const SkillUseTypes attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic);
static uint16 GetProcID(uint16 spell_id, uint8 effect_index);
@@ -1273,6 +1277,8 @@ protected:
bool bEnraged;
bool destructibleobject;
EQEmu::Inventory m_inventory;
private:
void _StopSong(); //this is not what you think it is
Mob* target;