diff --git a/server/gameserver/battledatacontext.cc b/server/gameserver/battledatacontext.cc index 70e0f39b..4a3d5aad 100644 --- a/server/gameserver/battledatacontext.cc +++ b/server/gameserver/battledatacontext.cc @@ -44,6 +44,7 @@ public: long long hero_uniid_ = 0; const mt::Hero* hero_meta = nullptr; std::shared_ptr hero_dto; + int spec_skill_id = 0; float GetHP() { @@ -427,6 +428,7 @@ void BattleDataContext::ParseResult(a8::XObject& obj) if (obj.HasKey("hero_dto") && obj.At("hero_dto")->IsObject()) { hero_dto = obj.At("hero_dto"); hero_ability_->hero_uniid_ = hero_dto->Get("hero_uniid", ""); + hero_ability_->spec_skill_id = hero_dto->Get("skill_id", ""); hero_ability_->hero_dto = hero_dto; hero_lv_ = hero_dto->HasKey("hero_lv") ? hero_dto->Get("hero_lv").GetInt() : 1; const mt::Hero* meta = mt::Hero::GetById(hero_dto->Get("hero_id", "")); @@ -846,10 +848,6 @@ void BattleDataContext::Init(Creature* c) void BattleDataContext::GetSkillList(std::vector& skill_list) { - long long hero_uniid = 0; - int hero_lv = 1; - int quality = 1; - GetHeroLvQuality(hero_uniid, hero_lv, quality); const mt::Skill* skill1 = mt::Skill::GetById(hero_ability_->hero_meta->skill1list()); const mt::Skill* skill2 = mt::Skill::GetById(hero_ability_->hero_meta->skill2list()); const mt::Skill* skill3 = mt::Skill::GetById(hero_ability_->hero_meta->skill3list());