This commit is contained in:
aozhiwei 2023-05-18 11:45:09 +08:00
parent 2f77ad01de
commit 79cec69263
6 changed files with 96 additions and 0 deletions

View File

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

View File

@ -0,0 +1,19 @@
#pragma once
#include "mt/macro.h"
#include "mtb/MergeItem.h"
namespace mt
{
DECLARE_ID_TABLE(MergeItem, mtb::MergeItem,
"mergeItem@mergeItem.json",
"equip_id")
public:
void Init1();
private:
};
}

View File

@ -38,6 +38,7 @@
#include "mt/Grasp.h"
#include "mt/GraspBuff.h"
#include "mt/GuideStep.h"
#include "mt/MergeItem.h"
#include "app.h"
@ -105,6 +106,7 @@ namespace mt
RegMetaTable<Grasp>(res_path_);
RegMetaTable<GraspBuff>(res_path_);
RegMetaTable<GuideStep>(res_path_);
RegMetaTable<MergeItem>(res_path_);
}
void MetaMgr::Load()

View File

@ -0,0 +1,37 @@
#pragma once
#include <bitset>
namespace mtb
{
class MergeItem
{
public:
a8::reflect::Class* GetClass() const;
int equip_id() const { return equip_id_; };
int skill_id() const { return skill_id_; };
const std::string pickup3() const { return pickup3_; };
const std::string pickup6() const { return pickup6_; };
const std::string pickup9() const { return pickup9_; };
bool has_equip_id() const { return __flags__.test(0);};
bool has_skill_id() const { return __flags__.test(1);};
bool has_pickup3() const { return __flags__.test(2);};
bool has_pickup6() const { return __flags__.test(3);};
bool has_pickup9() const { return __flags__.test(4);};
protected:
int equip_id_ = 0;
int skill_id_ = 0;
std::string pickup3_;
std::string pickup6_;
std::string pickup9_;
public:
std::bitset<5> __flags__;
};
};

View File

@ -38,6 +38,7 @@
#include "mtb/GraspBuff.h"
#include "mtb/GuideStep.h"
#include "mtb/WorldObject.h"
#include "mtb/MergeItem.h"
namespace mtb
{
@ -818,4 +819,18 @@ namespace mtb
return meta_class;
}
a8::reflect::Class* MergeItem::GetClass() const
{
a8::reflect::Class* meta_class = nullptr;
if (!meta_class) {
meta_class = new a8::reflect::Class("MergeItem", 5, 0);
meta_class->SetSimpleField(0, "equip_id", a8::reflect::ET_INT32, my_offsetof2(MergeItem, equip_id_));
meta_class->SetSimpleField(1, "skill_id", a8::reflect::ET_INT32, my_offsetof2(MergeItem, skill_id_));
meta_class->SetSimpleField(2, "pickup3", a8::reflect::ET_STRING, my_offsetof2(MergeItem, pickup3_));
meta_class->SetSimpleField(3, "pickup6", a8::reflect::ET_STRING, my_offsetof2(MergeItem, pickup6_));
meta_class->SetSimpleField(4, "pickup9", a8::reflect::ET_STRING, my_offsetof2(MergeItem, pickup9_));
}
return meta_class;
}
}

View File

@ -610,3 +610,12 @@ message WorldObject
optional float y = 4;
optional float z = 5;
}
message MergeItem
{
optional int32 equip_id = 1;
optional int32 skill_id = 2;
optional string pickup3 = 3;
optional string pickup6 = 4;
optional string pickup9 = 5;
}