mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
Added teaches_craft_recipe to spell.
This commit is contained in:
parent
1c48fc9634
commit
f3f019b5cb
@ -1,6 +1,7 @@
|
||||
#include "spell.h"
|
||||
|
||||
#include "aura.h"
|
||||
#include "craft_recipe.h"
|
||||
|
||||
int Spell::get_spell_id() {
|
||||
return _spell_id;
|
||||
@ -177,6 +178,13 @@ void Spell::set_world_effect_data(Ref<WorldEffectData> value) {
|
||||
_world_effect_data = value;
|
||||
}
|
||||
|
||||
Ref<CraftRecipe> Spell::get_teaches_craft_recipe() {
|
||||
return _teaches_craft_recipe;
|
||||
}
|
||||
void Spell::set_teaches_craft_recipe(Ref<CraftRecipe> value) {
|
||||
_teaches_craft_recipe = value;
|
||||
}
|
||||
|
||||
float Spell::get_damage_scale_for_level(int level) {
|
||||
//return getDamageLevelScaling()->Evaluate((float)(level));
|
||||
return 1;
|
||||
@ -923,6 +931,10 @@ void Spell::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_world_effect_data", "value"), &Spell::set_world_effect_data);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_effect_data", PROPERTY_HINT_RESOURCE_TYPE, "WorldEffectData"), "set_world_effect_data", "get_world_effect_data");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_teaches_craft_recipe"), &Spell::get_teaches_craft_recipe);
|
||||
ClassDB::bind_method(D_METHOD("set_teaches_craft_recipe", "value"), &Spell::set_teaches_craft_recipe);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "teaches_craft_recipe", PROPERTY_HINT_RESOURCE_TYPE, "CraftRecipe"), "set_teaches_craft_recipe", "get_teaches_craft_recipe");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_damage_scale_for_level"), &Spell::get_damage_scale_for_level);
|
||||
ClassDB::bind_method(D_METHOD("get_heal_scale_for_level"), &Spell::get_heal_scale_for_level);
|
||||
ClassDB::bind_method(D_METHOD("get_absorb_scale_for_level"), &Spell::get_absorb_scale_for_level);
|
||||
|
@ -23,6 +23,7 @@ class Entity;
|
||||
class Aura;
|
||||
class SpellCastInfo;
|
||||
class Spell;
|
||||
class CraftRecipe;
|
||||
|
||||
enum TargetRelationType {
|
||||
TARGET_SELF = 1 << 0,
|
||||
@ -157,6 +158,9 @@ public:
|
||||
Ref<WorldEffectData> get_world_effect_data();
|
||||
void set_world_effect_data(Ref<WorldEffectData> value);
|
||||
|
||||
Ref<CraftRecipe> get_teaches_craft_recipe();
|
||||
void set_teaches_craft_recipe(Ref<CraftRecipe> 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);
|
||||
@ -373,6 +377,7 @@ private:
|
||||
Ref<SpellEffectVisual> _visual_spell_effects;
|
||||
Ref<SpellProjectileData> _spell_projectile_data;
|
||||
Ref<WorldEffectData> _world_effect_data;
|
||||
Ref<CraftRecipe> _teaches_craft_recipe;
|
||||
|
||||
bool _has_range;
|
||||
float _range;
|
||||
|
Loading…
Reference in New Issue
Block a user