This commit is contained in:
aozhiwei 2024-10-11 14:05:58 +08:00
parent b8f476454f
commit a8e2bd0d47
4 changed files with 25 additions and 0 deletions

8
server/gameserver/bag.cc Normal file
View File

@ -0,0 +1,8 @@
#include "precompile.h"
#include "bag.h"
void Bag::UseItem(int equip_id)
{
}

11
server/gameserver/bag.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
class Bag
{
public:
void UseItem(int equip_id);
private:
Creature* owner_ = nullptr;
};

View File

@ -46,6 +46,7 @@ class Car;
class Buff;
class PlayerStats;
class MobaBattle;
class Bag;
struct BornPoint;
class Human : public Creature
{
@ -301,6 +302,7 @@ class Human : public Creature
void SetHeroQuality(int quality);
virtual bool IsClientMove() override { return is_client_move;};
virtual std::shared_ptr<glm::vec3> GetClientCurrPos() override { return current_pos_;};
std::shared_ptr<Bag> GetBag() { return bag_; }
protected:
void ProcLootWeapon(AddItemDTO& dto);
@ -405,6 +407,7 @@ private:
long long jump_frameno_ = 0;
float old_sync_speed = 0;
std::map<int, long long> attacker_hash_;
std::shared_ptr<Bag> bag_;
friend class PBUtils;
};

View File

@ -62,6 +62,9 @@ class Player : public Human
bool use_item = false;
int use_item_idx = 0;
bool use_bag_item = false;
int use_bag_item_id = 0;
bool has_use_item_id = false;
int use_item_id = 0;