From 3e4aa98643691b4278c46ef3759997fb7f1cb169 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 16 Jul 2023 14:20:39 +0800 Subject: [PATCH] 1 --- server/gameserver/netdata.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/gameserver/netdata.cc b/server/gameserver/netdata.cc index b00cb9aa..380c0078 100644 --- a/server/gameserver/netdata.cc +++ b/server/gameserver/netdata.cc @@ -446,6 +446,25 @@ void BattleDataContext::ParseResult(a8::XObject& obj) hero_ability_->hero_meta = meta; } } + if (obj.HasKey("honor_info") && obj.At("honor_info")->IsArray()) { + auto honor_info = obj.At("horn_info"); + for (int i = 0; i < honor_info->Size(); ++i) { + auto info = honor_info->At(i); + if (info->IsObject()) { + if (info->HasKey("token_type") && + info->HasKey("state") && + info->At("token_type")->IsSimple() && + info->At("state")->IsSimple() + ) { + int token_type = info->Get("token_type").GetInt(); + int state = info->Get("state").GetInt(); + if (token_type == 6 && state) { + honor_ = 1; + } + } + } + } + } #if 1 if (hero_ability_->hero_meta) { const mt::Item* item_meta = mt::Item::GetById(hero_ability_->hero_meta->default_weapon());