diff --git a/server/gameserver/mt/Hero.cc b/server/gameserver/mt/Hero.cc index 3460bf31..10b10dd2 100644 --- a/server/gameserver/mt/Hero.cc +++ b/server/gameserver/mt/Hero.cc @@ -6,6 +6,7 @@ #include "mt/Hero.h" #include "mt/Equip.h" #include "mt/NpcStandard.h" +#include "mt/BattleBasicAttribute.h" IMPL_TABLE(mt::Hero) @@ -119,6 +120,7 @@ namespace mt swim_speed_ = 1.0f; } } + basic_meta_ = mt::BattleBasicAttribute::GetById(id()); } int Hero::RandDrop() const diff --git a/server/gameserver/mt/Hero.h b/server/gameserver/mt/Hero.h index a5e5b3a6..4ebe27b7 100644 --- a/server/gameserver/mt/Hero.h +++ b/server/gameserver/mt/Hero.h @@ -55,11 +55,11 @@ namespace mt int RandDrop() const; const HeroShotAnimation* GetShotAnimi(int shotfire) const; float GetHeight() const { return height_; } - std::shared_ptr GetBasicMeta() { return basic_meta_; } + mt::BattleBasicAttribute* GetBasicMeta() { return basic_meta_; } private: float height_ = 0.0f; - std::shared_ptr basic_meta_ = nullptr; + mt::BattleBasicAttribute* basic_meta_ = nullptr; static void LoadHeroAndEquipShotData(); };