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);