From 3d23c706bc27182bcd44f6db03547c584a903fab Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 19 Apr 2023 18:36:58 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 3 +++ server/gameserver/human.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 28d4f8c7..923df11c 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -42,6 +42,7 @@ #include "ability.h" #include "stats.h" #include "hero.h" +#include "guide.h" #include "buff/sprint.h" @@ -89,6 +90,8 @@ Human::Human():Creature() AddInventory(IS_ICE, FIGHTING_MODE_BULLET_NUM); } stats = std::make_shared(); + guide_ = std::make_shared(); + guild_->Init(this); } Human::~Human() diff --git a/server/gameserver/human.h b/server/gameserver/human.h index a172657c..76b015b0 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -40,6 +40,7 @@ class Loot; class Car; class Buff; class PlayerStats; +class Guide; struct BornPoint; class Human : public Creature { @@ -253,6 +254,7 @@ class Human : public Creature void ProcThrowDmg(int throw_uniid); void CalcStats(); void ShiledBreak(); + std::shared_ptr GetGuide() { return guide_; }; protected: void ProcLootWeapon(AddItemDTO& dto); @@ -343,5 +345,7 @@ private: float old_sync_speed = 0; std::map attacker_hash_; + std::shared_ptr guide_; + friend class PBUtils; };