From 2d597fc5b8d6bea6e555071543cdd20cdee126f1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 17 Jan 2024 11:46:24 +0800 Subject: [PATCH] 1 --- server/gameserver/hero_agent.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/gameserver/hero_agent.cc b/server/gameserver/hero_agent.cc index 8718fa59..a786cc4b 100644 --- a/server/gameserver/hero_agent.cc +++ b/server/gameserver/hero_agent.cc @@ -23,6 +23,7 @@ #include "car.h" #include "roomobstacle.h" #include "weapon.h" +#include "stats.h" #include "mt/Hero.h" #include "mt/Equip.h" @@ -1556,6 +1557,9 @@ behaviac::EBTStatus HeroAgent::ThrowItem(int slot) bomb_dir, fly_distance, 0); + if (owner_->IsHuman()) { + owner_->AsHuman()->stats->IncWeaponUseTimes(weapon.meta->id(), 1); + } last_throw_item_frameno_ = owner_->room->GetFrameNo(); return behaviac::BT_SUCCESS; }