1
This commit is contained in:
parent
417796a65f
commit
44e2e4373d
31
server/gameserver/mtb/MapThingGroup.h
Normal file
31
server/gameserver/mtb/MapThingGroup.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <bitset>
|
||||||
|
|
||||||
|
namespace mtb
|
||||||
|
{
|
||||||
|
|
||||||
|
class MapThingGroup
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
a8::reflect::Class* GetClass() const;
|
||||||
|
int mtGroupId() const { return mtGroupId_; };
|
||||||
|
const std::string rule() const { return rule_; };
|
||||||
|
const std::string mapThings() const { return mapThings_; };
|
||||||
|
|
||||||
|
bool has_mtGroupId() const { return __flags__.test(0);};
|
||||||
|
bool has_rule() const { return __flags__.test(1);};
|
||||||
|
bool has_mapThings() const { return __flags__.test(2);};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
int mtGroupId_ = 0;
|
||||||
|
std::string rule_;
|
||||||
|
std::string mapThings_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
std::bitset<3> __flags__;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
@ -39,6 +39,7 @@
|
|||||||
#include "mtb/GuideStep.h"
|
#include "mtb/GuideStep.h"
|
||||||
#include "mtb/WorldObject.h"
|
#include "mtb/WorldObject.h"
|
||||||
#include "mtb/MergeItem.h"
|
#include "mtb/MergeItem.h"
|
||||||
|
#include "mtb/MapThingGroup.h"
|
||||||
|
|
||||||
namespace mtb
|
namespace mtb
|
||||||
{
|
{
|
||||||
@ -833,4 +834,16 @@ namespace mtb
|
|||||||
return meta_class;
|
return meta_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a8::reflect::Class* MapThingGroup::GetClass() const
|
||||||
|
{
|
||||||
|
a8::reflect::Class* meta_class = nullptr;
|
||||||
|
if (!meta_class) {
|
||||||
|
meta_class = new a8::reflect::Class("MapThingGroup", 3, 0);
|
||||||
|
meta_class->SetSimpleField(0, "mtGroupId", a8::reflect::ET_INT32, my_offsetof2(MapThingGroup, mtGroupId_));
|
||||||
|
meta_class->SetSimpleField(1, "rule", a8::reflect::ET_STRING, my_offsetof2(MapThingGroup, rule_));
|
||||||
|
meta_class->SetSimpleField(2, "mapThings", a8::reflect::ET_STRING, my_offsetof2(MapThingGroup, mapThings_));
|
||||||
|
}
|
||||||
|
return meta_class;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -619,3 +619,10 @@ message MergeItem
|
|||||||
optional string pickup6 = 4;
|
optional string pickup6 = 4;
|
||||||
optional string pickup9 = 5;
|
optional string pickup9 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message MapThingGroup
|
||||||
|
{
|
||||||
|
optional int32 mtGroupId = 1;
|
||||||
|
optional string rule = 2;
|
||||||
|
optional string mapThings = 3;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user