This commit is contained in:
aozhiwei 2024-10-11 15:08:42 +08:00
parent a803d428ab
commit 8fe2114131
2 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ namespace mt
class Equip; class Equip;
} }
class Creature; class Human;
struct BagItem struct BagItem
{ {
int equip_id = 0; int equip_id = 0;
@ -17,12 +17,12 @@ struct BagItem
class Bag class Bag
{ {
public: public:
Bag(Creature* owner) { owner_ = owner; }; Bag(Human* owner) { owner_ = owner; };
void UseItem(int equip_id); void UseItem(int equip_id);
void PushBagInfo(); void PushBagInfo();
void Parse(const std::list<int>& items); void Parse(const std::list<int>& items);
private: private:
Creature* owner_ = nullptr; Human* owner_ = nullptr;
std::map<int, std::shared_ptr<BagItem>> items_; std::map<int, std::shared_ptr<BagItem>> items_;
}; };

View File

@ -2952,5 +2952,6 @@ void Bag::UseItem(int equip_id)
void Bag::PushBagInfo() void Bag::PushBagInfo()
{ {
cs::SMPushBag notify_msg;
owner_->SendNotifyMsg(notify_msg);
} }