-
Notifications
You must be signed in to change notification settings - Fork 0
/
Merk.h
54 lines (41 loc) · 1.29 KB
/
Merk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#ifndef _MERK_H_
#define _MERK_H_
#include "DataBase.h"
//#include "../../Database0/Database0/UnitDef.h"
#include "shared_enums.h"
#ifndef _Ogre_H__
#include <string>
#endif
class Merk: public std::enable_shared_from_this<Merk>
{
#ifdef _Ogre_H__
typedef Ogre::String String;
#else
typedef std::string String;
#endif
int m_MerkID;
String m_Name;
UnitDef m_UnitDef;
Merk(int merk_id, String name, UnitDef ud);
Merk(const Merk&) = delete;
public:
//Merk(void);
//~Merk(void);
typedef std::shared_ptr<Merk> ptr;
static Merk::ptr create(int player_id, int merk_id,
String name, char type_id, char weapon_id = static_cast<char>(WEAPON::UNDEFINED_WEAPON));
static Merk::ptr create(int merk_id, String name, UnitDef ud);
UnitDef& get_ud() { return m_UnitDef; }
UnitDef get_ud() const { return m_UnitDef; }
char get_type_id() const { return m_UnitDef.type_id; }
char get_weapon_id() const { return m_UnitDef.Weapon; }
void set_ud(UnitDef ud) { m_UnitDef = ud; }
void set_weapon_id(char weapon_id) { m_UnitDef.Weapon = weapon_id; }
String get_name() const { return m_Name; }
void set_name(const String& name) { m_Name = name; }
void set_name(String&& name) { m_Name = name; }
int get_id() const { return m_MerkID; }
void set_id(int merk_id) { m_MerkID = merk_id; }
};
#endif