1
This commit is contained in:
parent
b8f476454f
commit
a8e2bd0d47
8
server/gameserver/bag.cc
Normal file
8
server/gameserver/bag.cc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include "bag.h"
|
||||||
|
|
||||||
|
void Bag::UseItem(int equip_id)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
11
server/gameserver/bag.h
Normal file
11
server/gameserver/bag.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class Bag
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
void UseItem(int equip_id);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Creature* owner_ = nullptr;
|
||||||
|
};
|
@ -46,6 +46,7 @@ class Car;
|
|||||||
class Buff;
|
class Buff;
|
||||||
class PlayerStats;
|
class PlayerStats;
|
||||||
class MobaBattle;
|
class MobaBattle;
|
||||||
|
class Bag;
|
||||||
struct BornPoint;
|
struct BornPoint;
|
||||||
class Human : public Creature
|
class Human : public Creature
|
||||||
{
|
{
|
||||||
@ -301,6 +302,7 @@ class Human : public Creature
|
|||||||
void SetHeroQuality(int quality);
|
void SetHeroQuality(int quality);
|
||||||
virtual bool IsClientMove() override { return is_client_move;};
|
virtual bool IsClientMove() override { return is_client_move;};
|
||||||
virtual std::shared_ptr<glm::vec3> GetClientCurrPos() override { return current_pos_;};
|
virtual std::shared_ptr<glm::vec3> GetClientCurrPos() override { return current_pos_;};
|
||||||
|
std::shared_ptr<Bag> GetBag() { return bag_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ProcLootWeapon(AddItemDTO& dto);
|
void ProcLootWeapon(AddItemDTO& dto);
|
||||||
@ -405,6 +407,7 @@ private:
|
|||||||
long long jump_frameno_ = 0;
|
long long jump_frameno_ = 0;
|
||||||
float old_sync_speed = 0;
|
float old_sync_speed = 0;
|
||||||
std::map<int, long long> attacker_hash_;
|
std::map<int, long long> attacker_hash_;
|
||||||
|
std::shared_ptr<Bag> bag_;
|
||||||
|
|
||||||
friend class PBUtils;
|
friend class PBUtils;
|
||||||
};
|
};
|
||||||
|
@ -62,6 +62,9 @@ class Player : public Human
|
|||||||
bool use_item = false;
|
bool use_item = false;
|
||||||
int use_item_idx = 0;
|
int use_item_idx = 0;
|
||||||
|
|
||||||
|
bool use_bag_item = false;
|
||||||
|
int use_bag_item_id = 0;
|
||||||
|
|
||||||
bool has_use_item_id = false;
|
bool has_use_item_id = false;
|
||||||
int use_item_id = 0;
|
int use_item_id = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user