From 030ca3d76340c5fc1dd21d1eb23c01261f8c794c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 26 Dec 2022 12:24:10 +0800 Subject: [PATCH] 1 --- server/gameserver/mt/Hero.cc | 5 +++++ server/gameserver/mt/Hero.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/server/gameserver/mt/Hero.cc b/server/gameserver/mt/Hero.cc index 79402c3b..df11aef5 100644 --- a/server/gameserver/mt/Hero.cc +++ b/server/gameserver/mt/Hero.cc @@ -114,6 +114,11 @@ namespace mt return 0; } + void Hero::StaticPostInit() + { + LoadHeroAndEquipShotData(); + } + const HeroShotAnimation* Hero::GetShotAnimi(int shotfire) const { auto itr = shot_animations.find(shotfire); diff --git a/server/gameserver/mt/Hero.h b/server/gameserver/mt/Hero.h index 3208d383..86e466c1 100644 --- a/server/gameserver/mt/Hero.h +++ b/server/gameserver/mt/Hero.h @@ -47,6 +47,8 @@ namespace mt std::map shot_animations; void Init1(); + static void StaticPostInit(); + int RandDrop() const; const HeroShotAnimation* GetShotAnimi(int shotfire) const;