diff --git a/autoloads/entity_data_manager.cpp b/autoloads/entity_data_manager.cpp index 0fee4e0..b6906ea 100644 --- a/autoloads/entity_data_manager.cpp +++ b/autoloads/entity_data_manager.cpp @@ -34,7 +34,7 @@ Ref EntityDataManager::get_skill_for_armor_type(int index) { return _armor_type_skills[index]; } -void EntityDataManager::set_skill_for_armor_type(int index, Ref aura) { +void EntityDataManager::set_skill_for_armor_type(int index, const Ref &aura) { ERR_FAIL_INDEX(index, ItemEnums::ARMOR_TYPE_MAX); _armor_type_skills[index] = aura; @@ -73,7 +73,7 @@ Ref EntityDataManager::get_entity_resource_index(int index) int EntityDataManager::get_entity_resource_count() { return _entity_resources.size(); } -void EntityDataManager::add_entity_resource(Ref cls) { +void EntityDataManager::add_entity_resource(const Ref &cls) { ERR_FAIL_COND(!cls.is_valid()); _entity_resources.push_back(cls); @@ -103,7 +103,7 @@ Ref EntityDataManager::get_entity_skill_index(int index) { int EntityDataManager::get_entity_skill_count() { return _entity_skills.size(); } -void EntityDataManager::add_entity_skill(Ref cls) { +void EntityDataManager::add_entity_skill(const Ref &cls) { ERR_FAIL_COND(!cls.is_valid()); _entity_skills.push_back(cls); @@ -133,7 +133,7 @@ Ref EntityDataManager::get_entity_data_index(int index) { int EntityDataManager::get_entity_data_count() { return _entity_datas.size(); } -void EntityDataManager::add_entity_data(Ref cls) { +void EntityDataManager::add_entity_data(const Ref &cls) { ERR_FAIL_COND(!cls.is_valid()); _entity_datas.push_back(cls); @@ -166,14 +166,14 @@ int EntityDataManager::get_spell_count() { return _spells.size(); } -void EntityDataManager::add_spell(Ref spell) { +void EntityDataManager::add_spell(const Ref &spell) { ERR_FAIL_COND(!spell.is_valid()); _spells.push_back(spell); _spell_map.set(spell->get_id(), spell); } -void EntityDataManager::add_aura(Ref aura) { +void EntityDataManager::add_aura(const Ref &aura) { ERR_FAIL_COND(!aura.is_valid()); _auras.push_back(aura); @@ -230,7 +230,7 @@ Ref EntityDataManager::get_world_spell_data_index(int index) { int EntityDataManager::get_world_spell_data_count() { return _world_spell_datas.size(); } -void EntityDataManager::add_world_spell_data(Ref cls) { +void EntityDataManager::add_world_spell_data(const Ref &cls) { ERR_FAIL_COND(!cls.is_valid()); _world_spell_datas.push_back(cls); @@ -238,7 +238,7 @@ void EntityDataManager::add_world_spell_data(Ref cls) { } //Craft Data -void EntityDataManager::add_craft_data(Ref cda) { +void EntityDataManager::add_craft_data(const Ref &cda) { ERR_FAIL_COND(!cda.is_valid()); _craft_datas.push_back(cda); @@ -281,7 +281,7 @@ Vector > *EntityDataManager::get_item_templates() { return &_item_templates; } -void EntityDataManager::add_item_template(Ref cda) { +void EntityDataManager::add_item_template(const Ref &cda) { ERR_FAIL_COND(!cda.is_valid()); _item_templates.push_back(cda); @@ -314,7 +314,7 @@ Vector > *EntityDataManager::get_mob_datas() { return &_mob_datas; } -void EntityDataManager::add_mob_data(Ref cda) { +void EntityDataManager::add_mob_data(const Ref &cda) { ERR_FAIL_COND(!cda.is_valid()); _mob_datas.push_back(cda); @@ -347,7 +347,7 @@ Vector > *EntityDataManager::get_player_character_datas() { return &_player_character_datas; } -void EntityDataManager::add_player_character_data(Ref cda) { +void EntityDataManager::add_player_character_data(const Ref &cda) { ERR_FAIL_COND(!cda.is_valid()); _player_character_datas.push_back(cda); diff --git a/autoloads/entity_data_manager.h b/autoloads/entity_data_manager.h index d7a4d01..a641092 100644 --- a/autoloads/entity_data_manager.h +++ b/autoloads/entity_data_manager.h @@ -35,7 +35,7 @@ public: static EntityDataManager *get_instance(); Ref get_skill_for_armor_type(int index); - void set_skill_for_armor_type(int index, Ref aura); + void set_skill_for_armor_type(int index, const Ref &aura); String get_xp_data_path(); void set_xp_data_path(String path); @@ -47,7 +47,7 @@ public: Ref get_entity_resource(int class_id); Ref get_entity_resource_index(int index); int get_entity_resource_count(); - void add_entity_resource(Ref cls); + void add_entity_resource(const Ref &cls); String get_entity_skills_folder(); void set_entity_skills_folder(String folder); @@ -55,7 +55,7 @@ public: Ref get_entity_skill(int class_id); Ref get_entity_skill_index(int index); int get_entity_skill_count(); - void add_entity_skill(Ref cls); + void add_entity_skill(const Ref &cls); String get_entity_datas_folder(); void set_entity_datas_folder(String folder); @@ -63,7 +63,7 @@ public: Ref get_entity_data(int class_id); Ref get_entity_data_index(int index); int get_entity_data_count(); - void add_entity_data(Ref cls); + void add_entity_data(const Ref &cls); String get_spells_folder(); void set_spells_folder(String folder); @@ -71,7 +71,7 @@ public: Ref get_spell(int spell_id); Ref get_spell_index(int index); int get_spell_count(); - void add_spell(Ref spell); + void add_spell(const Ref &spell); String get_auras_folder(); void set_auras_folder(String folder); @@ -79,7 +79,7 @@ public: Ref get_aura(int aura_id); Ref get_aura_index(int index); int get_aura_count(); - void add_aura(Ref aura); + void add_aura(const Ref &aura); String get_world_spell_datas_folder(); void set_world_spell_datas_folder(String folder); @@ -87,7 +87,7 @@ public: Ref get_world_spell_data(int class_id); Ref get_world_spell_data_index(int index); int get_world_spell_data_count(); - void add_world_spell_data(Ref cls); + void add_world_spell_data(const Ref &cls); String get_craft_data_folder(); void set_craft_data_folder(String folder); @@ -95,12 +95,12 @@ public: Ref get_craft_data(int craft_id); Ref get_craft_data_index(int index); int get_craft_data_count(); - void add_craft_data(Ref aura); + void add_craft_data(const Ref &aura); String get_item_template_folder(); void set_item_template_folder(String folder); Vector > *get_item_templates(); - void add_item_template(Ref aura); + void add_item_template(const Ref &aura); Ref get_item_template(int item_id); Ref get_item_template_index(int index); int get_item_template_count(); @@ -108,7 +108,7 @@ public: String get_mob_data_folder(); void set_mob_data_folder(String folder); Vector > *get_mob_datas(); - void add_mob_data(Ref aura); + void add_mob_data(const Ref &aura); Ref get_mob_data(int item_id); Ref get_mob_data_index(int index); int get_mob_data_count(); @@ -116,7 +116,7 @@ public: String get_player_character_data_folder(); void set_player_character_data_folder(String folder); Vector > *get_player_character_datas(); - void add_player_character_data(Ref aura); + void add_player_character_data(const Ref &aura); Ref get_player_character_data(int item_id); Ref get_player_character_data_index(int index); int get_player_character_data_count(); diff --git a/data/aura.cpp b/data/aura.cpp index bf0c082..81c24de 100644 --- a/data/aura.cpp +++ b/data/aura.cpp @@ -2,112 +2,112 @@ #include "../entities/resources/entity_resource_cost_data.h" -int Aura::get_id() { +int Aura::get_id() const { return id; } -void Aura::set_id(int value) { +void Aura::set_id(const int value) { id = value; } Ref Aura::get_icon() { return _icon; } -void Aura::set_icon(Ref value) { - _icon = Ref(value); +void Aura::set_icon(const Ref &value) { + _icon = value; } -float Aura::get_time() { +float Aura::get_time() const { return time; } -void Aura::set_time(float value) { +void Aura::set_time(const float value) { time = value; } -float Aura::get_tick() { +float Aura::get_tick() const { return _tick; } -void Aura::set_tick(float value) { +void Aura::set_tick(const float value) { _tick = value; } Ref Aura::get_aura_group() { return _aura_group; } -void Aura::set_aura_group(Ref value) { +void Aura::set_aura_group(const Ref &value) { _aura_group = value; } -bool Aura::get_is_debuff() { +bool Aura::get_is_debuff() const { return _is_debuff; } -void Aura::set_is_debuff(bool value) { +void Aura::set_is_debuff(const bool value) { _is_debuff = value; } -SpellEnums::AuraType Aura::get_aura_type() { +SpellEnums::AuraType Aura::get_aura_type() const { return _aura_type; } void Aura::set_aura_type(SpellEnums::AuraType value) { _aura_type = value; } -int Aura::get_rank() { +int Aura::get_rank() const { return _rank; } -void Aura::set_rank(int value) { +void Aura::set_rank(const int value) { _rank = value; } -String Aura::get_text_description() { +String Aura::get_text_description() const { return _text_description; } -void Aura::set_text_description(String description) { +void Aura::set_text_description(const String description) { _text_description = description; } -bool Aura::get_hide() { +bool Aura::get_hide() const { return _hide; } -void Aura::set_hide(bool value) { +void Aura::set_hide(const bool value) { _hide = value; } Ref Aura::get_visual_spell_effects() { return _visual_spell_effects; } -void Aura::set_visual_spell_effects(Ref value) { +void Aura::set_visual_spell_effects(const Ref &value) { _visual_spell_effects = value; } Ref Aura::get_world_spell_data() { return _world_spell_data; } -void Aura::set_world_spell_data(Ref value) { +void Aura::set_world_spell_data(const Ref &value) { _world_spell_data = value; } -int Aura::get_ability_scale_data_id() { +int Aura::get_ability_scale_data_id() const { return ability_scale_data_id; } -void Aura::set_ability_scale_data_id(int value) { +void Aura::set_ability_scale_data_id(const int value) { ability_scale_data_id = value; } -float Aura::get_damage_scale_for_level(int level) { +float Aura::get_damage_scale_for_level(const int level) const { //return this->getDamageLevelScaling()->Evaluate((float)(level)); return 1; } -float Aura::get_heal_scale_for_level(int level) { +float Aura::get_heal_scale_for_level(const int level) const { //return this->getHealLevelScaling()->Evaluate((float)(level)); return 1; } -float Aura::get_absorb_scale_for_level(int level) { +float Aura::get_absorb_scale_for_level(const int level) const { //return this->getAbsorbLevelScaling()->Evaluate((float)(level)); return 1; } -SpellEnums::DiminishingReturnCategory Aura::get_diminishing_category() { +SpellEnums::DiminishingReturnCategory Aura::get_diminishing_category() const { return _diminishing_category; } @@ -115,10 +115,10 @@ void Aura::set_diminishing_category(SpellEnums::DiminishingReturnCategory dimini _diminishing_category = diminishingCategory; } -Ref Aura::get_teaches_spell() const { +Ref Aura::get_teaches_spell() { return _teaches_spell; } -void Aura::set_teaches_spell(const Ref spell) { +void Aura::set_teaches_spell(const Ref &spell) { _teaches_spell = spell; } @@ -135,43 +135,43 @@ void Aura::OnAuraAbilityScalingDataLoaded(AbilityScalingDataLoaderHelper *h) { */ //Damage -bool Aura::get_damage_enabled() { +bool Aura::get_damage_enabled() const { return _damage_enabled; } -void Aura::set_damage_enabled(bool value) { +void Aura::set_damage_enabled(const bool value) { _damage_enabled = value; } -int Aura::get_damage_type() { +int Aura::get_damage_type() const { return _damage_type; } -void Aura::set_damage_type(int value) { +void Aura::set_damage_type(const int value) { _damage_type = value; } -int Aura::get_damage_min() { +int Aura::get_damage_min() const { return _damage_min; } -void Aura::set_damage_min(int value) { +void Aura::set_damage_min(const int value) { _damage_min = value; } -int Aura::get_damage_max() { +int Aura::get_damage_max() const { return _damage_max; } -void Aura::set_damage_max(int value) { +void Aura::set_damage_max(const int value) { _damage_max = value; } -bool Aura::get_damage_can_crit() { +bool Aura::get_damage_can_crit() const { return _damage_can_crit; } -void Aura::set_damage_can_crit(bool value) { +void Aura::set_damage_can_crit(const bool value) { _damage_can_crit = value; } -void Aura::set_damage(int min, int max, bool can_crit) { +void Aura::set_damage(const int min, const int max, const bool can_crit) { set_damage_enabled(true); set_damage_min(min); set_damage_max(max); @@ -179,65 +179,65 @@ void Aura::set_damage(int min, int max, bool can_crit) { } //Absorb -bool Aura::get_absorb_enabled() { +bool Aura::get_absorb_enabled() const { return _absorb_enabled; } -void Aura::set_absorb_enabled(bool value) { +void Aura::set_absorb_enabled(const bool value) { _absorb_enabled = value; } -int Aura::get_absorb_damage_type() { +int Aura::get_absorb_damage_type() const { return _absorb_damage_type; } -void Aura::set_absorb_damage_type(int value) { +void Aura::set_absorb_damage_type(const int value) { _absorb_damage_type = value; } -int Aura::get_absorb_min() { +int Aura::get_absorb_min() const { return _absorb_min; } -void Aura::set_absorb_min(int value) { +void Aura::set_absorb_min(const int value) { _absorb_min = value; } -int Aura::get_absorb_max() { +int Aura::get_absorb_max() const { return _absorb_max; } -void Aura::set_absorb_max(int value) { +void Aura::set_absorb_max(const int value) { _absorb_max = value; } //Heal -bool Aura::get_heal_enabled() { +bool Aura::get_heal_enabled() const { return _heal_enabled; } -void Aura::set_heal_enabled(bool value) { +void Aura::set_heal_enabled(const bool value) { _heal_enabled = value; } -int Aura::get_heal_min() { +int Aura::get_heal_min() const { return _heal_min; } -void Aura::set_heal_min(int value) { +void Aura::set_heal_min(const int value) { _heal_min = value; } -int Aura::get_heal_max() { +int Aura::get_heal_max() const { return _heal_max; } -void Aura::set_heal_max(int value) { +void Aura::set_heal_max(const int value) { _heal_max = value; } -bool Aura::get_heal_can_crit() { +bool Aura::get_heal_can_crit() const { return _heal_can_crit; } -void Aura::set_heal_can_crit(bool value) { +void Aura::set_heal_can_crit(const bool value) { _heal_can_crit = value; } -void Aura::set_heal(int min, int max, bool can_crit) { +void Aura::set_heal(const int min, const int max, const bool can_crit) { set_heal_enabled(true); set_heal_min(min); set_heal_max(max); @@ -245,45 +245,45 @@ void Aura::set_heal(int min, int max, bool can_crit) { } //Dispell -bool Aura::get_dispell_enabled() { +bool Aura::get_dispell_enabled() const { return _dispell_enabled; } -void Aura::set_dispell_enabled(bool value) { +void Aura::set_dispell_enabled(const bool value) { _dispell_enabled = value; } -int Aura::get_dispell_count_min() { +int Aura::get_dispell_count_min() const { return _dispell_count_min; } -void Aura::set_dispell_count_min(int value) { +void Aura::set_dispell_count_min(const int value) { _dispell_count_min = value; } -int Aura::get_dispell_count_max() { +int Aura::get_dispell_count_max() const { return _dispell_count_max; } -void Aura::set_dispell_count_max(int value) { +void Aura::set_dispell_count_max(const int value) { _dispell_count_max = value; } -int Aura::get_dispell_aura_types() { +int Aura::get_dispell_aura_types() const { return _dispell_aura_types; } -void Aura::set_dispell_aura_types(int value) { +void Aura::set_dispell_aura_types(const int value) { _dispell_aura_types = value; } Ref Aura::get_resource_cost() { return _resource_cost; } -void Aura::set_resource_cost(Ref value) { +void Aura::set_resource_cost(const Ref &value) { _resource_cost = value; } Ref Aura::get_resource_give() { return _resource_give; } -void Aura::set_resource_give(Ref value) { +void Aura::set_resource_give(const Ref &value) { _resource_give = value; } diff --git a/data/aura.h b/data/aura.h index e67a7d0..43e803e 100644 --- a/data/aura.h +++ b/data/aura.h @@ -39,142 +39,142 @@ class Aura : public Resource { GDCLASS(Aura, Resource); public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); Ref get_icon(); - void set_icon(Ref value); + void set_icon(const Ref &value); - float get_time(); - void set_time(float value); + float get_time() const; + void set_time(const float value); Ref get_aura_group(); - void set_aura_group(Ref value); + void set_aura_group(const Ref &value); - bool get_is_debuff(); - void set_is_debuff(bool value); + bool get_is_debuff() const; + void set_is_debuff(const bool value); - float get_tick(); - void set_tick(float value); + float get_tick() const; + void set_tick(const float value); - SpellEnums::AuraType get_aura_type(); - void set_aura_type(SpellEnums::AuraType value); + SpellEnums::AuraType get_aura_type() const; + void set_aura_type(const SpellEnums::AuraType value); - int get_rank(); - void set_rank(int value); + int get_rank() const; + void set_rank(const int value); - String get_text_description(); - void set_text_description(String description); + String get_text_description() const; + void set_text_description(const String description); - bool get_hide(); - void set_hide(bool value); + bool get_hide() const; + void set_hide(const bool value); Ref get_visual_spell_effects(); - void set_visual_spell_effects(Ref value); + void set_visual_spell_effects(const Ref &value); Ref get_world_spell_data(); - void set_world_spell_data(Ref value); + void set_world_spell_data(const Ref &value); - int get_ability_scale_data_id(); - void set_ability_scale_data_id(int value); + int get_ability_scale_data_id() const; + void set_ability_scale_data_id(const int value); - float get_damage_scale_for_level(int level); - float get_heal_scale_for_level(int level); - float get_absorb_scale_for_level(int level); + float get_damage_scale_for_level(int level) const; + float get_heal_scale_for_level(int level) const; + float get_absorb_scale_for_level(int level) const; - Ref get_teaches_spell() const; - void set_teaches_spell(const Ref spell); + Ref get_teaches_spell(); + void set_teaches_spell(const Ref &spell); //Damage - bool get_damage_enabled(); - void set_damage_enabled(bool value); + bool get_damage_enabled() const; + void set_damage_enabled(const bool value); - int get_damage_type(); + int get_damage_type() const; - void set_damage_type(int value); + void set_damage_type(const int value); - int get_damage_min(); - void set_damage_min(int value); + int get_damage_min() const; + void set_damage_min(const int value); - int get_damage_max(); - void set_damage_max(int value); + int get_damage_max() const; + void set_damage_max(const int value); - bool get_damage_can_crit(); - void set_damage_can_crit(bool value); + bool get_damage_can_crit() const; + void set_damage_can_crit(const bool value); - void set_damage(int min, int max, bool can_crit); + void set_damage(const int min, const int max, const bool can_crit); //Absorb - bool get_absorb_enabled(); - void set_absorb_enabled(bool value); + bool get_absorb_enabled() const; + void set_absorb_enabled(const bool value); - int get_absorb_damage_type(); + int get_absorb_damage_type() const; - void set_absorb_damage_type(int value); + void set_absorb_damage_type(const int value); - int get_absorb_min(); - void set_absorb_min(int value); + int get_absorb_min() const; + void set_absorb_min(const int value); - int get_absorb_max(); - void set_absorb_max(int value); + int get_absorb_max() const; + void set_absorb_max(const int value); //Heal - bool get_heal_enabled(); - void set_heal_enabled(bool value); + bool get_heal_enabled() const; + void set_heal_enabled(const bool value); - int get_heal_min(); - void set_heal_min(int value); + int get_heal_min() const; + void set_heal_min(const int value); - int get_heal_max(); - void set_heal_max(int value); + int get_heal_max() const; + void set_heal_max(const int value); - bool get_heal_can_crit(); - void set_heal_can_crit(bool value); + bool get_heal_can_crit() const; + void set_heal_can_crit(const bool value); - void set_heal(int min, int max, bool can_crit); + void set_heal(const int min, const int max, const bool can_crit); //Dispells - bool get_dispell_enabled(); - void set_dispell_enabled(bool value); + bool get_dispell_enabled() const; + void set_dispell_enabled(const bool value); - int get_dispell_count_min(); - void set_dispell_count_min(int value); + int get_dispell_count_min() const; + void set_dispell_count_min(const int value); - int get_dispell_count_max(); - void set_dispell_count_max(int value); + int get_dispell_count_max() const; + void set_dispell_count_max(const int value); - int get_dispell_aura_types(); - void set_dispell_aura_types(int value); + int get_dispell_aura_types() const; + void set_dispell_aura_types(const int value); //Resources Ref get_resource_cost(); - void set_resource_cost(Ref value); + void set_resource_cost(const Ref &value); Ref get_resource_give(); - void set_resource_give(Ref value); + void set_resource_give(const Ref &value); Ref get_damage_scaling_curve() { return _damage_scaling_curve; } - void set_damage_scaling_curve(Ref curve) { _damage_scaling_curve = curve; } + void set_damage_scaling_curve(const Ref &curve) { _damage_scaling_curve = curve; } Ref get_heal_scaling_curve() { return _heal_scaling_curve; } - void set_heal_scaling_curve(Ref curve) { _heal_scaling_curve = curve; } + void set_heal_scaling_curve(const Ref &curve) { _heal_scaling_curve = curve; } Ref get_absorb_scaling_curve() { return _absorb_scaling_curve; } - void set_absorb_scaling_curve(Ref curve) { _absorb_scaling_curve = curve; } + void set_absorb_scaling_curve(const Ref &curve) { _absorb_scaling_curve = curve; } //states - int get_add_states() { return _add_states; } - void set_add_states(int value) { _add_states = value; } + int get_add_states() const { return _add_states; } + void set_add_states(const int value) { _add_states = value; } - int get_remove_effects_with_states() { return _remove_effects_with_states; } - void set_remove_effects_with_states(int value) { _remove_effects_with_states = value; } + int get_remove_effects_with_states() const { return _remove_effects_with_states; } + void set_remove_effects_with_states(const int value) { _remove_effects_with_states = value; } - int get_supress_states() { return _supress_states; } - void set_supress_states(int value) { _supress_states = value; } + int get_supress_states() const { return _supress_states; } + void set_supress_states(const int value) { _supress_states = value; } //DiminishingReturns - SpellEnums::DiminishingReturnCategory get_diminishing_category(); - void set_diminishing_category(SpellEnums::DiminishingReturnCategory diminishingCategory); + SpellEnums::DiminishingReturnCategory get_diminishing_category() const; + void set_diminishing_category(const SpellEnums::DiminishingReturnCategory diminishingCategory); //Triggers int get_trigger_count() const; diff --git a/data/craft_recipe.cpp b/data/craft_recipe.cpp index 749d1f8..fd51de9 100644 --- a/data/craft_recipe.cpp +++ b/data/craft_recipe.cpp @@ -3,45 +3,45 @@ const String CraftRecipe::BINDING_STRING_CRAFT_CATEGORIES = "None,Alchemy,Smithing,Tailoring,Enchanting,Engineering"; const String CraftRecipe::BINDING_STRING_CRAFT_SUB_CATEGORIES = "None,Potions"; -int CraftRecipe::get_id() { +int CraftRecipe::get_id() const { return _id; } -void CraftRecipe::set_id(int value) { +void CraftRecipe::set_id(const int value) { _id = value; } -CraftRecipe::CraftCategories CraftRecipe::get_category() { +CraftRecipe::CraftCategories CraftRecipe::get_category() const { return _category; } -void CraftRecipe::set_category(CraftCategories value) { +void CraftRecipe::set_category(const CraftCategories value) { _category = value; } -CraftRecipe::CraftSubCategories CraftRecipe::get_sub_category() { +CraftRecipe::CraftSubCategories CraftRecipe::get_sub_category() const { return _sub_category; } -void CraftRecipe::set_sub_category(CraftSubCategories value) { +void CraftRecipe::set_sub_category(const CraftSubCategories value) { _sub_category = value; } -Ref CraftRecipe::get_required_tool(int index) { +Ref CraftRecipe::get_required_tool(const int index) { return _required_tools[index]; } -void CraftRecipe::set_required_tool(int index, const Ref value) { +void CraftRecipe::set_required_tool(const int index, const Ref &value) { _required_tools[index] = value; } -int CraftRecipe::get_required_tools_count() { +int CraftRecipe::get_required_tools_count() const { return _required_tools_count; } -void CraftRecipe::set_required_tools_count(int value) { +void CraftRecipe::set_required_tools_count(const int value) { _required_tools_count = value; } -void CraftRecipe::set_required_material(int index, const Ref value) { +void CraftRecipe::set_required_material(const int index, const Ref &value) { _required_materials[index] = value; } @@ -49,11 +49,11 @@ Ref CraftRecipe::get_required_material(int index) { return _required_materials[index]; } -int CraftRecipe::get_required_materials_count() { +int CraftRecipe::get_required_materials_count() const { return _required_materials_count; } -void CraftRecipe::set_required_materials_count(int value) { +void CraftRecipe::set_required_materials_count(const int value) { _required_materials_count = value; } @@ -61,7 +61,7 @@ Ref CraftRecipe::get_item() { return _item; } -void CraftRecipe::set_item(Ref value) { +void CraftRecipe::set_item(const Ref &value) { _item = value; } diff --git a/data/craft_recipe.h b/data/craft_recipe.h index 184a3e1..0f3f86c 100644 --- a/data/craft_recipe.h +++ b/data/craft_recipe.h @@ -31,32 +31,32 @@ public: }; public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); - CraftCategories get_category(); - void set_category(CraftCategories value); + CraftCategories get_category() const; + void set_category(const CraftCategories value); - CraftSubCategories get_sub_category(); - void set_sub_category(CraftSubCategories value); + CraftSubCategories get_sub_category() const; + void set_sub_category(const CraftSubCategories value); //Tools Ref get_required_tool(int index); - void set_required_tool(int index, const Ref value); + void set_required_tool(const int index, const Ref &value); - int get_required_tools_count(); - void set_required_tools_count(int value); + int get_required_tools_count() const; + void set_required_tools_count(const int value); //Materials - Ref get_required_material(int index); - void set_required_material(int index, const Ref value); + Ref get_required_material(const int index); + void set_required_material(const int index, const Ref &value); - int get_required_materials_count(); - void set_required_materials_count(int value); + int get_required_materials_count() const; + void set_required_materials_count(const int value); //Item Ref get_item(); - void set_item(Ref value); + void set_item(const Ref &value); CraftRecipe(); ~CraftRecipe(); diff --git a/data/spell.cpp b/data/spell.cpp index 2adb428..c290a98 100644 --- a/data/spell.cpp +++ b/data/spell.cpp @@ -5,168 +5,168 @@ #include "aura.h" #include "craft_recipe.h" -int Spell::get_id() { +int Spell::get_id() const { return _id; } -void Spell::set_id(int value) { +void Spell::set_id(const int value) { _id = value; } -int Spell::get_spell_type() { +int Spell::get_spell_type() const { return _spell_type; } void Spell::set_spell_type(int value) { _spell_type = value; } -SpellEnums::SpellCategory Spell::get_spell_category() { +SpellEnums::SpellCategory Spell::get_spell_category() const { return _spell_category; } void Spell::set_spell_category(SpellEnums::SpellCategory value) { _spell_category = value; } -bool Spell::get_hide_from_actionbar() { +bool Spell::get_hide_from_actionbar() const { return _hide_from_actionbar; } -void Spell::set_hide_from_actionbar(bool value) { +void Spell::set_hide_from_actionbar(const bool value) { _hide_from_actionbar = value; } -float Spell::get_cooldown() { +float Spell::get_cooldown() const { return _cooldown; } -void Spell::set_cooldown(float value) { +void Spell::set_cooldown(const float value) { _cooldown = value; } -SpellTargetType Spell::get_target_type() { +SpellTargetType Spell::get_target_type() const { return _target_type; } -void Spell::set_target_type(SpellTargetType value) { +void Spell::set_target_type(const SpellTargetType value) { _target_type = value; } -TargetRelationType Spell::get_target_relation_type() { +TargetRelationType Spell::get_target_relation_type() const { return _target_relation_type; } -void Spell::set_target_relation_type(TargetRelationType value) { +void Spell::set_target_relation_type(const TargetRelationType value) { _target_relation_type = value; } -int Spell::get_level() { +int Spell::get_level() const { return _level; } -void Spell::set_level(int value) { +void Spell::set_level(const int value) { _level = value; } -int Spell::get_rank() { +int Spell::get_rank() const { return _rank; } -void Spell::set_rank(int value) { +void Spell::set_rank(const int value) { _rank = value; } -bool Spell::get_scale_with_level() { +bool Spell::get_scale_with_level() const { return _scale_with_level; } -void Spell::set_scale_with_level(bool value) { +void Spell::set_scale_with_level(const bool value) { _scale_with_level = value; } Ref Spell::get_item_cost() { return _item_cost; } -void Spell::set_item_cost(Ref value) { +void Spell::set_item_cost(const Ref &value) { _item_cost = value; } Ref Spell::get_required_item() { return _required_item; } -void Spell::set_required_item(Ref value) { +void Spell::set_required_item(const Ref &value) { _required_item = value; } Ref Spell::get_resource_cost() { return _resource_cost; } -void Spell::set_resource_cost(Ref value) { +void Spell::set_resource_cost(const Ref &value) { _resource_cost = value; } Ref Spell::get_resource_give() { return _resource_give; } -void Spell::set_resource_give(Ref value) { +void Spell::set_resource_give(const Ref &value) { _resource_give = value; } -bool Spell::get_global_cooldown_enabled() { +bool Spell::get_global_cooldown_enabled() const { return _global_cooldown_enabled; } -void Spell::set_global_cooldown_enabled(bool value) { +void Spell::set_global_cooldown_enabled(const bool value) { _global_cooldown_enabled = value; } -bool Spell::get_is_local_spell() { +bool Spell::get_is_local_spell() const { return _is_local_spell; } -void Spell::set_is_local_spell(bool value) { +void Spell::set_is_local_spell(const bool value) { _is_local_spell = value; } Ref Spell::get_icon() { return _icon; } -void Spell::set_icon(Ref value) { +void Spell::set_icon(const Ref &value) { _icon = Ref(value); } -String Spell::get_text_description() { +String Spell::get_text_description() const { return _text_description; } -void Spell::set_text_description(String value) { +void Spell::set_text_description(const String value) { _text_description = value; } Ref Spell::get_visual_spell_effects() { return _visual_spell_effects; } -void Spell::set_visual_spell_effects(Ref value) { +void Spell::set_visual_spell_effects(const Ref &value) { _visual_spell_effects = value; } Ref Spell::get_projectile() { return _projectile; } -void Spell::set_projectile(Ref value) { +void Spell::set_projectile(const Ref &value) { _projectile = value; } Ref Spell::get_teaches_craft_recipe() { return _teaches_craft_recipe; } -void Spell::set_teaches_craft_recipe(Ref value) { +void Spell::set_teaches_craft_recipe(const Ref &value) { _teaches_craft_recipe = value; } //// Caster Aura Apply //// -int Spell::get_num_caster_aura_applys() { +int Spell::get_num_caster_aura_applys() const { return _caster_aura_applys.size(); } -void Spell::set_num_caster_aura_applys(int value) { +void Spell::set_num_caster_aura_applys(const int value) { _caster_aura_applys.resize(value); } -Ref Spell::get_caster_aura_apply(int index) const { +Ref Spell::get_caster_aura_apply(const int index) { ERR_FAIL_INDEX_V(index, _caster_aura_applys.size(), Ref()); return _caster_aura_applys[index]; } -void Spell::set_caster_aura_apply(int index, Ref caster_aura_apply) { +void Spell::set_caster_aura_apply(const int index, const Ref &caster_aura_apply) { ERR_FAIL_INDEX(index, _caster_aura_applys.size()); _caster_aura_applys.set(index, Ref(caster_aura_apply)); @@ -190,19 +190,19 @@ void Spell::set_caster_aura_applys(const Vector &caster_aura_applys) { //// Target Aura Apply //// -int Spell::get_num_target_aura_applys() { +int Spell::get_num_target_aura_applys() const { return _target_aura_applys.size(); } -void Spell::set_num_target_aura_applys(int value) { +void Spell::set_num_target_aura_applys(const int value) { _target_aura_applys.resize(value); } -Ref Spell::get_target_aura_apply(int index) const { +Ref Spell::get_target_aura_apply(const int index) { ERR_FAIL_INDEX_V(index, _target_aura_applys.size(), Ref()); return _target_aura_applys[index]; } -void Spell::set_target_aura_apply(int index, Ref target_aura_apply) { +void Spell::set_target_aura_apply(const int index, const Ref &target_aura_apply) { ERR_FAIL_INDEX(index, _target_aura_applys.size()); _target_aura_applys.set(index, Ref(target_aura_apply)); @@ -226,19 +226,19 @@ void Spell::set_target_aura_applys(const Vector &target_aura_applys) { //// Apply Auras On Learn //// -int Spell::get_num_on_learn_auras() { +int Spell::get_num_on_learn_auras() const { return _on_learn_auras.size(); } -void Spell::set_num_on_learn_auras(int value) { +void Spell::set_num_on_learn_auras(const int value) { _on_learn_auras.resize(value); } -Ref Spell::get_on_learn_aura(int index) const { +Ref Spell::get_on_learn_aura(int index) { ERR_FAIL_INDEX_V(index, _on_learn_auras.size(), Ref()); return _on_learn_auras[index]; } -void Spell::set_on_learn_aura(int index, Ref on_learn_aura_apply) { +void Spell::set_on_learn_aura(const int index, const Ref &on_learn_aura_apply) { ERR_FAIL_INDEX(index, _on_learn_auras.size()); _on_learn_auras.set(index, Ref(on_learn_aura_apply)); @@ -262,234 +262,234 @@ void Spell::set_on_learn_auras(const Vector &on_learn_aura_applys) { //// Range //// -bool Spell::get_range_enabled() { +bool Spell::get_range_enabled() const { return _range_enabled; } -void Spell::set_range_enabled(bool value) { +void Spell::set_range_enabled(const bool value) { _range_enabled = value; } -float Spell::get_range() { +float Spell::get_range() const { return _range; } -void Spell::set_range(float value) { +void Spell::set_range(const float value) { _range = value; } -bool Spell::get_cast_time_enabled() { +bool Spell::get_cast_time_enabled() const { return _cast_time_enabled; } -void Spell::set_cast_time_enabled(bool value) { +void Spell::set_cast_time_enabled(const bool value) { _cast_time_enabled = value; } -float Spell::get_cast_time() { +float Spell::get_cast_time() const { return _cast_time; } -void Spell::set_cast_time(float value) { +void Spell::set_cast_time(const float value) { _cast_time = value; } -bool Spell::get_damage_enabled() { +bool Spell::get_damage_enabled() const { return _damage_enabled; } -void Spell::set_damage_enabled(bool value) { +void Spell::set_damage_enabled(const bool value) { _damage_enabled = value; } -int Spell::get_damage_type() { +int Spell::get_damage_type() const { return _damage_type; } -void Spell::set_damage_type(int value) { +void Spell::set_damage_type(const int value) { _damage_type = value; } -int Spell::get_damage_min() { +int Spell::get_damage_min() const { return _damage_min; } -void Spell::set_damage_min(int value) { +void Spell::set_damage_min(const int value) { _damage_min = value; } -int Spell::get_damage_max() { +int Spell::get_damage_max() const { return _damage_max; } -void Spell::set_damage_max(int value) { +void Spell::set_damage_max(const int value) { _damage_max = value; } -Stat::StatId Spell::get_damage_scale_stat() { +Stat::StatId Spell::get_damage_scale_stat() const { return _damage_scale_stat; } -void Spell::set_damage_scale_stat(Stat::StatId value) { +void Spell::set_damage_scale_stat(const Stat::StatId value) { _damage_scale_stat = value; } -float Spell::get_damage_scale_coeff() { +float Spell::get_damage_scale_coeff() const { return _damage_scale_coeff; } -void Spell::set_damage_scale_coeff(float value) { +void Spell::set_damage_scale_coeff(const float value) { _damage_scale_coeff = value; } -bool Spell::get_heal_enabled() { +bool Spell::get_heal_enabled() const { return _heal_enabled; } -void Spell::set_heal_enabled(bool value) { +void Spell::set_heal_enabled(const bool value) { _heal_enabled = value; } -int Spell::get_heal_min() { +int Spell::get_heal_min() const { return _heal_min; } -void Spell::set_heal_min(int value) { +void Spell::set_heal_min(const int value) { _heal_min = value; } -int Spell::get_heal_max() { +int Spell::get_heal_max() const { return _heal_max; } -void Spell::set_heal_max(int value) { +void Spell::set_heal_max(const int value) { _heal_max = value; } -Stat::StatId Spell::get_heal_scale_stat() { +Stat::StatId Spell::get_heal_scale_stat() const { return _heal_scale_stat; } -void Spell::set_heal_scale_stat(Stat::StatId value) { +void Spell::set_heal_scale_stat(const Stat::StatId value) { _heal_scale_stat = value; } -float Spell::get_heal_scale_coeff() { +float Spell::get_heal_scale_coeff() const { return _heal_scale_coeff; } -void Spell::set_heal_scale_coeff(float value) { +void Spell::set_heal_scale_coeff(const float value) { _heal_scale_coeff = value; } -bool Spell::get_dispell_enabled() { +bool Spell::get_dispell_enabled() const { return _dispell_enabled; } -void Spell::set_dispell_enabled(bool value) { +void Spell::set_dispell_enabled(const bool value) { _dispell_enabled = value; } -int Spell::get_dispell_count_min() { +int Spell::get_dispell_count_min() const { return _dispell_count_min; } -void Spell::set_dispell_count_min(int value) { +void Spell::set_dispell_count_min(const int value) { _dispell_count_min = value; } -int Spell::get_dispell_count_max() { +int Spell::get_dispell_count_max() const { return _dispell_count_max; } -void Spell::set_dispell_count_max(int value) { +void Spell::set_dispell_count_max(const int value) { _dispell_count_max = value; } -int Spell::get_dispell_aura_types() { +int Spell::get_dispell_aura_types() const { return _dispell_aura_types; } -void Spell::set_dispell_aura_types(int value) { +void Spell::set_dispell_aura_types(const int value) { _dispell_aura_types = value; } -bool Spell::get_needs_target() { +bool Spell::get_needs_target() const { return _needs_target; } -void Spell::set_needs_target(bool value) { +void Spell::set_needs_target(const bool value) { _needs_target = value; } -bool Spell::get_can_move_while_casting() { +bool Spell::get_can_move_while_casting() const { return _can_move_while_casting; } -void Spell::set_can_move_while_casting(bool value) { +void Spell::set_can_move_while_casting(const bool value) { _can_move_while_casting = value; } -bool Spell::get_interrupt_enabled() { +bool Spell::get_interrupt_enabled() const { return _interrupt_enabled; } -void Spell::set_interrupt_enabled(bool value) { +void Spell::set_interrupt_enabled(const bool value) { _interrupt_enabled = value; } -float Spell::get_interrupt_time() { +float Spell::get_interrupt_time() const { return _interrupt_time; } -void Spell::set_interrupt_time(float value) { +void Spell::set_interrupt_time(const float value) { _interrupt_time = value; } -bool Spell::get_is_aoe() { +bool Spell::get_is_aoe() const { return _is_aoe; } -void Spell::set_is_aoe(bool value) { +void Spell::set_is_aoe(const bool value) { _is_aoe = value; } -SpellAOETargetType Spell::get_aoe_target_type() { +SpellAOETargetType Spell::get_aoe_target_type() const { return _aoe_targetType; } -void Spell::set_aoe_target_type(SpellAOETargetType value) { +void Spell::set_aoe_target_type(const SpellAOETargetType value) { _aoe_targetType = value; } -SpellEnums::ColliderType Spell::get_aoe_collider_type() { +SpellEnums::ColliderType Spell::get_aoe_collider_type() const { return _aoe_colliderType; } -void Spell::set_aoe_collider_type(SpellEnums::ColliderType value) { +void Spell::set_aoe_collider_type(const SpellEnums::ColliderType value) { _aoe_colliderType = value; } -float Spell::get_aoe_radius() { +float Spell::get_aoe_radius() const { return _aoe_radius; } void Spell::set_aoe_radius(float value) { _aoe_radius = value; } -Vector3 Spell::get_aoe_box_extents() { +Vector3 Spell::get_aoe_box_extents() const { return _aoe_box_extents; } void Spell::set_aoe_box_extents(Vector3 value) { _aoe_box_extents = value; } -int Spell::get_spell_cooldown_mainpulation_data_count() { +int Spell::get_spell_cooldown_mainpulation_data_count() const { return _spell_cooldown_mainpulation_data_count; } void Spell::set_spell_cooldown_mainpulation_data_count(int value) { _spell_cooldown_mainpulation_data_count = value; } -int Spell::get_training_cost() { +int Spell::get_training_cost() const { return _training_cost; } -void Spell::set_training_cost(int value) { +void Spell::set_training_cost(const int value) { _training_cost = value; } Ref Spell::get_training_required_spell() { return _training_required_spell; } -void Spell::set_training_required_spell(Ref spell) { +void Spell::set_training_required_spell(const Ref &spell) { _training_required_spell = spell; } Ref Spell::get_training_required_skill() { return _training_required_skill; } -void Spell::set_training_required_skill(Ref skill) { +void Spell::set_training_required_skill(const Ref &skill) { _training_required_skill = skill; } -int Spell::get_training_required_skill_level() { +int Spell::get_training_required_skill_level() const { return _training_required_skill_level; } -void Spell::set_training_required_skill_level(int value) { +void Spell::set_training_required_skill_level(const int value) { _training_required_skill_level = value; } diff --git a/data/spell.h b/data/spell.h index 6abe76e..9e0d5a0 100644 --- a/data/spell.h +++ b/data/spell.h @@ -58,201 +58,201 @@ class Spell : public Resource { GDCLASS(Spell, Resource); public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); - int get_spell_type(); - void set_spell_type(int value); + int get_spell_type() const; + void set_spell_type(const int value); - SpellEnums::SpellCategory get_spell_category(); - void set_spell_category(SpellEnums::SpellCategory value); + SpellEnums::SpellCategory get_spell_category() const; + void set_spell_category(const SpellEnums::SpellCategory value); - bool get_hide_from_actionbar(); - void set_hide_from_actionbar(bool value); + bool get_hide_from_actionbar() const; + void set_hide_from_actionbar(const bool value); - float get_cooldown(); - void set_cooldown(float value); + float get_cooldown() const; + void set_cooldown(const float value); - SpellTargetType get_target_type(); - void set_target_type(SpellTargetType value); + SpellTargetType get_target_type() const; + void set_target_type(const SpellTargetType value); - TargetRelationType get_target_relation_type(); - void set_target_relation_type(TargetRelationType value); + TargetRelationType get_target_relation_type() const; + void set_target_relation_type(const TargetRelationType value); - int get_level(); - void set_level(int value); + int get_level() const; + void set_level(const int value); - int get_rank(); - void set_rank(int value); + int get_rank() const; + void set_rank(const int value); - bool get_scale_with_level(); - void set_scale_with_level(bool value); + bool get_scale_with_level() const; + void set_scale_with_level(const bool value); Ref get_item_cost(); - void set_item_cost(Ref value); + void set_item_cost(const Ref &value); Ref get_required_item(); - void set_required_item(Ref value); + void set_required_item(const Ref &value); Ref get_resource_cost(); - void set_resource_cost(Ref value); + void set_resource_cost(const Ref &value); Ref get_resource_give(); - void set_resource_give(Ref value); + void set_resource_give(const Ref &value); - bool get_global_cooldown_enabled(); - void set_global_cooldown_enabled(bool value); + bool get_global_cooldown_enabled() const; + void set_global_cooldown_enabled(const bool value); - bool get_is_local_spell(); - void set_is_local_spell(bool value); + bool get_is_local_spell() const; + void set_is_local_spell(const bool value); Ref get_icon(); - void set_icon(Ref value); + void set_icon(const Ref &value); - String get_text_description(); - void set_text_description(String value); + String get_text_description() const; + void set_text_description(const String value); Ref get_visual_spell_effects(); - void set_visual_spell_effects(Ref value); + void set_visual_spell_effects(const Ref &value); Ref get_projectile(); - void set_projectile(Ref value); + void set_projectile(const Ref &value); Ref get_teaches_craft_recipe(); - void set_teaches_craft_recipe(Ref value); + void set_teaches_craft_recipe(const Ref &value); //Caster Aura Apply - int get_num_caster_aura_applys(); - void set_num_caster_aura_applys(int value); + int get_num_caster_aura_applys() const; + void set_num_caster_aura_applys(const int value); - Ref get_caster_aura_apply(int index) const; - void set_caster_aura_apply(int index, Ref caster_aura_apply); + Ref get_caster_aura_apply(const int index); + void set_caster_aura_apply(const int index, const Ref &caster_aura_apply); Vector get_caster_aura_applys(); void set_caster_aura_applys(const Vector &caster_aura_applys); //Target Aura Apply - int get_num_target_aura_applys(); - void set_num_target_aura_applys(int value); + int get_num_target_aura_applys() const; + void set_num_target_aura_applys(const int value); - Ref get_target_aura_apply(int index) const; - void set_target_aura_apply(int index, Ref target_aura_apply); + Ref get_target_aura_apply(const int index); + void set_target_aura_apply(const int index, const Ref &target_aura_apply); Vector get_target_aura_applys(); void set_target_aura_applys(const Vector &target_aura_applys); //Apply Auras On Learn - int get_num_on_learn_auras(); - void set_num_on_learn_auras(int value); + int get_num_on_learn_auras() const; + void set_num_on_learn_auras(const int value); - Ref get_on_learn_aura(int index) const; - void set_on_learn_aura(int index, Ref on_learn_aura); + Ref get_on_learn_aura(const int index); + void set_on_learn_aura(const int index, const Ref &on_learn_aura); Vector get_on_learn_auras(); void set_on_learn_auras(const Vector &on_learn_auras); //Range - bool get_range_enabled(); - void set_range_enabled(bool value); + bool get_range_enabled() const; + void set_range_enabled(const bool value); - float get_range(); - void set_range(float value); + float get_range() const; + void set_range(const float value); - bool get_cast_time_enabled(); - void set_cast_time_enabled(bool value); + bool get_cast_time_enabled() const; + void set_cast_time_enabled(const bool value); - float get_cast_time(); - void set_cast_time(float value); + float get_cast_time() const; + void set_cast_time(const float value); - bool get_damage_enabled(); - void set_damage_enabled(bool value); + bool get_damage_enabled() const; + void set_damage_enabled(const bool value); - int get_damage_type(); - void set_damage_type(int value); + int get_damage_type() const; + void set_damage_type(const int value); - int get_damage_min(); - void set_damage_min(int value); + int get_damage_min() const; + void set_damage_min(const int value); - int get_damage_max(); - void set_damage_max(int value); + int get_damage_max() const; + void set_damage_max(const int value); - Stat::StatId get_damage_scale_stat(); - void set_damage_scale_stat(Stat::StatId value); + Stat::StatId get_damage_scale_stat() const; + void set_damage_scale_stat(const Stat::StatId value); - float get_damage_scale_coeff(); - void set_damage_scale_coeff(float value); + float get_damage_scale_coeff() const; + void set_damage_scale_coeff(const float value); - bool get_heal_enabled(); - void set_heal_enabled(bool value); + bool get_heal_enabled() const; + void set_heal_enabled(const bool value); - int get_heal_min(); - void set_heal_min(int value); + int get_heal_min() const; + void set_heal_min(const int value); - int get_heal_max(); - void set_heal_max(int value); + int get_heal_max() const; + void set_heal_max(const int value); - Stat::StatId get_heal_scale_stat(); - void set_heal_scale_stat(Stat::StatId value); + Stat::StatId get_heal_scale_stat() const; + void set_heal_scale_stat(const Stat::StatId value); - float get_heal_scale_coeff(); - void set_heal_scale_coeff(float value); + float get_heal_scale_coeff() const; + void set_heal_scale_coeff(const float value); //Dispells - bool get_dispell_enabled(); - void set_dispell_enabled(bool value); + bool get_dispell_enabled() const; + void set_dispell_enabled(const bool value); - int get_dispell_count_min(); - void set_dispell_count_min(int value); + int get_dispell_count_min() const; + void set_dispell_count_min(const int value); - int get_dispell_count_max(); - void set_dispell_count_max(int value); + int get_dispell_count_max() const; + void set_dispell_count_max(const int value); - int get_dispell_aura_types(); - void set_dispell_aura_types(int value); + int get_dispell_aura_types() const; + void set_dispell_aura_types(const int value); //Target - bool get_needs_target(); - void set_needs_target(bool value); + bool get_needs_target() const; + void set_needs_target(const bool value); - bool get_can_move_while_casting(); - void set_can_move_while_casting(bool value); + bool get_can_move_while_casting() const; + void set_can_move_while_casting(const bool value); - bool get_interrupt_enabled(); - void set_interrupt_enabled(bool value); + bool get_interrupt_enabled() const; + void set_interrupt_enabled(const bool value); - float get_interrupt_time(); - void set_interrupt_time(float value); + float get_interrupt_time() const; + void set_interrupt_time(const float value); //AOE - bool get_is_aoe(); - void set_is_aoe(bool value); + bool get_is_aoe() const; + void set_is_aoe(const bool value); - SpellAOETargetType get_aoe_target_type(); - void set_aoe_target_type(SpellAOETargetType value); + SpellAOETargetType get_aoe_target_type() const; + void set_aoe_target_type(const SpellAOETargetType value); - SpellEnums::ColliderType get_aoe_collider_type(); - void set_aoe_collider_type(SpellEnums::ColliderType value); + SpellEnums::ColliderType get_aoe_collider_type() const; + void set_aoe_collider_type(const SpellEnums::ColliderType value); - float get_aoe_radius(); - void set_aoe_radius(float value); + float get_aoe_radius() const; + void set_aoe_radius(const float value); - Vector3 get_aoe_box_extents(); - void set_aoe_box_extents(Vector3 value); + Vector3 get_aoe_box_extents() const; + void set_aoe_box_extents(const Vector3 value); - int get_spell_cooldown_mainpulation_data_count(); - void set_spell_cooldown_mainpulation_data_count(int value); + int get_spell_cooldown_mainpulation_data_count() const; + void set_spell_cooldown_mainpulation_data_count(const int value); - int get_training_cost(); + int get_training_cost() const; void set_training_cost(int value); Ref get_training_required_spell(); - void set_training_required_spell(Ref spell); + void set_training_required_spell(const Ref &spell); Ref get_training_required_skill(); - void set_training_required_skill(Ref skill); + void set_training_required_skill(const Ref &skill); - int get_training_required_skill_level(); - void set_training_required_skill_level(int value); + int get_training_required_skill_level() const; + void set_training_required_skill_level(const int value); //// Spell Script //// diff --git a/entities/data/entity_data.cpp b/entities/data/entity_data.cpp index ac67da8..1384018 100644 --- a/entities/data/entity_data.cpp +++ b/entities/data/entity_data.cpp @@ -8,35 +8,35 @@ #include "character_spec.h" #include "vendor_item_data.h" -int EntityData::get_id() { +int EntityData::get_id() const { return _id; } void EntityData::set_id(int value) { _id = value; } -String EntityData::get_text_description() { +String EntityData::get_text_description() const { return _text_description; } void EntityData::set_text_description(String value) { _text_description = value; } -Ref EntityData::get_inherits() { +Ref EntityData::get_inherits() const { return _inherits; } -void EntityData::set_inherits(Ref value) { +void EntityData::set_inherits(const Ref &value) { _inherits = value; } -EntityEnums::EntityType EntityData::get_entity_type() { +EntityEnums::EntityType EntityData::get_entity_type() const { return _entity_type; } -void EntityData::set_entity_type(EntityEnums::EntityType value) { +void EntityData::set_entity_type(const EntityEnums::EntityType value) { _entity_type = value; } -EntityEnums::EntityInteractionType EntityData::get_entity_interaction_type() { +EntityEnums::EntityInteractionType EntityData::get_entity_interaction_type() const { return _interaction_type; } @@ -44,66 +44,66 @@ void EntityData::set_entity_interaction_type(EntityEnums::EntityInteractionType _interaction_type = value; } -int EntityData::get_immunity_flags() { +int EntityData::get_immunity_flags() const { return _immunity_flags; } void EntityData::set_immunity_flags(int value) { _immunity_flags = value; } -int EntityData::get_entity_flags() { +int EntityData::get_entity_flags() const { return _entity_flags; } void EntityData::set_entity_flags(int value) { _entity_flags = value; } -EntityEnums::EntityController EntityData::get_entity_controller() { +EntityEnums::EntityController EntityData::get_entity_controller() const { return _entity_controller; } void EntityData::set_entity_controller(EntityEnums::EntityController value) { _entity_controller = value; } -int EntityData::get_money() { +int EntityData::get_money() const { return _money; } void EntityData::set_money(int value) { _money = value; } -int EntityData::get_bag_size() { +int EntityData::get_bag_size() const { return _bag_size; } void EntityData::set_bag_size(int value) { _bag_size = value; } -Ref EntityData::get_entity_species_data() { +Ref EntityData::get_entity_species_data() const { return _entity_species_data; } -void EntityData::set_entity_species_data(Ref value) { +void EntityData::set_entity_species_data(const Ref &value) { _entity_species_data = value; } -Ref EntityData::get_entity_class_data() { +Ref EntityData::get_entity_class_data() const { return _entity_class_data; } -void EntityData::set_entity_class_data(Ref data) { +void EntityData::set_entity_class_data(const Ref &data) { _entity_class_data = data; } -Ref EntityData::get_equipment_data() { +Ref EntityData::get_equipment_data() const { return _equipment_data; } -void EntityData::set_equipment_data(Ref data) { +void EntityData::set_equipment_data(const Ref &data) { _equipment_data = data; } Ref EntityData::get_ai() const { return _ai; } -void EntityData::set_ai(const Ref ai) { +void EntityData::set_ai(const Ref &ai) { _ai = ai; } Ref EntityData::get_ai_instance() { @@ -162,7 +162,7 @@ void EntityData::set_item_container_data(const Ref data) { } //Craft Recipes -int EntityData::get_num_craft_recipes() { +int EntityData::get_num_craft_recipes() const { return _craft_recipes.size(); } @@ -177,7 +177,7 @@ void EntityData::set_craft_recipe(int index, Ref craft_data) { _craft_recipes.set(index, craft_data); } -Vector EntityData::get_craft_recipes() { +Vector EntityData::get_craft_recipes() const { Vector r; for (int i = 0; i < _craft_recipes.size(); i++) { r.push_back(_craft_recipes[i].get_ref_ptr()); diff --git a/entities/data/entity_data.h b/entities/data/entity_data.h index e2e299b..b752d00 100644 --- a/entities/data/entity_data.h +++ b/entities/data/entity_data.h @@ -42,47 +42,47 @@ class EntityData : public Resource { GDCLASS(EntityData, Resource); public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); - String get_text_description(); - void set_text_description(String value); + String get_text_description() const; + void set_text_description(const String value); - Ref get_inherits(); - void set_inherits(Ref value); + Ref get_inherits() const; + void set_inherits(const Ref &value); - EntityEnums::EntityType get_entity_type(); - void set_entity_type(EntityEnums::EntityType value); + EntityEnums::EntityType get_entity_type() const; + void set_entity_type(const EntityEnums::EntityType value); - EntityEnums::EntityInteractionType get_entity_interaction_type(); - void set_entity_interaction_type(EntityEnums::EntityInteractionType value); + EntityEnums::EntityInteractionType get_entity_interaction_type() const; + void set_entity_interaction_type(const EntityEnums::EntityInteractionType value); - int get_immunity_flags(); - void set_immunity_flags(int value); + int get_immunity_flags() const; + void set_immunity_flags(const int value); - int get_entity_flags(); - void set_entity_flags(int value); + int get_entity_flags() const; + void set_entity_flags(const int value); - EntityEnums::EntityController get_entity_controller(); - void set_entity_controller(EntityEnums::EntityController value); + EntityEnums::EntityController get_entity_controller() const; + void set_entity_controller(const EntityEnums::EntityController value); - int get_money(); + int get_money() const; void set_money(int value); - int get_bag_size(); + int get_bag_size() const; void set_bag_size(int value); - Ref get_entity_species_data(); - void set_entity_species_data(Ref value); + Ref get_entity_species_data() const; + void set_entity_species_data(const Ref &value); - Ref get_entity_class_data(); - void set_entity_class_data(Ref data); + Ref get_entity_class_data() const; + void set_entity_class_data(const Ref &data); - Ref get_equipment_data(); - void set_equipment_data(Ref data); + Ref get_equipment_data() const; + void set_equipment_data(const Ref &data); Ref get_ai() const; - void set_ai(const Ref ai); + void set_ai(const Ref &ai); Ref get_ai_instance(); Ref _get_ai_instance(); @@ -99,12 +99,12 @@ public: void set_item_container_data(const Ref data); //Craft Recipes - int get_num_craft_recipes(); + int get_num_craft_recipes() const; Ref get_craft_recipe(int index); void set_craft_recipe(int index, Ref recipe); - Vector get_craft_recipes(); + Vector get_craft_recipes() const; void set_craft_recipes(const Vector &recipe); String generate_name(); diff --git a/entities/resources/entity_resource_data.cpp b/entities/resources/entity_resource_data.cpp index 530b63c..9d850b0 100644 --- a/entities/resources/entity_resource_data.cpp +++ b/entities/resources/entity_resource_data.cpp @@ -2,17 +2,17 @@ #include "entity_resource.h" -int EntityResourceData::get_id() { +int EntityResourceData::get_id() const { return _id; } -void EntityResourceData::set_id(int value) { +void EntityResourceData::set_id(const int value) { _id = value; } -String EntityResourceData::get_text_description() { +String EntityResourceData::get_text_description() const { return _text_description; } -void EntityResourceData::set_text_description(String value) { +void EntityResourceData::set_text_description(const String value) { _text_description = value; } diff --git a/entities/resources/entity_resource_data.h b/entities/resources/entity_resource_data.h index 85fea90..1a1cf20 100644 --- a/entities/resources/entity_resource_data.h +++ b/entities/resources/entity_resource_data.h @@ -11,11 +11,11 @@ class EntityResourceData : public Resource { GDCLASS(EntityResourceData, Resource); public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); - String get_text_description(); - void set_text_description(String value); + String get_text_description() const; + void set_text_description(const String value); Ref get_entity_resource_instance(); diff --git a/entities/skills/entity_skill_data.cpp b/entities/skills/entity_skill_data.cpp index 276fff6..79c4a89 100644 --- a/entities/skills/entity_skill_data.cpp +++ b/entities/skills/entity_skill_data.cpp @@ -1,30 +1,30 @@ #include "entity_skill_data.h" -int EntitySkillData::get_id() { +int EntitySkillData::get_id() const { return _id; } -void EntitySkillData::set_id(int value) { +void EntitySkillData::set_id(const int value) { _id = value; } -int EntitySkillData::get_default_value() { +int EntitySkillData::get_default_value() const { return _default_value; } -void EntitySkillData::set_default_value(int value) { +void EntitySkillData::set_default_value(const int value) { _default_value = value; } -int EntitySkillData::get_max_value() { +int EntitySkillData::get_max_value() const { return _max_value; } -void EntitySkillData::set_max_value(int value) { +void EntitySkillData::set_max_value(const int value) { _max_value = value; } -String EntitySkillData::get_text_description() { +String EntitySkillData::get_text_description() const { return _text_description; } -void EntitySkillData::set_text_description(String value) { +void EntitySkillData::set_text_description(const String value) { _text_description = value; } diff --git a/entities/skills/entity_skill_data.h b/entities/skills/entity_skill_data.h index ac67660..96aaeed 100644 --- a/entities/skills/entity_skill_data.h +++ b/entities/skills/entity_skill_data.h @@ -8,17 +8,17 @@ class EntitySkillData : public Resource { GDCLASS(EntitySkillData, Resource); public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); - int get_default_value(); - void set_default_value(int value); + int get_default_value() const; + void set_default_value(const int value); - int get_max_value(); - void set_max_value(int value); + int get_max_value() const; + void set_max_value(const int value); - String get_text_description(); - void set_text_description(String value); + String get_text_description() const; + void set_text_description(const String value); EntitySkillData(); ~EntitySkillData(); diff --git a/world_spells/world_spell_data.cpp b/world_spells/world_spell_data.cpp index 46ea600..c568097 100644 --- a/world_spells/world_spell_data.cpp +++ b/world_spells/world_spell_data.cpp @@ -1,86 +1,86 @@ #include "world_spell_data.h" -int WorldSpellData::get_id() { +int WorldSpellData::get_id() const { return _id; } -void WorldSpellData::set_id(int value) { +void WorldSpellData::set_id(const int value) { _id = value; } -SpellEnums::ColliderType WorldSpellData::get_collider_type() { +SpellEnums::ColliderType WorldSpellData::get_collider_type() const { return _collider_type; } -void WorldSpellData::set_collider_type(SpellEnums::ColliderType value) { +void WorldSpellData::set_collider_type(const SpellEnums::ColliderType value) { _collider_type = value; } -Vector3 WorldSpellData::get_collider_box_extents() { +Vector3 WorldSpellData::get_collider_box_extents() const { return _collider_box_extents; } -void WorldSpellData::set_collider_box_extents(Vector3 value) { +void WorldSpellData::set_collider_box_extents(const Vector3 &value) { _collider_box_extents = value; } -float WorldSpellData::get_collider_sphere_radius() { +float WorldSpellData::get_collider_sphere_radius() const { return _collider_sphere_radius; } -void WorldSpellData::set_collider_sphere_radius(float value) { +void WorldSpellData::set_collider_sphere_radius(const float value) { _collider_sphere_radius = value; } -SpellEnums::TargetType WorldSpellData::get_target_type() { +SpellEnums::TargetType WorldSpellData::get_target_type() const { return _target_type; } -void WorldSpellData::set_target_type(SpellEnums::TargetType value) { +void WorldSpellData::set_target_type(const SpellEnums::TargetType value) { _target_type = value; } -int WorldSpellData::get_target_bone_id() { +int WorldSpellData::get_target_bone_id() const { return _target_bone_id; } -void WorldSpellData::set_target_bone_id(int value) { +void WorldSpellData::set_target_bone_id(const int value) { _target_bone_id = value; } -bool WorldSpellData::get_move() { +bool WorldSpellData::get_move() const { return _move; } -void WorldSpellData::set_move(bool value) { +void WorldSpellData::set_move(const bool value) { _move = value; } -float WorldSpellData::get_movement_speed() { +float WorldSpellData::get_movement_speed() const { return _movement_speed; } -void WorldSpellData::set_movement_speed(float value) { +void WorldSpellData::set_movement_speed(const float value) { _movement_speed = value; } -Vector3 WorldSpellData::get_movement_dir() { +Vector3 WorldSpellData::get_movement_dir() const { return _movement_dir; } -void WorldSpellData::set_movement_dir(Vector3 value) { +void WorldSpellData::set_movement_dir(const Vector3 &value) { _movement_dir = value; } -float WorldSpellData::get_max_dist() { +float WorldSpellData::get_max_dist() const { return _max_dist; } -void WorldSpellData::set_max_dist(float value) { +void WorldSpellData::set_max_dist(const float value) { _max_dist = value; } Ref WorldSpellData::get_effect() { return _effect; } -void WorldSpellData::set_effect(Ref value) { +void WorldSpellData::set_effect(const Ref &value) { _effect = value; } -Vector3 WorldSpellData::get_effect_offset() { +Vector3 WorldSpellData::get_effect_offset() const { return _effect_offset; } -void WorldSpellData::set_effect_offset(Vector3 value) { +void WorldSpellData::set_effect_offset(const Vector3 &value) { _effect_offset = value; } diff --git a/world_spells/world_spell_data.h b/world_spells/world_spell_data.h index 5bef1c0..0a99fdd 100644 --- a/world_spells/world_spell_data.h +++ b/world_spells/world_spell_data.h @@ -12,41 +12,41 @@ class WorldSpellData : public Resource { GDCLASS(WorldSpellData, Resource); public: - int get_id(); - void set_id(int value); + int get_id() const; + void set_id(const int value); - SpellEnums::ColliderType get_collider_type(); - void set_collider_type(SpellEnums::ColliderType value); + SpellEnums::ColliderType get_collider_type() const; + void set_collider_type(const SpellEnums::ColliderType value); - Vector3 get_collider_box_extents(); - void set_collider_box_extents(Vector3 value); + Vector3 get_collider_box_extents() const; + void set_collider_box_extents(const Vector3 &value); - float get_collider_sphere_radius(); - void set_collider_sphere_radius(float value); + float get_collider_sphere_radius() const; + void set_collider_sphere_radius(const float value); - SpellEnums::TargetType get_target_type(); - void set_target_type(SpellEnums::TargetType value); + SpellEnums::TargetType get_target_type() const; + void set_target_type(const SpellEnums::TargetType value); - int get_target_bone_id(); - void set_target_bone_id(int value); + int get_target_bone_id() const; + void set_target_bone_id(const int value); - bool get_move(); - void set_move(bool value); + bool get_move() const; + void set_move(const bool value); - float get_movement_speed(); - void set_movement_speed(float value); + float get_movement_speed() const; + void set_movement_speed(const float value); - Vector3 get_movement_dir(); - void set_movement_dir(Vector3 value); + Vector3 get_movement_dir() const; + void set_movement_dir(const Vector3 &value); - float get_max_dist(); - void set_max_dist(float value); + float get_max_dist() const; + void set_max_dist(const float value); Ref get_effect(); - void set_effect(Ref value); + void set_effect(const Ref &value); - Vector3 get_effect_offset(); - void set_effect_offset(Vector3 value); + Vector3 get_effect_offset() const; + void set_effect_offset(const Vector3 &value); WorldSpellData(); ~WorldSpellData();