From f1f422f11a0a523eefe0676c56f3bc1bd1a23b7b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 26 Apr 2024 16:46:47 +0800 Subject: [PATCH] 1 --- server/gameserver/mt/Hero.cc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/server/gameserver/mt/Hero.cc b/server/gameserver/mt/Hero.cc index fefe8452..e65c3a42 100644 --- a/server/gameserver/mt/Hero.cc +++ b/server/gameserver/mt/Hero.cc @@ -89,6 +89,17 @@ static bool LoadNormalHeroAnimi(const std::string key, return true; } +static bool LoadOtherHeroAnimi(const std::string key, + std::shared_ptr anim_xobj, + mt::HeroShotAnimation& anim) +{ + std::string id_str; + a8::ReplaceString(id_str, key, "other"); + int id = a8::XValue(id_str); + + return true; +} + namespace mt { @@ -316,8 +327,13 @@ namespace mt mt::Hero* mut_hero_meta = (mt::Hero*)hero_meta; { mt::HeroShotAnimation anim; - LoadNormalHeroAnimi(key2, anim_xobj, anim); - mut_hero_meta->shot_animations[anim.id] = anim; + if (key2.find("other") == std::string::npos) { + LoadNormalHeroAnimi(key2, anim_xobj, anim); + mut_hero_meta->shot_animations[anim.id] = anim; + } else { + LoadOtherHeroAnimi(key2, anim_xobj, anim); + mut_hero_meta->other_shot_animations[anim.id] = anim; + } } } #if 0