entity_spell_system/data/character_class.h

136 lines
2.9 KiB
C
Raw Normal View History

#ifndef CHARACTER_CLASS_H
#define CHARACTER_CLASS_H
2019-04-20 14:02:55 +02:00
#include "core/resource.h"
#include "core/vector.h"
#include "scene/resources/texture.h"
#include "../entities/stats/stat_data.h"
#include "../entity_enums.h"
#include "character_spec.h"
class Aura;
2019-04-20 14:02:55 +02:00
class Spell;
class Entity;
class CharacterSpec;
class Entity;
2019-04-20 14:02:55 +02:00
enum CharacterWeaponDataTypes {
CHARACTER_WEAPON_DATA_TYPES_NONE,
CHARACTER_WEAPON_DATA_TYPES_SWORD,
CHARACTER_WEAPON_DATA_TYPES_BOW
};
VARIANT_ENUM_CAST(CharacterWeaponDataTypes)
class CharacterClass : public Resource {
GDCLASS(CharacterClass, Resource);
public:
int get_id();
void set_id(int value);
String get_character_class_name();
void set_character_class_name(String value);
Ref<Texture> get_icon();
void set_icon(Ref<Texture> value);
Ref<StatData> get_stat_data();
void set_stat_data(Ref<StatData> value);
EntityEnums::PlayerResourceTypes get_player_resource_type();
void set_player_resource_type(EntityEnums::PlayerResourceTypes value);
int get_num_spells();
void set_num_spells(int value);
int get_current_spell_page();
void set_current_spell_page(int value);
Ref<Spell> get_spell(int index);
void set_spell(int index, Ref<Spell> spell);
int get_num_specs();
void set_num_specs(int value);
Ref<CharacterSpec> get_spec(int index) const;
void set_spec(int index, Ref<CharacterSpec> spec);
Ref<Aura> get_aura(int index);
void set_aura(int index, Ref<Aura> aura);
2019-04-20 14:02:55 +02:00
/*
Vector<int> get_talent_ids();
void set_talent_ids(Vector<int> ids);
Vector<int> get_spec_ids();
void set_spec_ids(Vector<int> ids);
Vector<int> get_mob_party_ids();
void set_mob_party_ids(Vector<int> ids);
Vector<int> get_mob_dislike_ids();
void set_mob_dislike_ids(Vector<int> ids);
*/
//MobSpellData *getMobSpellData();
//void setMobSpellData(MobSpellData *value);
//int get_inspector_max_spells();
//void set_inspector_max_spells(int value);
//// Spell System ////
void start_casting(int spell_id, Entity *caster, float spellScale);
void sai_follow(Entity *entity);
void sai_rest(Entity *entity);
void sai_regenerate(Entity *entity);
void sai_attack(Entity *entity);
void sai_follow_bind(Node *entity);
void sai_rest_bind(Node *entity);
void sai_regenerate_bind(Node *entity);
void sai_attack_bind(Node *entity);
2019-04-20 14:02:55 +02:00
CharacterClass();
~CharacterClass();
protected:
static void _bind_methods();
void _validate_property(PropertyInfo &property) const;
public:
2019-04-20 14:02:55 +02:00
enum {
MAX_SPELLS = 100,
MAX_SPECS = 5,
MAX_AURAS = 5,
2019-06-26 02:27:29 +02:00
ITEMS_PER_PAGE = 100,
2019-04-20 14:02:55 +02:00
};
private:
2019-04-20 14:02:55 +02:00
int _id;
String _character_class_name;
Ref<Texture> _icon;
EntityEnums::PlayerResourceTypes _player_resource_type;
Ref<StatData> _stat_data;
int _num_spells;
int _current_spell_page;
Ref<Spell> _spells[MAX_SPELLS];
int _num_specs;
Ref<CharacterSpec> _specs[MAX_SPECS];
Ref<Aura> _auras[MAX_AURAS];
2019-04-20 14:02:55 +02:00
//Vector<int> _mob_party_ids;
//Vector<int> _mob_dislike_ids;
//MobSpellData *_mob_spell_data;
};
#endif