aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.h
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-03-20 21:49:01 +0100
committerMachiavelli <none@none>2010-03-20 21:49:01 +0100
commita0fd280a34b6e7c2c6bf3570d0420675222950ba (patch)
treeba86cbdf1ad149e0e2d0b3e38148a9c810802f98 /src/game/Player.h
parentf7ffd77123b5f6c943f7d280fbea5742e2c5d9b9 (diff)
Memory optimization by making m_refundableItems a std::set<uint64>. Also fix a crash caused by invalid iterator in Player::_SaveInventory(). This should fix the last of the item save related crashes.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.h')
-rw-r--r--src/game/Player.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Player.h b/src/game/Player.h
index fda3525f2c7..b1b32ce9008 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1190,8 +1190,8 @@ class Player : public Unit, public GridObject<Player>
uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
uint8 _CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL ) const;
- void AddRefundReference(Item* it);
- void DeleteRefundReference(Item* it);
+ void AddRefundReference(uint64 it);
+ void DeleteRefundReference(uint64 it);
void ApplyEquipCooldown( Item * pItem );
void SetAmmo( uint32 item );
@@ -2558,7 +2558,7 @@ class Player : public Unit, public GridObject<Player>
uint8 _CanStoreItem_InInventorySlots( uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemPrototype const *pProto, uint32& count, bool merge, Item *pSrcItem, uint8 skip_bag, uint8 skip_slot ) const;
Item* _StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, bool update );
- std::set<Item*> m_refundableItems;
+ std::set<uint64> m_refundableItems;
void UpdateKnownCurrencies(uint32 itemId, bool apply);
int32 CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool for_quest);