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

View File

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