1
This commit is contained in:
parent
a803d428ab
commit
8fe2114131
@ -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_;
|
||||||
};
|
};
|
||||||
|
@ -2952,5 +2952,6 @@ void Bag::UseItem(int equip_id)
|
|||||||
|
|
||||||
void Bag::PushBagInfo()
|
void Bag::PushBagInfo()
|
||||||
{
|
{
|
||||||
|
cs::SMPushBag notify_msg;
|
||||||
|
owner_->SendNotifyMsg(notify_msg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user