1
This commit is contained in:
parent
1ad1db690c
commit
a1e19a9985
@ -1,3 +1,8 @@
|
|||||||
#include "precompile.h"
|
#include "precompile.h"
|
||||||
|
|
||||||
#include "bag.h"
|
#include "bag.h"
|
||||||
|
|
||||||
|
void Bag::Parse(const std::list<int>& items)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
class Creature;
|
||||||
class Bag
|
class Bag
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Bag(Creature* owner) { owner_ = owner; };
|
||||||
void UseItem(int equip_id);
|
void UseItem(int equip_id);
|
||||||
void PushBagInfo();
|
void PushBagInfo();
|
||||||
|
void Parse(const std::list<int>& items);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Creature* owner_ = nullptr;
|
Creature* owner_ = nullptr;
|
||||||
|
@ -97,7 +97,7 @@ Human::Human():Creature()
|
|||||||
AddInventory(IS_ICE, FIGHTING_MODE_BULLET_NUM);
|
AddInventory(IS_ICE, FIGHTING_MODE_BULLET_NUM);
|
||||||
}
|
}
|
||||||
stats = std::make_shared<PlayerStats>();
|
stats = std::make_shared<PlayerStats>();
|
||||||
bag_ = std::make_shared<Bag>();
|
bag_ = std::make_shared<Bag>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Human::~Human()
|
Human::~Human()
|
||||||
|
@ -185,6 +185,7 @@ static Player* InternalCreatePlayer(std::shared_ptr<CustomBattle> p,
|
|||||||
hum->side
|
hum->side
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
hum->GetBag()->Parse(hum->GetNetData()->GetItems());
|
||||||
return hum;
|
return hum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user