1
This commit is contained in:
parent
a84807aced
commit
60bbdfc588
@ -42,6 +42,7 @@ namespace mt
|
|||||||
class GraspBuff;
|
class GraspBuff;
|
||||||
class BattleHeroGrow;
|
class BattleHeroGrow;
|
||||||
class InGameVoice;
|
class InGameVoice;
|
||||||
|
class MapMode;
|
||||||
|
|
||||||
struct SkillPhase;
|
struct SkillPhase;
|
||||||
}
|
}
|
||||||
|
15
server/gameserver/mt/MapMode.cc
Normal file
15
server/gameserver/mt/MapMode.cc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include "mt/MapMode.h"
|
||||||
|
|
||||||
|
IMPL_TABLE(mt::MapMode)
|
||||||
|
|
||||||
|
|
||||||
|
namespace mt
|
||||||
|
{
|
||||||
|
|
||||||
|
void MapMode::Init1()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
19
server/gameserver/mt/MapMode.h
Normal file
19
server/gameserver/mt/MapMode.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "mt/macro.h"
|
||||||
|
#include "mtb/MapMode.h"
|
||||||
|
|
||||||
|
namespace mt
|
||||||
|
{
|
||||||
|
DECLARE_ID_TABLE(MapMode, mtb::MapMode,
|
||||||
|
"mapMode@mapMode.json",
|
||||||
|
"id")
|
||||||
|
public:
|
||||||
|
|
||||||
|
void Init1();
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<int, int> _map_list;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -47,6 +47,7 @@
|
|||||||
#include "mt/BattleHeroGrow.h"
|
#include "mt/BattleHeroGrow.h"
|
||||||
#include "mt/MobaRoom.h"
|
#include "mt/MobaRoom.h"
|
||||||
#include "mt/InGameVoice.h"
|
#include "mt/InGameVoice.h"
|
||||||
|
#include "mt/MapMode.h"
|
||||||
|
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ namespace mt
|
|||||||
RegMetaTable<LootConfig>(res_path_);
|
RegMetaTable<LootConfig>(res_path_);
|
||||||
RegMetaTable<BattleHeroGrow>(res_path_);
|
RegMetaTable<BattleHeroGrow>(res_path_);
|
||||||
RegMetaTable<InGameVoice>(res_path_);
|
RegMetaTable<InGameVoice>(res_path_);
|
||||||
|
RegMetaTable<MapMode>(res_path_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetaMgr::Load()
|
void MetaMgr::Load()
|
||||||
|
43
server/gameserver/mtb/MapMode.h
Normal file
43
server/gameserver/mtb/MapMode.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <bitset>
|
||||||
|
|
||||||
|
namespace mtb
|
||||||
|
{
|
||||||
|
|
||||||
|
class MapMode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
std::shared_ptr<a8::reflect::Class> GetClass() const;
|
||||||
|
int id() const { return id_; };
|
||||||
|
int mode() const { return mode_; };
|
||||||
|
int map_mode() const { return map_mode_; };
|
||||||
|
int is_open() const { return is_open_; };
|
||||||
|
const std::string map_list() const { return map_list_; };
|
||||||
|
int level_require() const { return level_require_; };
|
||||||
|
int parameter1() const { return parameter1_; };
|
||||||
|
|
||||||
|
bool has_id() const { return __flags__.test(0);};
|
||||||
|
bool has_mode() const { return __flags__.test(1);};
|
||||||
|
bool has_map_mode() const { return __flags__.test(2);};
|
||||||
|
bool has_is_open() const { return __flags__.test(3);};
|
||||||
|
bool has_map_list() const { return __flags__.test(4);};
|
||||||
|
bool has_level_require() const { return __flags__.test(5);};
|
||||||
|
bool has_parameter1() const { return __flags__.test(6);};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
int id_ = 0;
|
||||||
|
int mode_ = 0;
|
||||||
|
int map_mode_ = 0;
|
||||||
|
int is_open_ = 0;
|
||||||
|
std::string map_list_;
|
||||||
|
int level_require_ = 0;
|
||||||
|
int parameter1_ = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
std::bitset<7> __flags__;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
@ -4,6 +4,7 @@
|
|||||||
#include "mtb/Parameter.h"
|
#include "mtb/Parameter.h"
|
||||||
#include "mtb/Attr.h"
|
#include "mtb/Attr.h"
|
||||||
#include "mtb/Map.h"
|
#include "mtb/Map.h"
|
||||||
|
#include "mtb/MapMode.h"
|
||||||
#include "mtb/MobaRoom.h"
|
#include "mtb/MobaRoom.h"
|
||||||
#include "mtb/InGameVoice.h"
|
#include "mtb/InGameVoice.h"
|
||||||
#include "mtb/MapArea.h"
|
#include "mtb/MapArea.h"
|
||||||
@ -112,6 +113,22 @@ namespace mtb
|
|||||||
return meta_class;
|
return meta_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<a8::reflect::Class> MapMode::GetClass() const
|
||||||
|
{
|
||||||
|
std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
|
||||||
|
if (!meta_class) {
|
||||||
|
meta_class = std::make_shared<a8::reflect::Class>("MapMode", 7, 0);
|
||||||
|
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(MapMode, id_));
|
||||||
|
meta_class->SetSimpleField(1, "mode", a8::reflect::ET_INT32, my_offsetof2(MapMode, mode_));
|
||||||
|
meta_class->SetSimpleField(2, "map_mode", a8::reflect::ET_INT32, my_offsetof2(MapMode, map_mode_));
|
||||||
|
meta_class->SetSimpleField(3, "is_open", a8::reflect::ET_INT32, my_offsetof2(MapMode, is_open_));
|
||||||
|
meta_class->SetSimpleField(4, "map_list", a8::reflect::ET_STRING, my_offsetof2(MapMode, map_list_));
|
||||||
|
meta_class->SetSimpleField(5, "level_require", a8::reflect::ET_INT32, my_offsetof2(MapMode, level_require_));
|
||||||
|
meta_class->SetSimpleField(6, "parameter1", a8::reflect::ET_INT32, my_offsetof2(MapMode, parameter1_));
|
||||||
|
}
|
||||||
|
return meta_class;
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<a8::reflect::Class> MobaRoom::GetClass() const
|
std::shared_ptr<a8::reflect::Class> MobaRoom::GetClass() const
|
||||||
{
|
{
|
||||||
std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
|
std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
|
||||||
|
@ -46,6 +46,17 @@ message Map
|
|||||||
optional int32 is_moba = 29;
|
optional int32 is_moba = 29;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message MapMode
|
||||||
|
{
|
||||||
|
optional int32 id = 1;
|
||||||
|
optional int32 mode = 2;
|
||||||
|
optional int32 map_mode = 3;
|
||||||
|
optional int32 is_open = 4;
|
||||||
|
optional string map_list = 5;
|
||||||
|
optional int32 level_require = 6;
|
||||||
|
optional int32 parameter1= 7;
|
||||||
|
}
|
||||||
|
|
||||||
message MobaRoom
|
message MobaRoom
|
||||||
{
|
{
|
||||||
optional int32 map_id = 1;
|
optional int32 map_id = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user