From 8abeb7f2348d3ab23cbb3099dd2801fd2dd416b9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 15 Mar 2023 20:40:18 +0800 Subject: [PATCH] 1 --- server/gameserver/battledatacontext.cc | 1 + server/gameserver/creature.cc | 6 +++++- server/gameserver/creature.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/server/gameserver/battledatacontext.cc b/server/gameserver/battledatacontext.cc index d84e1cf1..2c5b5f7c 100644 --- a/server/gameserver/battledatacontext.cc +++ b/server/gameserver/battledatacontext.cc @@ -751,6 +751,7 @@ void BattleDataContext::Init(Creature* c) skin->skin_id = item_meta->skinid(); } } + c->NetInitOk(); } void BattleDataContext::GetSkillList(std::vector& skill_list) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index a3a9c98c..774394b5 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -66,7 +66,6 @@ Creature::Creature():MoveableEntity() inventory_[IS_1XSCOPE].num = 1; movement_ = std::make_shared(this); gun_grasp_ = std::make_shared(this); - gun_grasp_->Init(); } Creature::~Creature() @@ -3021,3 +3020,8 @@ float Creature::GetSkillRaycastDistance() } return 0; } + +void Creature::NetInitOk() +{ + gun_grasp_->Init(); +} diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index 8be6596c..183eba57 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -330,6 +330,7 @@ class Creature : public MoveableEntity void UnSetBuffTag(int tag); void ShortFindPath(); float GetSkillRaycastDistance(); + virtual void NetInitOk(); protected: virtual void OnBuffRemove(Buff& buff);