mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Move the enums from the top of spell.h into the Spell class.
This commit is contained in:
parent
9c28249819
commit
44070461e7
@ -74,14 +74,14 @@ void Spell::set_cooldown(const float value) {
|
||||
_cooldown = value;
|
||||
}
|
||||
|
||||
SpellTargetType Spell::get_target_type() const {
|
||||
Spell::SpellTargetType Spell::get_target_type() const {
|
||||
return _target_type;
|
||||
}
|
||||
void Spell::set_target_type(const SpellTargetType value) {
|
||||
_target_type = value;
|
||||
}
|
||||
|
||||
TargetRelationType Spell::get_target_relation_type() const {
|
||||
Spell::TargetRelationType Spell::get_target_relation_type() const {
|
||||
return _target_relation_type;
|
||||
}
|
||||
void Spell::set_target_relation_type(const TargetRelationType value) {
|
||||
@ -472,7 +472,7 @@ void Spell::set_is_aoe(const bool value) {
|
||||
_is_aoe = value;
|
||||
}
|
||||
|
||||
SpellAOETargetType Spell::get_aoe_target_type() const {
|
||||
Spell::SpellAOETargetType Spell::get_aoe_target_type() const {
|
||||
return _aoe_targetType;
|
||||
}
|
||||
void Spell::set_aoe_target_type(const SpellAOETargetType value) {
|
||||
@ -2454,10 +2454,10 @@ void Spell::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("notification_ccast", "what", "info"), &Spell::notification_ccast);
|
||||
|
||||
//Aura EventHandlers
|
||||
BIND_VMETHOD(MethodInfo("_notification_saura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_sheal", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_aura_scast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_sdamage", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_saura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "aura_data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_sheal", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "aura_data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_aura_scast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "aura_data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_sdamage", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "aura_data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("notification_saura", "what", "data"), &Spell::notification_saura);
|
||||
ClassDB::bind_method(D_METHOD("notification_sheal", "what", "aura", "info"), &Spell::notification_sheal);
|
||||
|
@ -47,36 +47,31 @@ class AuraGroup;
|
||||
class AuraApplyInfo;
|
||||
class EntityResource;
|
||||
|
||||
enum TargetRelationType {
|
||||
TARGET_SELF = 1 << 0,
|
||||
TARGET_ENEMY = 1 << 1,
|
||||
TARGET_FRIENDLY = 1 << 2
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(TargetRelationType);
|
||||
|
||||
enum SpellTargetType {
|
||||
SPELL_TARGET_TYPE_SELF,
|
||||
SPELL_TARGET_TYPE_TARGET,
|
||||
SPELL_TARGET_TYPE_AROUND,
|
||||
SPELL_TARGET_TYPE_FRONT,
|
||||
SPELL_TARGET_TYPE_AROUND_TARGET
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(SpellTargetType);
|
||||
|
||||
enum SpellAOETargetType {
|
||||
SPELL_AOE_TARGET_TYPE_CASTER,
|
||||
SPELL_AOE_TARGET_TYPE_TARGET,
|
||||
SPELL_AOE_TARGET_TYPE_GOUND_TARGET_SELECTION,
|
||||
SPELL_AOE_TARGET_TYPE_RANDOM
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(SpellAOETargetType);
|
||||
|
||||
class Spell : public Resource {
|
||||
GDCLASS(Spell, Resource);
|
||||
|
||||
public:
|
||||
enum TargetRelationType {
|
||||
TARGET_SELF = 1 << 0,
|
||||
TARGET_ENEMY = 1 << 1,
|
||||
TARGET_FRIENDLY = 1 << 2
|
||||
};
|
||||
|
||||
enum SpellTargetType {
|
||||
SPELL_TARGET_TYPE_SELF,
|
||||
SPELL_TARGET_TYPE_TARGET,
|
||||
SPELL_TARGET_TYPE_AROUND,
|
||||
SPELL_TARGET_TYPE_FRONT,
|
||||
SPELL_TARGET_TYPE_AROUND_TARGET
|
||||
};
|
||||
|
||||
enum SpellAOETargetType {
|
||||
SPELL_AOE_TARGET_TYPE_CASTER,
|
||||
SPELL_AOE_TARGET_TYPE_TARGET,
|
||||
SPELL_AOE_TARGET_TYPE_GOUND_TARGET_SELECTION,
|
||||
SPELL_AOE_TARGET_TYPE_RANDOM
|
||||
};
|
||||
|
||||
public:
|
||||
int get_id() const;
|
||||
void set_id(const int value);
|
||||
@ -825,4 +820,8 @@ private:
|
||||
Ref<Spell> _aura_talent_required_spell;
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST(Spell::TargetRelationType);
|
||||
VARIANT_ENUM_CAST(Spell::SpellTargetType);
|
||||
VARIANT_ENUM_CAST(Spell::SpellAOETargetType);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user