#ifndef CHARACTER_H #define CHARACTER_H #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; class Spell; class Entity; class CharacterSpec; 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 get_icon(); void set_icon(Ref value); Ref get_stat_data(); void set_stat_data(Ref 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 get_spell(int index); void set_spell(int index, Ref spell); int get_num_specs(); void set_num_specs(int value); Ref get_spec(int index) const; void set_spec(int index, Ref spec); Ref get_aura(int index); void set_aura(int index, Ref aura); /* Vector get_talent_ids(); void set_talent_ids(Vector ids); Vector get_spec_ids(); void set_spec_ids(Vector ids); Vector get_mob_party_ids(); void set_mob_party_ids(Vector ids); Vector get_mob_dislike_ids(); void set_mob_dislike_ids(Vector 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 casting_finished(Entity *caster, float spellScale); void casting_failed(Entity *caster); void spell_hit(Entity *caster, Entity *target, Node *worldSpell, Spell *spell, float spellScale); void on_player_move(Entity *caster); void c_on_spell_cast_started(Entity *player); void c_on_spell_cast_success(Entity *player); void c_on_spell_cast_failed(Entity *player); void c_on_spell_cast_ended(Entity *player); void on_cast_state_changed(Entity *caster); String get_name(); String get_description(int level); CharacterClass(); ~CharacterClass(); protected: static void _bind_methods(); void _validate_property(PropertyInfo &property) const; public: enum { MAX_SPELLS = 100, MAX_SPECS = 5, MAX_AURAS = 5, ITEMS_PER_PAGE = 100, }; private: int _id; String _character_class_name; Ref _icon; EntityEnums::PlayerResourceTypes _player_resource_type; Ref _stat_data; int _num_spells; int _current_spell_page; Ref _spells[MAX_SPELLS]; int _num_specs; Ref _specs[MAX_SPECS]; Ref _auras[MAX_AURAS]; //Vector _mob_party_ids; //Vector _mob_dislike_ids; //MobSpellData *_mob_spell_data; }; #endif