This commit is contained in:
aozhiwei 2024-10-11 14:58:31 +08:00
parent 1ad1db690c
commit a1e19a9985
4 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
#include "precompile.h"
#include "bag.h"
void Bag::Parse(const std::list<int>& items)
{
}

View File

@ -1,11 +1,13 @@
#pragma once
class Creature;
class Bag
{
public:
Bag(Creature* owner) { owner_ = owner; };
void UseItem(int equip_id);
void PushBagInfo();
void Parse(const std::list<int>& items);
private:
Creature* owner_ = nullptr;

View File

@ -97,7 +97,7 @@ Human::Human():Creature()
AddInventory(IS_ICE, FIGHTING_MODE_BULLET_NUM);
}
stats = std::make_shared<PlayerStats>();
bag_ = std::make_shared<Bag>();
bag_ = std::make_shared<Bag>(this);
}
Human::~Human()

View File

@ -185,6 +185,7 @@ static Player* InternalCreatePlayer(std::shared_ptr<CustomBattle> p,
hum->side
});
#endif
hum->GetBag()->Parse(hum->GetNetData()->GetItems());
return hum;
}