Re-arranged Item.cpp functions to match their declaration order in Item.h (prep for upcoming changes)

This commit is contained in:
Uleat 2014-05-12 03:06:13 -04:00
parent f50b83b293
commit 10c43bfa51
3 changed files with 1412 additions and 1392 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) EQEMu Changelog (Started on Sept 24, 2003 15:50)
------------------------------------------------------- -------------------------------------------------------
== 05/12/2014 ==
Uleat: Re-arranged functions in Item.cpp to somewhat match the order they are declared in Item.h. Should make finding their location a little easier when using declarations as a guide. (This will facilitate readability of an upcoming change...)
== 05/07/2014 == == 05/07/2014 ==
Kayen: AA/Item/Spells that allow pets to critical and flurry will now work on the owners swarm pets consistent with live. Kayen: AA/Item/Spells that allow pets to critical and flurry will now work on the owners swarm pets consistent with live.

File diff suppressed because it is too large Load Diff

View File

@ -170,13 +170,13 @@ public:
// Remove item from inventory (and take control of memory) // Remove item from inventory (and take control of memory)
ItemInst* PopItem(int16 slot_id); ItemInst* PopItem(int16 slot_id);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
int16 HasItem(uint32 item_id, uint8 quantity=0, uint8 where=0xFF);
// Check whether there is space for the specified number of the specified item. // Check whether there is space for the specified number of the specified item.
bool HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity); bool HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
int16 HasItem(uint32 item_id, uint8 quantity = 0, uint8 where = 0xFF);
// Check whether item exists in inventory // Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look // where argument specifies OR'd list of invWhere constants to look
int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF); int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
@ -265,22 +265,7 @@ public:
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0); ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
ItemInst(ItemInstTypes use_type) { ItemInst(ItemInstTypes use_type);
m_use_type = use_type;
m_item = nullptr;
m_charges = 0;
m_price = 0;
m_instnodrop = false;
m_merchantslot = 0;
m_color = 0;
m_exp = 0;
m_evolveLvl = 0;
m_activated = false;
m_scaledItem = nullptr;
m_evolveInfo = nullptr;
m_scaling = false;
}
ItemInst(const ItemInst& copy); ItemInst(const ItemInst& copy);
@ -314,7 +299,7 @@ public:
uint32 GetItemID(uint8 slot) const; uint32 GetItemID(uint8 slot) const;
inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); } inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); }
void PutItem(uint8 slot, const ItemInst& inst); void PutItem(uint8 slot, const ItemInst& inst);
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id); void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id) { return; } // not defined anywhere...
void DeleteItem(uint8 slot); void DeleteItem(uint8 slot);
ItemInst* PopItem(uint8 index); ItemInst* PopItem(uint8 index);
void Clear(); void Clear();
@ -368,11 +353,11 @@ public:
void SetInstNoDrop(bool flag) { m_instnodrop=flag; } void SetInstNoDrop(bool flag) { m_instnodrop=flag; }
std::string GetCustomDataString() const; std::string GetCustomDataString() const;
std::string GetCustomData(std::string identifier);
void SetCustomData(std::string identifier, std::string value); void SetCustomData(std::string identifier, std::string value);
void SetCustomData(std::string identifier, int value); void SetCustomData(std::string identifier, int value);
void SetCustomData(std::string identifier, float value); void SetCustomData(std::string identifier, float value);
void SetCustomData(std::string identifier, bool value); void SetCustomData(std::string identifier, bool value);
std::string GetCustomData(std::string identifier);
void DeleteCustomData(std::string identifier); void DeleteCustomData(std::string identifier);
// Allows treatment of this object as though it were a pointer to m_item // Allows treatment of this object as though it were a pointer to m_item