This commit is contained in:
aozhiwei 2024-01-15 17:31:56 +08:00
parent c31c48ec48
commit 94f5ae9093
4 changed files with 9 additions and 7 deletions

View File

@ -23,22 +23,22 @@ namespace mt
bool BattleHeroGrow::IsFullLevel() const bool BattleHeroGrow::IsFullLevel() const
{ {
return false; return levelExp() <= 0;
} }
std::shared_ptr<std::vector<std::tuple<int, float>>> BattleHeroGrow::GetLevelAttrs() const std::shared_ptr<std::vector<std::tuple<int, float>>> BattleHeroGrow::GetLevelAttrs() const
{ {
return nullptr; return attrs_;
} }
std::shared_ptr<std::vector<int>> BattleHeroGrow::GetEquipEffects() const std::shared_ptr<std::vector<int>> BattleHeroGrow::GetEquipEffects() const
{ {
return nullptr; return effects_;
} }
int BattleHeroGrow::GetSkillEffect() const int BattleHeroGrow::GetSkillEffect() const
{ {
return 0; return currentSkillEffect();
} }
} }

View File

@ -21,6 +21,8 @@ namespace mt
int GetSkillEffect() const; int GetSkillEffect() const;
private: private:
std::shared_ptr<std::vector<std::tuple<int, float>>> attrs_;
std::shared_ptr<std::vector<int>> effects_;
}; };
} }

View File

@ -19,7 +19,7 @@ namespace mtb
int lootExp() const { return lootExp_; }; int lootExp() const { return lootExp_; };
const std::string currentLevelAttribute() const { return currentLevelAttribute_; }; const std::string currentLevelAttribute() const { return currentLevelAttribute_; };
const std::string currentEquipEffect() const { return currentEquipEffect_; }; const std::string currentEquipEffect() const { return currentEquipEffect_; };
const std::string currentSkillEffect() const { return currentSkillEffect_; }; int currentSkillEffect() const { return currentSkillEffect_; };
const std::string currentSkillDesc() const { return currentSkillDesc_; }; const std::string currentSkillDesc() const { return currentSkillDesc_; };
bool has_id() const { return __flags__.test(0);}; bool has_id() const { return __flags__.test(0);};
@ -45,7 +45,7 @@ namespace mtb
int lootExp_ = 0; int lootExp_ = 0;
std::string currentLevelAttribute_; std::string currentLevelAttribute_;
std::string currentEquipEffect_; std::string currentEquipEffect_;
std::string currentSkillEffect_; int currentSkillEffect_ = 0;
std::string currentSkillDesc_; std::string currentSkillDesc_;
public: public:

View File

@ -1048,7 +1048,7 @@ namespace mtb
meta_class->SetSimpleField(6, "lootExp", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, lootExp_)); meta_class->SetSimpleField(6, "lootExp", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, lootExp_));
meta_class->SetSimpleField(7, "currentLevelAttribute", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentLevelAttribute_)); meta_class->SetSimpleField(7, "currentLevelAttribute", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentLevelAttribute_));
meta_class->SetSimpleField(8, "currentEquipEffect", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentEquipEffect_)); meta_class->SetSimpleField(8, "currentEquipEffect", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentEquipEffect_));
meta_class->SetSimpleField(9, "currentSkillEffect", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentSkillEffect_)); meta_class->SetSimpleField(9, "currentSkillEffect", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, currentSkillEffect_));
meta_class->SetSimpleField(10, "currentSkillDesc", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentSkillDesc_)); meta_class->SetSimpleField(10, "currentSkillDesc", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentSkillDesc_));
} }
return meta_class; return meta_class;