This commit is contained in:
aozhiwei 2024-01-12 11:28:23 +08:00
parent 8822a19ada
commit 38c91f4747
7 changed files with 139 additions and 2 deletions

View File

@ -0,0 +1,19 @@
#include "precompile.h"
#include "mt/BattleHeroGrow.h"
IMPL_TABLE(mt::BattleHeroGrow)
namespace mt
{
void BattleHeroGrow::Init1()
{
}
void BattleHeroGrow::Init2()
{
}
}

View File

@ -0,0 +1,20 @@
#pragma once
#include "mt/macro.h"
#include "mtb/BattleHeroGrow.h"
namespace mt
{
DECLARE_ID_TABLE(BattleHeroGrow, mtb::BattleHeroGrow,
"battleHeroGrow@battleHeroGrow.json",
"id")
public:
void Init1();
void Init2();
private:
};
}

View File

@ -48,6 +48,7 @@
#include "mt/Condition.h"
#include "mt/Distribution.h"
#include "mt/LootConfig.h"
#include "mt/BattleHeroGrow.h"
#include "app.h"
@ -123,6 +124,7 @@ namespace mt
RegMetaTable<Condition>(res_path_);
RegMetaTable<Distribution>(res_path_);
RegMetaTable<LootConfig>(res_path_);
RegMetaTable<BattleHeroGrow>(res_path_);
}
void MetaMgr::Load()

View File

@ -41,6 +41,7 @@ namespace mtb
float vOrigDrain() const { return vOrigDrain_; };
float vOrigTenacity() const { return vOrigTenacity_; };
float vOrigBloDef() const { return vOrigBloDef_; };
const std::string battleGrowRule() const { return battleGrowRule_; };
bool has_id() const { return __flags__.test(0);};
bool has_pBaseHealth() const { return __flags__.test(1);};
@ -73,6 +74,7 @@ namespace mtb
bool has_vOrigDrain() const { return __flags__.test(28);};
bool has_vOrigTenacity() const { return __flags__.test(29);};
bool has_vOrigBloDef() const { return __flags__.test(30);};
bool has_battleGrowRule() const { return __flags__.test(31);};
protected:
@ -107,9 +109,10 @@ namespace mtb
float vOrigDrain_ = 0.0f;
float vOrigTenacity_ = 0.0f;
float vOrigBloDef_ = 0.0f;
std::string battleGrowRule_;
public:
std::bitset<31> __flags__;
std::bitset<32> __flags__;
};
};

View File

@ -0,0 +1,55 @@
#pragma once
#include <bitset>
namespace mtb
{
class BattleHeroGrow
{
public:
std::shared_ptr<a8::reflect::Class> GetClass() const;
int id() const { return id_; };
int invoke() const { return invoke_; };
int heroId() const { return heroId_; };
int level() const { return level_; };
int levelExp() const { return levelExp_; };
int cumExp() const { return cumExp_; };
int lootExp() const { return lootExp_; };
const std::string currentLevelAttribute() const { return currentLevelAttribute_; };
const std::string currentEquipEffect() const { return currentEquipEffect_; };
const std::string currentSkillEffect() const { return currentSkillEffect_; };
const std::string currentSkillDesc() const { return currentSkillDesc_; };
bool has_id() const { return __flags__.test(0);};
bool has_invoke() const { return __flags__.test(1);};
bool has_heroId() const { return __flags__.test(2);};
bool has_level() const { return __flags__.test(3);};
bool has_levelExp() const { return __flags__.test(4);};
bool has_cumExp() const { return __flags__.test(5);};
bool has_lootExp() const { return __flags__.test(6);};
bool has_currentLevelAttribute() const { return __flags__.test(7);};
bool has_currentEquipEffect() const { return __flags__.test(8);};
bool has_currentSkillEffect() const { return __flags__.test(9);};
bool has_currentSkillDesc() const { return __flags__.test(10);};
protected:
int id_ = 0;
int invoke_ = 0;
int heroId_ = 0;
int level_ = 0;
int levelExp_ = 0;
int cumExp_ = 0;
int lootExp_ = 0;
std::string currentLevelAttribute_;
std::string currentEquipEffect_;
std::string currentSkillEffect_;
std::string currentSkillDesc_;
public:
std::bitset<11> __flags__;
};
};

View File

@ -49,6 +49,7 @@
#include "mtb/Condition.h"
#include "mtb/Distribution.h"
#include "mtb/LootConfig.h"
#include "mtb/BattleHeroGrow.h"
namespace mtb
{
@ -901,7 +902,7 @@ namespace mtb
{
std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
if (!meta_class) {
meta_class = std::make_shared<a8::reflect::Class>("BattleBasicAttribute", 31, 0);
meta_class = std::make_shared<a8::reflect::Class>("BattleBasicAttribute", 32, 0);
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(BattleBasicAttribute, id_));
meta_class->SetSimpleField(1, "pBaseHealth", a8::reflect::ET_FLOAT, my_offsetof2(BattleBasicAttribute, pBaseHealth_));
meta_class->SetSimpleField(2, "pOrigHealth", a8::reflect::ET_FLOAT, my_offsetof2(BattleBasicAttribute, pOrigHealth_));
@ -933,6 +934,7 @@ namespace mtb
meta_class->SetSimpleField(28, "vOrigDrain", a8::reflect::ET_FLOAT, my_offsetof2(BattleBasicAttribute, vOrigDrain_));
meta_class->SetSimpleField(29, "vOrigTenacity", a8::reflect::ET_FLOAT, my_offsetof2(BattleBasicAttribute, vOrigTenacity_));
meta_class->SetSimpleField(30, "vOrigBloDef", a8::reflect::ET_FLOAT, my_offsetof2(BattleBasicAttribute, vOrigBloDef_));
meta_class->SetSimpleField(31, "battleGrowRule", a8::reflect::ET_STRING, my_offsetof2(BattleBasicAttribute, battleGrowRule_));
}
return meta_class;
}
@ -1032,4 +1034,24 @@ namespace mtb
return meta_class;
}
std::shared_ptr<a8::reflect::Class> BattleHeroGrow::GetClass() const
{
std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
if (!meta_class) {
meta_class = std::make_shared<a8::reflect::Class>("BattleHeroGrow", 11, 0);
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, id_));
meta_class->SetSimpleField(1, "invoke", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, invoke_));
meta_class->SetSimpleField(2, "heroId", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, heroId_));
meta_class->SetSimpleField(3, "level", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, level_));
meta_class->SetSimpleField(4, "levelExp", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, levelExp_));
meta_class->SetSimpleField(5, "cumExp", a8::reflect::ET_INT32, my_offsetof2(BattleHeroGrow, cumExp_));
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(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(10, "currentSkillDesc", a8::reflect::ET_STRING, my_offsetof2(BattleHeroGrow, currentSkillDesc_));
}
return meta_class;
}
}

View File

@ -698,6 +698,7 @@ message BattleBasicAttribute
optional float vOrigDrain = 29;
optional float vOrigTenacity = 30;
optional float vOrigBloDef = 31;
optional string battleGrowRule = 32;
}
message BattleLevelAttribute
@ -760,3 +761,18 @@ message LootConfig
optional string numPara = 3;
optional string content = 4;
}
message BattleHeroGrow
{
optional int32 id = 1;
optional int32 invoke = 2;
optional int32 heroId = 3;
optional int32 level = 4;
optional int32 levelExp = 5;
optional int32 cumExp = 6;
optional int32 lootExp = 7;
optional string currentLevelAttribute = 8;
optional string currentEquipEffect = 9;
optional string currentSkillEffect = 10;
optional string currentSkillDesc = 11;
}