This commit is contained in:
aozhiwei 2023-09-27 14:11:11 +08:00
parent e34322e59b
commit 39d4631e02
3 changed files with 14 additions and 0 deletions

View File

@ -2245,6 +2245,12 @@ void Creature::OnBattleStart(Room* room)
A8_ABORT(); A8_ABORT();
} }
#endif #endif
for (int item_id : GetBattleContext()->GetAvatars()) {
if (item_id == 290001) {
TryAddBuff(this, 1029000101);
break;
}
}
} }
bool Creature::CanFollow(Creature* follower) bool Creature::CanFollow(Creature* follower)

View File

@ -544,6 +544,11 @@ void BattleDataContext::ParseResult(a8::XObject& obj)
} }
} }
#endif #endif
if (obj.HasKey("avatar_info") && obj.At("avatar_info")->IsArray()) {
if (obj.At("avatar_info")->Size() > 0) {
avatars_.push_back(290001);
}
}
parse_ok = hero_ability_->hero_meta != nullptr; parse_ok = hero_ability_->hero_meta != nullptr;
} }

View File

@ -88,6 +88,7 @@ struct BattleDataContext
int GetHonor(); int GetHonor();
int GetElo() { return elo_; } int GetElo() { return elo_; }
const std::list<int>& GetAvatars() { return avatars_; }
private: private:
void Clear(); void Clear();
@ -122,6 +123,8 @@ private:
int current_get_star_ = 0; int current_get_star_ = 0;
int battle_times_ = 0; int battle_times_ = 0;
std::list<int> avatars_;
int skill1_lv = 1; int skill1_lv = 1;
int skill2_lv = 1; int skill2_lv = 1;
int skill3_lv = 1; int skill3_lv = 1;