mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-05-09 22:41:39 +02:00
Same api cleanup to the clientside versions of the methods.
This commit is contained in:
parent
d110b3368f
commit
06283f3768
@ -691,25 +691,33 @@ void Aura::son_entity_resource_removed(Ref<AuraData> data, Ref<EntityResource> r
|
||||
if (has_method("_son_entity_resource_removed"))
|
||||
call("_son_entity_resource_removed", data, resource);
|
||||
}
|
||||
void Aura::con_cast_failed(Ref<AuraData> data, Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_cast_failed"))
|
||||
call("_con_cast_failed", data, info);
|
||||
|
||||
void Aura::notification_caura(int what, Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_notification_caura"))
|
||||
call("_notification_caura", what, data);
|
||||
}
|
||||
void Aura::con_cast_started(Ref<AuraData> data, Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_cast_started"))
|
||||
call("_con_cast_started", data, info);
|
||||
void Aura::notification_cheal(int what, Ref<AuraData> aura, Ref<SpellHealInfo> data) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_notification_cheal"))
|
||||
call("_notification_cheal", what, aura, data);
|
||||
}
|
||||
void Aura::con_cast_state_changed(Ref<AuraData> data, Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_cast_state_changed"))
|
||||
call("_con_cast_state_changed", data, info);
|
||||
void Aura::notification_ccast(int what, Ref<AuraData> aura, Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_notification_ccast"))
|
||||
call("_notification_ccast", what, aura, info);
|
||||
}
|
||||
void Aura::con_cast_finished(Ref<AuraData> data, Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_cast_finished"))
|
||||
call("_con_cast_finished", data, info);
|
||||
}
|
||||
void Aura::con_spell_cast_success(Ref<AuraData> data, Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_spell_cast_success"))
|
||||
call("_con_spell_cast_success", data, info);
|
||||
void Aura::notification_cdamage(int what, Ref<AuraData> aura, Ref<SpellDamageInfo> data) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_notification_cdamage"))
|
||||
call("_notification_cdamage", what, aura, data);
|
||||
}
|
||||
|
||||
void Aura::con_death(Ref<AuraData> data) {
|
||||
@ -734,59 +742,6 @@ void Aura::con_category_cooldown_removed(Ref<AuraData> data, Ref<CategoryCooldow
|
||||
call("_con_category_cooldown_removed", data, category_cooldown);
|
||||
}
|
||||
|
||||
void Aura::con_aura_added(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_aura_added"))
|
||||
call("_con_aura_added", data);
|
||||
}
|
||||
|
||||
void Aura::con_aura_removed(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_aura_removed"))
|
||||
call("_con_aura_removed", data);
|
||||
}
|
||||
|
||||
void Aura::con_aura_refresh(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_aura_refresh"))
|
||||
call("_con_aura_refresh", data);
|
||||
}
|
||||
|
||||
void Aura::con_damage_dealt(Ref<AuraData> data, Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_damage_dealt"))
|
||||
call("_con_damage_dealt", data, info);
|
||||
}
|
||||
|
||||
void Aura::con_dealt_damage(Ref<AuraData> data, Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_dealt_damage"))
|
||||
call("_con_dealt_damage", data, info);
|
||||
}
|
||||
|
||||
void Aura::con_heal_dealt(Ref<AuraData> data, Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_heal_dealt"))
|
||||
call("_con_heal_dealt", data, info);
|
||||
}
|
||||
|
||||
void Aura::con_dealt_heal(Ref<AuraData> data, Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_dealt_heal"))
|
||||
call("_con_dealt_heal", data, info);
|
||||
}
|
||||
|
||||
void Aura::con_gcd_started(Ref<AuraData> data, float gcd) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
@ -1326,11 +1281,15 @@ void Aura::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_son_entity_resource_removed", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::INT, "value")));
|
||||
|
||||
//Clientside Event Handlers
|
||||
ClassDB::bind_method(D_METHOD("con_cast_failed", "data", "info"), &Aura::con_cast_failed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_started", "data", "info"), &Aura::con_cast_started);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_state_changed", "data", "info"), &Aura::con_cast_state_changed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_finished", "data", "info"), &Aura::con_cast_finished);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_success", "data", "info"), &Aura::con_spell_cast_success);
|
||||
BIND_VMETHOD(MethodInfo("_notification_caura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cheal", 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_ccast", 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_cdamage", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("notification_caura", "what", "data"), &Aura::notification_caura);
|
||||
ClassDB::bind_method(D_METHOD("notification_cheal", "what", "aura", "info"), &Aura::notification_cheal);
|
||||
ClassDB::bind_method(D_METHOD("notification_ccast", "what", "aura", "info"), &Aura::notification_ccast);
|
||||
ClassDB::bind_method(D_METHOD("notification_cdamage", "what", "aura", "info"), &Aura::notification_cdamage);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_death", "data"), &Aura::con_death);
|
||||
|
||||
@ -1339,15 +1298,6 @@ void Aura::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_added", "data", "info"), &Aura::con_category_cooldown_added);
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_removed", "data", "info"), &Aura::con_category_cooldown_removed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_aura_added", "data"), &Aura::con_aura_added);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_removed", "data"), &Aura::con_aura_removed);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_refresh", "data"), &Aura::con_aura_refresh);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_damage_dealt", "data", "info"), &Aura::con_damage_dealt);
|
||||
ClassDB::bind_method(D_METHOD("con_dealt_damage", "data", "info"), &Aura::con_dealt_damage);
|
||||
ClassDB::bind_method(D_METHOD("con_heal_dealt", "data", "info"), &Aura::con_heal_dealt);
|
||||
ClassDB::bind_method(D_METHOD("con_dealt_heal", "data", "info"), &Aura::con_dealt_heal);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_started", "data", "info"), &Aura::con_gcd_started);
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_finished", "data"), &Aura::con_gcd_finished);
|
||||
|
||||
|
@ -282,11 +282,10 @@ public:
|
||||
void son_entity_resource_removed(Ref<AuraData> data, Ref<EntityResource> resource);
|
||||
|
||||
//Clientside Event Handlers
|
||||
void con_cast_failed(Ref<AuraData> data, Ref<SpellCastInfo> info);
|
||||
void con_cast_started(Ref<AuraData> data, Ref<SpellCastInfo> info);
|
||||
void con_cast_state_changed(Ref<AuraData> data, Ref<SpellCastInfo> info);
|
||||
void con_cast_finished(Ref<AuraData> data, Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_success(Ref<AuraData> data, Ref<SpellCastInfo> info);
|
||||
void notification_caura(int what, Ref<AuraData> data);
|
||||
void notification_cheal(int what, Ref<AuraData> aura, Ref<SpellHealInfo> data);
|
||||
void notification_ccast(int what, Ref<AuraData> aura, Ref<SpellCastInfo> info);
|
||||
void notification_cdamage(int what, Ref<AuraData> aura, Ref<SpellDamageInfo> data);
|
||||
|
||||
void con_death(Ref<AuraData> data);
|
||||
|
||||
@ -295,15 +294,6 @@ public:
|
||||
void con_category_cooldown_added(Ref<AuraData> data, Ref<CategoryCooldown> category_cooldown);
|
||||
void con_category_cooldown_removed(Ref<AuraData> data, Ref<CategoryCooldown> category_cooldown);
|
||||
|
||||
void con_aura_added(Ref<AuraData> data);
|
||||
void con_aura_removed(Ref<AuraData> data);
|
||||
void con_aura_refresh(Ref<AuraData> data);
|
||||
|
||||
void con_damage_dealt(Ref<AuraData> data, Ref<SpellDamageInfo> info);
|
||||
void con_dealt_damage(Ref<AuraData> data, Ref<SpellDamageInfo> info);
|
||||
void con_heal_dealt(Ref<AuraData> data, Ref<SpellHealInfo> info);
|
||||
void con_dealt_heal(Ref<AuraData> data, Ref<SpellHealInfo> info);
|
||||
|
||||
void con_gcd_started(Ref<AuraData> data, float gcd);
|
||||
void con_gcd_finished(Ref<AuraData> data);
|
||||
|
||||
|
@ -693,43 +693,19 @@ void Spell::son_physics_process(Ref<SpellCastInfo> info, float delta) {
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::con_spell_cast_started(Ref<SpellCastInfo> info) {
|
||||
void Spell::notification_scast(int what, Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_spell_cast_started")) {
|
||||
call("_con_spell_cast_started", info);
|
||||
if (has_method("_notification_scast")) {
|
||||
call("_notification_scast", what, info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::con_spell_cast_success(Ref<SpellCastInfo> info) {
|
||||
void Spell::notification_ccast(int what, Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_spell_cast_success")) {
|
||||
call("_con_spell_cast_success", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::con_spell_cast_failed(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_spell_cast_failed")) {
|
||||
call("_con_spell_cast_failed", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::con_spell_cast_ended(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_spell_cast_ended")) {
|
||||
call("_con_spell_cast_ended", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::con_spell_cast_interrupted(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_spell_cast_interrupted")) {
|
||||
call("_con_spell_cast_interrupted", info);
|
||||
if (has_method("_notification_ccast")) {
|
||||
call("_notification_ccast", what, info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1162,17 +1138,11 @@ void Spell::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_son_physics_process", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo"), PropertyInfo(Variant::REAL, "delta")));
|
||||
|
||||
//Clientside Event Handlers
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_started", "info"), &Spell::con_spell_cast_started);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_success", "info"), &Spell::con_spell_cast_success);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_failed", "info"), &Spell::con_spell_cast_failed);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_ended", "info"), &Spell::con_spell_cast_ended);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_interrupted", "info"), &Spell::con_spell_cast_interrupted);
|
||||
BIND_VMETHOD(MethodInfo("_notification_scast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ClassDB::bind_method(D_METHOD("notification_scast", "what", "info"), &Spell::notification_scast);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_started", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_success", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_failed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_ended", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_interrupted", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_ccast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ClassDB::bind_method(D_METHOD("notification_ccast", "what", "info"), &Spell::notification_scast);
|
||||
|
||||
//Calculations / Queries
|
||||
ClassDB::bind_method(D_METHOD("calculate_initial_damage", "data"), &Spell::calculate_initial_damage);
|
||||
|
@ -314,11 +314,8 @@ public:
|
||||
void son_physics_process(Ref<SpellCastInfo> info, float delta);
|
||||
|
||||
//Clientside Event Handlers
|
||||
void con_spell_cast_started(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_success(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_failed(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_ended(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_interrupted(Ref<SpellCastInfo> info);
|
||||
void notification_scast(int what, Ref<SpellCastInfo> info);
|
||||
void notification_ccast(int what, Ref<SpellCastInfo> info);
|
||||
|
||||
//Calculations / Queries
|
||||
void calculate_initial_damage(Ref<SpellDamageInfo> data);
|
||||
|
@ -587,35 +587,29 @@ void EntityClassData::son_entity_resource_removed(Ref<EntityResource> resource)
|
||||
}
|
||||
|
||||
//Clientside Event Handlers
|
||||
void EntityClassData::con_cast_failed(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
void EntityClassData::notification_caura(int what, Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_cast_failed"))
|
||||
call("_con_cast_failed", info);
|
||||
if (has_method("_notification_caura"))
|
||||
call("_notification_caura", what, data);
|
||||
}
|
||||
void EntityClassData::con_cast_started(Ref<SpellCastInfo> info) {
|
||||
void EntityClassData::notification_cheal(int what, Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_cast_started"))
|
||||
call("_con_cast_started", info);
|
||||
if (has_method("_notification_cheal"))
|
||||
call("_notification_cheal", what, info);
|
||||
}
|
||||
void EntityClassData::con_cast_state_changed(Ref<SpellCastInfo> info) {
|
||||
void EntityClassData::notification_ccast(int what, Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_cast_state_changed"))
|
||||
call("_con_cast_state_changed", info);
|
||||
if (has_method("_notification_ccast"))
|
||||
call("_notification_ccast", what, info);
|
||||
}
|
||||
void EntityClassData::con_cast_finished(Ref<SpellCastInfo> info) {
|
||||
void EntityClassData::notification_cdamage(int what, Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_cast_finished"))
|
||||
call("_con_cast_finished", info);
|
||||
}
|
||||
void EntityClassData::con_spell_cast_success(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_spell_cast_success"))
|
||||
call("_con_spell_cast_success", info);
|
||||
if (has_method("_notification_cdamage"))
|
||||
call("_notification_cdamage", what, info);
|
||||
}
|
||||
|
||||
void EntityClassData::con_death(Entity *entity) {
|
||||
@ -660,55 +654,6 @@ void EntityClassData::con_category_cooldown_removed(Ref<CategoryCooldown> catego
|
||||
call("_con_category_cooldown_removed", category_cooldown);
|
||||
}
|
||||
|
||||
void EntityClassData::con_aura_added(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_aura_added"))
|
||||
call("_con_aura_added", data);
|
||||
}
|
||||
|
||||
void EntityClassData::con_aura_removed(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_aura_removed"))
|
||||
call("_con_aura_removed", data);
|
||||
}
|
||||
|
||||
void EntityClassData::con_aura_refresh(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (has_method("_con_aura_refresh"))
|
||||
call("_con_aura_refresh", data);
|
||||
}
|
||||
|
||||
void EntityClassData::con_damage_dealt(Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_damage_dealt"))
|
||||
call("_con_damage_dealt", info);
|
||||
}
|
||||
|
||||
void EntityClassData::con_dealt_damage(Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_dealt_damage"))
|
||||
call("_con_dealt_damage", info);
|
||||
}
|
||||
|
||||
void EntityClassData::con_heal_dealt(Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_heal_dealt"))
|
||||
call("_con_heal_dealt", info);
|
||||
}
|
||||
|
||||
void EntityClassData::con_dealt_heal(Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (has_method("_con_dealt_heal"))
|
||||
call("_con_dealt_heal", info);
|
||||
}
|
||||
|
||||
void EntityClassData::con_gcd_started(Entity *entity, float gcd) {
|
||||
if (has_method("_con_gcd_started"))
|
||||
call("_con_gcd_started", entity, gcd);
|
||||
@ -920,6 +865,16 @@ void EntityClassData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("notification_scast", "what", "info"), &EntityClassData::notification_scast);
|
||||
ClassDB::bind_method(D_METHOD("notification_sdamage", "what", "info"), &EntityClassData::notification_sdamage);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_notification_caura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cheal", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_ccast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cdamage", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("notification_caura", "what", "data"), &EntityClassData::notification_caura);
|
||||
ClassDB::bind_method(D_METHOD("notification_cheal", "what", "info"), &EntityClassData::notification_cheal);
|
||||
ClassDB::bind_method(D_METHOD("notification_ccast", "what", "info"), &EntityClassData::notification_ccast);
|
||||
ClassDB::bind_method(D_METHOD("notification_cdamage", "what", "info"), &EntityClassData::notification_cdamage);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_death", "data"), &EntityClassData::son_death_bind);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_cooldown_added", "cooldown"), &EntityClassData::son_cooldown_added);
|
||||
@ -962,12 +917,6 @@ void EntityClassData::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_setup_resources", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
//Clientside Event Handlers
|
||||
ClassDB::bind_method(D_METHOD("con_cast_failed", "info"), &EntityClassData::con_cast_failed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_started", "info"), &EntityClassData::con_cast_started);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_state_changed", "info"), &EntityClassData::con_cast_state_changed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_finished", "info"), &EntityClassData::con_cast_finished);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_success", "info"), &EntityClassData::con_spell_cast_success);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_death", "data"), &EntityClassData::con_death_bind);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_cooldown_added", "cooldown"), &EntityClassData::con_cooldown_added);
|
||||
@ -975,10 +924,6 @@ void EntityClassData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_added", "cooldown"), &EntityClassData::con_category_cooldown_added);
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_removed", "cooldown"), &EntityClassData::con_category_cooldown_removed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_aura_added", "data"), &EntityClassData::con_aura_added);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_removed", "data"), &EntityClassData::con_aura_removed);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_refresh", "data"), &EntityClassData::con_aura_refresh);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_started", "entity", "gcd"), &EntityClassData::con_gcd_started_bind);
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_finished", "entity"), &EntityClassData::con_gcd_finished_bind);
|
||||
|
||||
@ -989,23 +934,8 @@ void EntityClassData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("con_entity_resource_added", "resource"), &EntityClassData::con_entity_resource_added);
|
||||
ClassDB::bind_method(D_METHOD("con_entity_resource_removed", "resource"), &EntityClassData::con_entity_resource_removed);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_failed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_started", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_state_changed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_finished", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_success", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_death", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_cooldown_added", PropertyInfo(Variant::OBJECT, "cooldown", PROPERTY_HINT_RESOURCE_TYPE, "Cooldown")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cooldown_removed", PropertyInfo(Variant::OBJECT, "cooldown", PROPERTY_HINT_RESOURCE_TYPE, "Cooldown")));
|
||||
BIND_VMETHOD(MethodInfo("_con_category_cooldown_added", PropertyInfo(Variant::OBJECT, "category_cooldown", PROPERTY_HINT_RESOURCE_TYPE, "CategoryCooldown")));
|
||||
BIND_VMETHOD(MethodInfo("_con_category_cooldown_removed", PropertyInfo(Variant::OBJECT, "category_cooldown", PROPERTY_HINT_RESOURCE_TYPE, "CategoryCooldown")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_added", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_removed", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_refresh", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_gcd_started", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::REAL, "gcd")));
|
||||
BIND_VMETHOD(MethodInfo("_con_gcd_finished", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
@ -1014,7 +944,6 @@ void EntityClassData::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_con_character_level_up", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::INT, "value")));
|
||||
|
||||
//Equipment
|
||||
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "ret"), "_should_deny_equip", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::INT, "equip_slot"), PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "ItemInstance")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_equip_success", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::INT, "equip_slot"), PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "ItemInstance"), PropertyInfo(Variant::OBJECT, "old_item", PROPERTY_HINT_RESOURCE_TYPE, "ItemInstance"), PropertyInfo(Variant::INT, "bag_slot")));
|
||||
|
@ -177,11 +177,10 @@ public:
|
||||
void son_entity_resource_removed(Ref<EntityResource> resource);
|
||||
|
||||
//Clientside Event Handlers
|
||||
void con_cast_failed(Ref<SpellCastInfo> info);
|
||||
void con_cast_started(Ref<SpellCastInfo> info);
|
||||
void con_cast_state_changed(Ref<SpellCastInfo> info);
|
||||
void con_cast_finished(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_success(Ref<SpellCastInfo> info);
|
||||
void notification_caura(int what, Ref<AuraData> data);
|
||||
void notification_cheal(int what, Ref<SpellHealInfo> info);
|
||||
void notification_ccast(int what, Ref<SpellCastInfo> info);
|
||||
void notification_cdamage(int what, Ref<SpellDamageInfo> info);
|
||||
|
||||
void con_death(Entity *entity);
|
||||
void con_death_bind(Node *entity);
|
||||
@ -191,15 +190,6 @@ public:
|
||||
void con_category_cooldown_added(Ref<CategoryCooldown> category_cooldown);
|
||||
void con_category_cooldown_removed(Ref<CategoryCooldown> category_cooldown);
|
||||
|
||||
void con_aura_added(Ref<AuraData> data);
|
||||
void con_aura_removed(Ref<AuraData> data);
|
||||
void con_aura_refresh(Ref<AuraData> data);
|
||||
|
||||
void con_damage_dealt(Ref<SpellDamageInfo> info);
|
||||
void con_dealt_damage(Ref<SpellDamageInfo> info);
|
||||
void con_heal_dealt(Ref<SpellHealInfo> info);
|
||||
void con_dealt_heal(Ref<SpellHealInfo> info);
|
||||
|
||||
void con_gcd_started(Entity *entity, float gcd);
|
||||
void con_gcd_finished(Entity *entity);
|
||||
void con_gcd_started_bind(Node *entity, float gcd);
|
||||
|
@ -548,50 +548,41 @@ void EntityData::son_entity_resource_removed(Ref<EntityResource> resource) {
|
||||
}
|
||||
|
||||
//Clientside Event Handlers
|
||||
void EntityData::con_cast_failed(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
void EntityData::notification_caura(int what, Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_cast_failed(info);
|
||||
_entity_class_data->notification_caura(what, data);
|
||||
|
||||
if (has_method("_con_cast_failed"))
|
||||
call("_con_cast_failed", info);
|
||||
if (has_method("_notification_caura"))
|
||||
call("_notification_caura", what, data);
|
||||
}
|
||||
void EntityData::con_cast_started(Ref<SpellCastInfo> info) {
|
||||
void EntityData::notification_cheal(int what, Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_cast_started(info);
|
||||
_entity_class_data->notification_cheal(what, info);
|
||||
|
||||
if (has_method("_con_cast_started"))
|
||||
call("_con_cast_started", info);
|
||||
if (has_method("_notification_cheal"))
|
||||
call("_notification_cheal", what, info);
|
||||
}
|
||||
void EntityData::con_cast_state_changed(Ref<SpellCastInfo> info) {
|
||||
void EntityData::notification_ccast(int what, Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_cast_state_changed(info);
|
||||
_entity_class_data->notification_ccast(what, info);
|
||||
|
||||
if (has_method("_con_cast_state_changed"))
|
||||
call("_con_cast_state_changed", info);
|
||||
if (has_method("_notification_ccast"))
|
||||
call("_notification_ccast", what, info);
|
||||
}
|
||||
void EntityData::con_cast_finished(Ref<SpellCastInfo> info) {
|
||||
void EntityData::notification_cdamage(int what, Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_cast_finished(info);
|
||||
_entity_class_data->notification_cdamage(what, info);
|
||||
|
||||
if (has_method("_con_cast_finished"))
|
||||
call("_con_cast_finished", info);
|
||||
}
|
||||
void EntityData::con_spell_cast_success(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_spell_cast_success(info);
|
||||
|
||||
if (has_method("_con_spell_cast_success"))
|
||||
call("_con_spell_cast_success", info);
|
||||
if (has_method("_notification_cdamage"))
|
||||
call("_notification_cdamage", what, info);
|
||||
}
|
||||
|
||||
void EntityData::con_death(Entity *entity) {
|
||||
@ -651,76 +642,6 @@ void EntityData::con_category_cooldown_removed(Ref<CategoryCooldown> category_co
|
||||
call("_con_category_cooldown_removed", category_cooldown);
|
||||
}
|
||||
|
||||
void EntityData::con_aura_added(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_aura_added(data);
|
||||
|
||||
if (has_method("_con_aura_added"))
|
||||
call("_con_aura_added", data);
|
||||
}
|
||||
|
||||
void EntityData::con_aura_removed(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_aura_removed(data);
|
||||
|
||||
if (has_method("_con_aura_removed"))
|
||||
call("_con_aura_removed", data);
|
||||
}
|
||||
|
||||
void EntityData::con_aura_refresh(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_aura_refresh(data);
|
||||
|
||||
if (has_method("_con_aura_refresh"))
|
||||
call("_con_aura_refresh", data);
|
||||
}
|
||||
|
||||
void EntityData::con_damage_dealt(Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_damage_dealt(info);
|
||||
|
||||
if (has_method("_con_damage_dealt"))
|
||||
call("_con_damage_dealt", info);
|
||||
}
|
||||
|
||||
void EntityData::con_dealt_damage(Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_dealt_damage(info);
|
||||
|
||||
if (has_method("_con_dealt_damage"))
|
||||
call("_con_dealt_damage", info);
|
||||
}
|
||||
|
||||
void EntityData::con_heal_dealt(Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_heal_dealt(info);
|
||||
|
||||
if (has_method("_con_heal_dealt"))
|
||||
call("_con_heal_dealt", info);
|
||||
}
|
||||
|
||||
void EntityData::con_dealt_heal(Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_dealt_heal(info);
|
||||
|
||||
if (has_method("_con_dealt_heal"))
|
||||
call("_con_dealt_heal", info);
|
||||
}
|
||||
|
||||
void EntityData::con_gcd_started(Entity *entity, float gcd) {
|
||||
if (_entity_class_data.is_valid())
|
||||
_entity_class_data->con_gcd_started(entity, gcd);
|
||||
@ -995,6 +916,16 @@ void EntityData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("notification_scast", "what", "info"), &EntityData::notification_scast);
|
||||
ClassDB::bind_method(D_METHOD("notification_sdamage", "what", "info"), &EntityData::notification_sdamage);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_notification_caura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cheal", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_ccast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cdamage", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("notification_caura", "what", "data"), &EntityData::notification_caura);
|
||||
ClassDB::bind_method(D_METHOD("notification_cheal", "what", "info"), &EntityData::notification_cheal);
|
||||
ClassDB::bind_method(D_METHOD("notification_ccast", "what", "info"), &EntityData::notification_ccast);
|
||||
ClassDB::bind_method(D_METHOD("notification_cdamage", "what", "info"), &EntityData::notification_cdamage);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_death", "data"), &EntityData::son_death_bind);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_cooldown_added", "cooldown"), &EntityData::son_cooldown_added);
|
||||
@ -1039,12 +970,6 @@ void EntityData::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_setup_resources", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
//Clientside Event Handlers
|
||||
ClassDB::bind_method(D_METHOD("con_cast_failed", "info"), &EntityData::con_cast_failed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_started", "info"), &EntityData::con_cast_started);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_state_changed", "info"), &EntityData::con_cast_state_changed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_finished", "info"), &EntityData::con_cast_finished);
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_success", "info"), &EntityData::con_spell_cast_success);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_death", "data"), &EntityData::con_death_bind);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_cooldown_added", "cooldown"), &EntityData::con_cooldown_added);
|
||||
@ -1052,10 +977,6 @@ void EntityData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_added", "cooldown"), &EntityData::con_category_cooldown_added);
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_removed", "cooldown"), &EntityData::con_category_cooldown_removed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_aura_added", "data"), &EntityData::con_aura_added);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_removed", "data"), &EntityData::con_aura_removed);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_refresh", "data"), &EntityData::con_aura_refresh);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_started", "entity", "gcd"), &EntityData::con_gcd_started_bind);
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_finished", "entity"), &EntityData::con_gcd_finished_bind);
|
||||
|
||||
@ -1066,12 +987,6 @@ void EntityData::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("con_entity_resource_added", "resource"), &EntityData::con_entity_resource_added);
|
||||
ClassDB::bind_method(D_METHOD("con_entity_resource_removed", "resource"), &EntityData::con_entity_resource_removed);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_failed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_started", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_state_changed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_finished", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_success", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_death", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_cooldown_added", PropertyInfo(Variant::OBJECT, "cooldown", PROPERTY_HINT_RESOURCE_TYPE, "Cooldown")));
|
||||
@ -1079,10 +994,6 @@ void EntityData::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_con_category_cooldown_added", PropertyInfo(Variant::OBJECT, "category_cooldown", PROPERTY_HINT_RESOURCE_TYPE, "CategoryCooldown")));
|
||||
BIND_VMETHOD(MethodInfo("_con_category_cooldown_removed", PropertyInfo(Variant::OBJECT, "category_cooldown", PROPERTY_HINT_RESOURCE_TYPE, "CategoryCooldown")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_added", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_removed", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_refresh", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_gcd_started", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::REAL, "gcd")));
|
||||
BIND_VMETHOD(MethodInfo("_con_gcd_finished", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
|
@ -181,28 +181,18 @@ public:
|
||||
void son_entity_resource_removed(Ref<EntityResource> resource);
|
||||
|
||||
//Clientside Event Handlers
|
||||
void con_cast_failed(Ref<SpellCastInfo> info);
|
||||
void con_cast_started(Ref<SpellCastInfo> info);
|
||||
void con_cast_state_changed(Ref<SpellCastInfo> info);
|
||||
void con_cast_finished(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_success(Ref<SpellCastInfo> info);
|
||||
|
||||
void con_death(Entity *entity);
|
||||
void con_death_bind(Node *entity);
|
||||
void notification_caura(int what, Ref<AuraData> data);
|
||||
void notification_cheal(int what, Ref<SpellHealInfo> info);
|
||||
void notification_ccast(int what, Ref<SpellCastInfo> info);
|
||||
void notification_cdamage(int what, Ref<SpellDamageInfo> info);
|
||||
|
||||
void con_cooldown_added(Ref<Cooldown> cooldown);
|
||||
void con_cooldown_removed(Ref<Cooldown> cooldown);
|
||||
void con_category_cooldown_added(Ref<CategoryCooldown> category_cooldown);
|
||||
void con_category_cooldown_removed(Ref<CategoryCooldown> category_cooldown);
|
||||
|
||||
void con_aura_added(Ref<AuraData> data);
|
||||
void con_aura_removed(Ref<AuraData> data);
|
||||
void con_aura_refresh(Ref<AuraData> data);
|
||||
|
||||
void con_damage_dealt(Ref<SpellDamageInfo> info);
|
||||
void con_dealt_damage(Ref<SpellDamageInfo> info);
|
||||
void con_heal_dealt(Ref<SpellHealInfo> info);
|
||||
void con_dealt_heal(Ref<SpellHealInfo> info);
|
||||
void con_death(Entity *entity);
|
||||
void con_death_bind(Node *entity);
|
||||
|
||||
void con_gcd_started(Entity *entity, float gcd);
|
||||
void con_gcd_finished(Entity *entity);
|
||||
|
@ -2357,7 +2357,7 @@ void Entity::stake_damage(Ref<SpellDamageInfo> info) {
|
||||
notification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_BEFORE_HIT, info);
|
||||
|
||||
if (info->get_immune()) {
|
||||
VRPCOBJ(cdamage_dealt_rpc, JSON::print(info->to_dict()), con_damage_dealt, info);
|
||||
VRPCOBJ12(cdamage_dealt_rpc, JSON::print(info->to_dict()), notification_cdamage, SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -2390,7 +2390,7 @@ void Entity::stake_damage(Ref<SpellDamageInfo> info) {
|
||||
emit_signal("son_damage_received", this, info);
|
||||
|
||||
//send an event to client
|
||||
VRPCOBJ(cdamage_dealt_rpc, JSON::print(info->to_dict()), con_damage_dealt, info);
|
||||
VRPCOBJ12(cdamage_dealt_rpc, JSON::print(info->to_dict()), notification_cdamage, SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);
|
||||
|
||||
if (hp->get_current_value() <= 0) {
|
||||
sdie();
|
||||
@ -2411,7 +2411,7 @@ void Entity::sdeal_damage_to(Ref<SpellDamageInfo> info) {
|
||||
notification_sdamage(SpellEnums::NOTIFICATION_DAMAGE_DEALT_DAMAGE, info);
|
||||
|
||||
//send an event to client
|
||||
VRPCOBJ(cdealt_damage_rpc, JSON::print(info->to_dict()), con_dealt_damage, info);
|
||||
VRPCOBJ12(cdealt_damage_rpc, JSON::print(info->to_dict()), notification_cdamage, SpellEnums::NOTIFICATION_DAMAGE_DEALT_DAMAGE, info);
|
||||
|
||||
//signal
|
||||
emit_signal("son_damage_received", this, info);
|
||||
@ -2436,7 +2436,7 @@ void Entity::stake_heal(Ref<SpellHealInfo> info) {
|
||||
notification_sheal(SpellEnums::NOTIFICATION_HEAL_BEFORE_HIT, info);
|
||||
|
||||
if (info->get_immune()) {
|
||||
VRPCOBJ(cheal_dealt_rpc, JSON::print(info->to_dict()), con_heal_dealt, info);
|
||||
VRPCOBJ12(cheal_dealt_rpc, JSON::print(info->to_dict()), notification_cheal, SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2459,7 +2459,7 @@ void Entity::stake_heal(Ref<SpellHealInfo> info) {
|
||||
hp->set_current_value(h);
|
||||
|
||||
//send an event to client
|
||||
VRPCOBJ(cheal_dealt_rpc, JSON::print(info->to_dict()), con_heal_dealt, info);
|
||||
VRPCOBJ12(cheal_dealt_rpc, JSON::print(info->to_dict()), notification_cheal, SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);
|
||||
|
||||
//signal
|
||||
emit_signal("son_heal_received", this, info);
|
||||
@ -2479,7 +2479,7 @@ void Entity::sdeal_heal_to(Ref<SpellHealInfo> info) {
|
||||
info->get_receiver()->stake_heal(info);
|
||||
notification_sheal(SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);
|
||||
|
||||
VRPCOBJ(cdealt_heal_rpc, JSON::print(info->to_dict()), con_dealt_heal, info);
|
||||
VRPCOBJ12(cdealt_heal_rpc, JSON::print(info->to_dict()), notification_cheal, SpellEnums::NOTIFICATION_HEAL_DEALT_HEAL, info);
|
||||
|
||||
emit_signal("son_heal_dealt", this, info);
|
||||
}
|
||||
@ -2491,7 +2491,7 @@ void Entity::cdamage_dealt_rpc(String data) {
|
||||
info->from_dict(data_as_dict(data));
|
||||
info->resolve_references(this);
|
||||
|
||||
con_damage_dealt(info);
|
||||
notification_cdamage(SpellEnums::NOTIFICATION_DAMAGE_DAMAGE_DEALT, info);
|
||||
}
|
||||
void Entity::cdealt_damage_rpc(String data) {
|
||||
Ref<SpellDamageInfo> info;
|
||||
@ -2499,7 +2499,7 @@ void Entity::cdealt_damage_rpc(String data) {
|
||||
info->from_dict(data_as_dict(data));
|
||||
info->resolve_references(this);
|
||||
|
||||
con_dealt_damage(info);
|
||||
notification_cdamage(SpellEnums::NOTIFICATION_DAMAGE_DEALT_DAMAGE, info);
|
||||
}
|
||||
void Entity::cheal_dealt_rpc(String data) {
|
||||
Ref<SpellHealInfo> info;
|
||||
@ -2507,7 +2507,7 @@ void Entity::cheal_dealt_rpc(String data) {
|
||||
info->from_dict(data_as_dict(data));
|
||||
info->resolve_references(this);
|
||||
|
||||
con_heal_dealt(info);
|
||||
notification_cheal(SpellEnums::NOTIFICATION_HEAL_HEAL_DEALT, info);
|
||||
}
|
||||
void Entity::cdealt_heal_rpc(String data) {
|
||||
Ref<SpellHealInfo> info;
|
||||
@ -2515,7 +2515,7 @@ void Entity::cdealt_heal_rpc(String data) {
|
||||
info->from_dict(data_as_dict(data));
|
||||
info->resolve_references(this);
|
||||
|
||||
con_dealt_heal(info);
|
||||
notification_cheal(SpellEnums::NOTIFICATION_HEAL_DEALT_HEAL, info);
|
||||
}
|
||||
|
||||
//Interactions
|
||||
@ -3259,9 +3259,7 @@ void Entity::addc_aura(Ref<AuraData> aura) {
|
||||
|
||||
_c_auras.push_back(aura);
|
||||
|
||||
con_aura_added(aura);
|
||||
|
||||
emit_signal("caura_added", aura);
|
||||
notification_caura(SpellEnums::NOTIFICATION_AURA_ADDED, aura);
|
||||
}
|
||||
|
||||
void Entity::removec_aura(Ref<AuraData> aura) {
|
||||
@ -3283,9 +3281,7 @@ void Entity::removec_aura(Ref<AuraData> aura) {
|
||||
}
|
||||
|
||||
if (removed) {
|
||||
con_aura_removed(aura);
|
||||
|
||||
emit_signal("caura_removed", a);
|
||||
notification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3299,9 +3295,7 @@ void Entity::removec_aura_exact(Ref<AuraData> aura) {
|
||||
}
|
||||
}
|
||||
|
||||
con_aura_removed(aura);
|
||||
|
||||
emit_signal("caura_removed", aura);
|
||||
notification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);
|
||||
}
|
||||
|
||||
void Entity::removec_aura_dispelled(Ref<AuraData> aura) {
|
||||
@ -3314,9 +3308,7 @@ void Entity::removec_aura_dispelled(Ref<AuraData> aura) {
|
||||
}
|
||||
}
|
||||
|
||||
con_aura_removed(aura);
|
||||
|
||||
emit_signal("caura_removed_dispelled", aura);
|
||||
notification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);
|
||||
}
|
||||
|
||||
void Entity::caura_refreshed(Ref<AuraData> aura) {
|
||||
@ -3338,7 +3330,7 @@ void Entity::removec_aura_expired(Ref<AuraData> aura) {
|
||||
}
|
||||
}
|
||||
|
||||
con_aura_removed(aura);
|
||||
notification_caura(SpellEnums::NOTIFICATION_AURA_REMOVED, aura);
|
||||
|
||||
emit_signal("caura_removed_expired", aura);
|
||||
}
|
||||
@ -3449,101 +3441,81 @@ void Entity::onc_untargeted() {
|
||||
emit_signal("onc_untargeted");
|
||||
}
|
||||
|
||||
void Entity::con_cast_failed(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
info->get_spell()->con_spell_cast_failed(info);
|
||||
void Entity::notification_caura(int what, Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_cast_failed(info);
|
||||
_c_entity_data->notification_caura(what, data);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_cast_failed(ad, info);
|
||||
ad->get_aura()->notification_caura(what, data);
|
||||
}
|
||||
|
||||
if (has_method("_con_cast_failed"))
|
||||
call("_con_cast_failed", info);
|
||||
if (has_method("_notification_caura"))
|
||||
call("_notification_caura", what, data);
|
||||
|
||||
emit_signal("notification_caura", what, data);
|
||||
}
|
||||
|
||||
void Entity::con_cast_started(Ref<SpellCastInfo> info) {
|
||||
void Entity::notification_cheal(int what, Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
info->get_spell()->con_spell_cast_started(info);
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_cast_started(info);
|
||||
_c_entity_data->notification_cheal(what, info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_cast_started(ad, info);
|
||||
ad->get_aura()->notification_cheal(what, ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_cast_started"))
|
||||
call("_con_cast_started", info);
|
||||
if (has_method("_notification_cheal"))
|
||||
call("_notification_cheal", info);
|
||||
|
||||
//the current c health should probably be set here.
|
||||
emit_signal("notification_cheal", this, what, info);
|
||||
}
|
||||
|
||||
void Entity::con_cast_state_changed(Ref<SpellCastInfo> info) {
|
||||
void Entity::notification_ccast(int what, Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
//info->get_spell()->con_spell_cast_(info);
|
||||
info->get_spell()->notification_ccast(what, info);
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_cast_state_changed(info);
|
||||
_c_entity_data->notification_ccast(what, info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_cast_state_changed(ad, info);
|
||||
ad->get_aura()->notification_ccast(what, ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_cast_state_changed"))
|
||||
call("_con_cast_state_changed", info);
|
||||
if (has_method("_notification_ccast"))
|
||||
call("_notification_ccast", what, info);
|
||||
|
||||
emit_signal("notification_ccast", what, info);
|
||||
}
|
||||
|
||||
void Entity::con_cast_finished(Ref<SpellCastInfo> info) {
|
||||
void Entity::notification_cdamage(int what, Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
info->get_spell()->con_spell_cast_success(info);
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_cast_finished(info);
|
||||
_c_entity_data->notification_cdamage(what, info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_cast_finished(ad, info);
|
||||
ad->get_aura()->notification_cdamage(what, ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_cast_finished"))
|
||||
call("_con_cast_finished", info);
|
||||
}
|
||||
if (has_method("_notification_cdamage"))
|
||||
call("_notification_cdamage", what, info);
|
||||
|
||||
void Entity::con_spell_cast_success(Ref<SpellCastInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
info->get_spell()->con_spell_cast_success(info);
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_spell_cast_success(info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_spell_cast_success(ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_spell_cast_success"))
|
||||
call("_con_spell_cast_success", info);
|
||||
|
||||
emit_signal("cspell_cast_success", info);
|
||||
//the current c health should probably be set here.
|
||||
emit_signal("notification_cdamage", this, what, info);
|
||||
}
|
||||
|
||||
void Entity::con_death() {
|
||||
@ -3626,137 +3598,6 @@ void Entity::con_category_cooldown_removed(Ref<CategoryCooldown> category_cooldo
|
||||
call("_con_category_cooldown_removed", category_cooldown);
|
||||
}
|
||||
|
||||
void Entity::con_aura_added(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_aura_added(data);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_aura_added(data);
|
||||
}
|
||||
|
||||
if (has_method("_con_aura_added"))
|
||||
call("_con_aura_added", data);
|
||||
}
|
||||
|
||||
void Entity::con_aura_removed(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_aura_removed(data);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_aura_removed(data);
|
||||
}
|
||||
|
||||
if (has_method("_con_aura_removed"))
|
||||
call("_con_aura_removed", data);
|
||||
}
|
||||
|
||||
void Entity::con_aura_refresh(Ref<AuraData> data) {
|
||||
ERR_FAIL_COND(!data.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_aura_refresh(data);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_aura_refresh(data);
|
||||
}
|
||||
|
||||
if (has_method("_con_aura_refresh"))
|
||||
call("_con_aura_refresh", data);
|
||||
}
|
||||
|
||||
void Entity::con_damage_dealt(Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_damage_dealt(info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_damage_dealt(ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_damage_dealt"))
|
||||
call("_con_damage_dealt", info);
|
||||
|
||||
//the current c health should probably be set here.
|
||||
emit_signal("con_damage_dealt", this, info);
|
||||
}
|
||||
|
||||
void Entity::con_dealt_damage(Ref<SpellDamageInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_dealt_damage(info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_dealt_damage(ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_dealt_damage"))
|
||||
call("_con_dealt_damage", info);
|
||||
|
||||
//the current c health should probably be set here.
|
||||
emit_signal("con_dealt_damage", this, info);
|
||||
}
|
||||
|
||||
void Entity::con_heal_dealt(Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_heal_dealt(info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_heal_dealt(ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_heal_dealt"))
|
||||
call("_con_heal_dealt", info);
|
||||
|
||||
//the current c health should probably be set here.
|
||||
emit_signal("con_heal_dealt", this, info);
|
||||
}
|
||||
|
||||
void Entity::con_dealt_heal(Ref<SpellHealInfo> info) {
|
||||
ERR_FAIL_COND(!info.is_valid());
|
||||
|
||||
if (_c_entity_data.is_valid()) {
|
||||
_c_entity_data->con_dealt_heal(info);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _c_auras.get(i);
|
||||
|
||||
ad->get_aura()->con_dealt_heal(ad, info);
|
||||
}
|
||||
|
||||
if (has_method("_con_dealt_heal"))
|
||||
call("_con_dealt_heal", info);
|
||||
|
||||
//the current c health should probably be set here.
|
||||
emit_signal("con_dealt_heal", this, info);
|
||||
}
|
||||
|
||||
void Entity::con_xp_gained(int value) {
|
||||
if (_s_entity_data.is_valid()) {
|
||||
_s_entity_data->con_xp_gained(this, value);
|
||||
@ -3914,13 +3755,13 @@ void Entity::cstart_casting_rpc(String data) {
|
||||
void Entity::cstart_casting(Ref<SpellCastInfo> info) {
|
||||
_c_spell_cast_info = Ref<SpellCastInfo>(info);
|
||||
|
||||
con_cast_started(_c_spell_cast_info);
|
||||
notification_ccast(SpellEnums::NOTIFICATION_CAST_STARTED, _c_spell_cast_info);
|
||||
|
||||
emit_signal("ccast_started", _c_spell_cast_info);
|
||||
}
|
||||
|
||||
void Entity::cfail_cast() {
|
||||
con_cast_failed(_c_spell_cast_info);
|
||||
notification_ccast(SpellEnums::NOTIFICATION_CAST_FAILED, _c_spell_cast_info);
|
||||
|
||||
emit_signal("ccast_failed", _c_spell_cast_info);
|
||||
|
||||
@ -3935,13 +3776,13 @@ void Entity::cdelay_cast() {
|
||||
}
|
||||
|
||||
void Entity::cfinish_cast() {
|
||||
con_cast_finished(_c_spell_cast_info);
|
||||
notification_ccast(SpellEnums::NOTIFICATION_CAST_FINISHED, _c_spell_cast_info);
|
||||
emit_signal("ccast_finished", _c_spell_cast_info);
|
||||
_c_spell_cast_info.unref();
|
||||
}
|
||||
|
||||
void Entity::cinterrupt_cast() {
|
||||
con_cast_failed(_c_spell_cast_info);
|
||||
notification_ccast(SpellEnums::NOTIFICATION_CAST_FAILED, _c_spell_cast_info);
|
||||
emit_signal("ccast_interrupted", _c_spell_cast_info);
|
||||
_c_spell_cast_info.unref();
|
||||
}
|
||||
@ -3962,7 +3803,7 @@ void Entity::cspell_cast_success_rpc(String data) {
|
||||
}
|
||||
|
||||
void Entity::cspell_cast_success(Ref<SpellCastInfo> info) {
|
||||
con_spell_cast_success(info);
|
||||
notification_ccast(SpellEnums::NOTIFICATION_CAST_SUCCESS, info);
|
||||
}
|
||||
|
||||
//// Cooldowns ////
|
||||
@ -7093,7 +6934,7 @@ void Entity::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("_son_target_changed", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "old_target", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
BIND_VMETHOD(MethodInfo("_con_target_changed", PropertyInfo(Variant::OBJECT, "entity", PROPERTY_HINT_RESOURCE_TYPE, "Entity"), PropertyInfo(Variant::OBJECT, "old_target", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
|
||||
//SpellCastSignals
|
||||
//Serverside
|
||||
ADD_SIGNAL(MethodInfo("notification_scast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("notification_saura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "aura_data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
@ -7107,6 +6948,20 @@ void Entity::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("notification_scast", "what", "info"), &Entity::notification_scast);
|
||||
ClassDB::bind_method(D_METHOD("notification_sdamage", "what", "info"), &Entity::notification_sdamage);
|
||||
|
||||
//Clientside
|
||||
ADD_SIGNAL(MethodInfo("notification_ccast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("notification_caura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "aura_data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_notification_caura", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cheal", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_ccast", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_notification_cdamage", PropertyInfo(Variant::INT, "what"), PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("notification_caura", "what", "data"), &Entity::notification_caura);
|
||||
ClassDB::bind_method(D_METHOD("notification_cheal", "what", "info"), &Entity::notification_cheal);
|
||||
ClassDB::bind_method(D_METHOD("notification_ccast", "what", "info"), &Entity::notification_ccast);
|
||||
ClassDB::bind_method(D_METHOD("notification_cdamage", "what", "info"), &Entity::notification_cdamage);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_death"), &Entity::son_death);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_gcd_started"), &Entity::son_gcd_started);
|
||||
@ -7166,12 +7021,6 @@ void Entity::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("cclear_talents"), &Entity::cclear_talents);
|
||||
|
||||
//Clientside EventHandlers
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_failed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_started", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_state_changed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_cast_finished", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_spell_cast_success", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_death"));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("con_cooldown_added", PropertyInfo(Variant::OBJECT, "cooldown", PROPERTY_HINT_RESOURCE_TYPE, "Cooldown")));
|
||||
@ -7179,15 +7028,6 @@ void Entity::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo("con_category_cooldown_added", PropertyInfo(Variant::OBJECT, "category_cooldown", PROPERTY_HINT_RESOURCE_TYPE, "CategoryCooldown")));
|
||||
BIND_VMETHOD(MethodInfo("con_category_cooldown_removed", PropertyInfo(Variant::OBJECT, "category_cooldown", PROPERTY_HINT_RESOURCE_TYPE, "CategoryCooldown")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_added", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_removed", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_aura_refresh", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_damage_dealt", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_dealt_damage", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_heal_dealt", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_con_dealt_heal", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellHealInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_gcd_started", PropertyInfo(Variant::REAL, "gcd")));
|
||||
BIND_VMETHOD(MethodInfo("_con_gcd_finished"));
|
||||
|
||||
@ -7202,22 +7042,9 @@ void Entity::_bind_methods() {
|
||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "value"), "_cans_interact"));
|
||||
BIND_VMETHOD(MethodInfo("_sinteract"));
|
||||
|
||||
ADD_SIGNAL(MethodInfo("ccast_started", PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("ccast_failed", PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("ccast_delayed", PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("ccast_finished", PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("ccast_interrupted", PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
ADD_SIGNAL(MethodInfo("cspell_cast_success", PropertyInfo(Variant::OBJECT, "spell_cast_info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_cast_failed", "info"), &Entity::con_cast_failed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_started", "info"), &Entity::con_cast_started);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_state_changed", "info"), &Entity::con_cast_state_changed);
|
||||
ClassDB::bind_method(D_METHOD("con_cast_finished", "info"), &Entity::con_cast_finished);
|
||||
ClassDB::bind_method(D_METHOD("cspell_cast_success", "info"), &Entity::cspell_cast_success);
|
||||
ClassDB::bind_method(D_METHOD("cspell_cast_success_rpc", "data"), &Entity::cspell_cast_success_rpc);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_spell_cast_success", "info"), &Entity::con_spell_cast_success);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_death"), &Entity::con_death);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_cooldown_added", "cooldown"), &Entity::con_cooldown_added);
|
||||
@ -7225,15 +7052,6 @@ void Entity::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_added", "category_cooldown"), &Entity::con_category_cooldown_added);
|
||||
ClassDB::bind_method(D_METHOD("con_category_cooldown_removed", "category_cooldown"), &Entity::con_category_cooldown_removed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_aura_added", "data"), &Entity::con_aura_added);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_removed", "data"), &Entity::con_aura_removed);
|
||||
ClassDB::bind_method(D_METHOD("con_aura_refresh", "data"), &Entity::con_aura_refresh);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_damage_dealt", "info"), &Entity::con_damage_dealt);
|
||||
ClassDB::bind_method(D_METHOD("con_dealt_damage", "info"), &Entity::con_dealt_damage);
|
||||
ClassDB::bind_method(D_METHOD("con_heal_dealt", "info"), &Entity::con_heal_dealt);
|
||||
ClassDB::bind_method(D_METHOD("con_dealt_heal", "info"), &Entity::con_dealt_heal);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_started"), &Entity::con_gcd_started);
|
||||
ClassDB::bind_method(D_METHOD("con_gcd_finished"), &Entity::con_gcd_finished);
|
||||
|
||||
|
@ -154,6 +154,12 @@ enum PlayerSendFlags {
|
||||
} \
|
||||
normalfunc(normal_var);
|
||||
|
||||
#define VRPCOBJ12(rpcfunc, rpc_var, normalfunc, normal_var1, normal_var2) \
|
||||
if (is_inside_tree() && get_tree()->has_network_peer()) { \
|
||||
vrpc(#rpcfunc, rpc_var); \
|
||||
} \
|
||||
normalfunc(normal_var1, normal_var2);
|
||||
|
||||
#define VRPCOBJP(rpcfunc, rpc_var1, rpc_var2, normalfunc, normal_var1, normal_var2) \
|
||||
if (is_inside_tree() && get_tree()->has_network_peer()) { \
|
||||
vrpc(#rpcfunc, rpc_var1, rpc_var2); \
|
||||
@ -483,16 +489,10 @@ public:
|
||||
void son_entity_resource_removed(Ref<EntityResource> resource);
|
||||
|
||||
//Clientside EventHandlers
|
||||
//void notification_caura(int what, Ref<AuraData> data);
|
||||
//void notification_cheal(int what, Ref<SpellHealInfo> info);
|
||||
//void notification_ccast(int what, Ref<SpellCastInfo> info);
|
||||
//void notification_cdamage(int what, Ref<SpellDamageInfo> info);
|
||||
|
||||
void con_cast_failed(Ref<SpellCastInfo> info);
|
||||
void con_cast_started(Ref<SpellCastInfo> info);
|
||||
void con_cast_state_changed(Ref<SpellCastInfo> info);
|
||||
void con_cast_finished(Ref<SpellCastInfo> info);
|
||||
void con_spell_cast_success(Ref<SpellCastInfo> info);
|
||||
void notification_caura(int what, Ref<AuraData> data);
|
||||
void notification_cheal(int what, Ref<SpellHealInfo> info);
|
||||
void notification_ccast(int what, Ref<SpellCastInfo> info);
|
||||
void notification_cdamage(int what, Ref<SpellDamageInfo> info);
|
||||
|
||||
void con_death();
|
||||
|
||||
@ -501,15 +501,6 @@ public:
|
||||
void con_category_cooldown_added(Ref<CategoryCooldown> category_cooldown);
|
||||
void con_category_cooldown_removed(Ref<CategoryCooldown> category_cooldown);
|
||||
|
||||
void con_aura_added(Ref<AuraData> data);
|
||||
void con_aura_removed(Ref<AuraData> data);
|
||||
void con_aura_refresh(Ref<AuraData> data);
|
||||
|
||||
void con_damage_dealt(Ref<SpellDamageInfo> info);
|
||||
void con_dealt_damage(Ref<SpellDamageInfo> info);
|
||||
void con_heal_dealt(Ref<SpellHealInfo> info);
|
||||
void con_dealt_heal(Ref<SpellHealInfo> info);
|
||||
|
||||
void con_xp_gained(int value);
|
||||
void con_class_level_up(int value);
|
||||
void con_character_level_up(int value);
|
||||
|
@ -121,6 +121,10 @@ public:
|
||||
enum {
|
||||
NOTIFICATION_AURA_BEFORE_APPLIED = 0,
|
||||
NOTIFICATION_AURA_AFTER_APPLIED,
|
||||
NOTIFICATION_AURA_APPLIED,
|
||||
NOTIFICATION_AURA_ADDED,
|
||||
NOTIFICATION_AURA_REMOVED,
|
||||
NOTIFICATION_AURA_REFRESHED,
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -130,6 +134,7 @@ public:
|
||||
NOTIFICATION_DAMAGE_RECEIVE,
|
||||
NOTIFICATION_DAMAGE_DEALT_DAMAGE,
|
||||
NOTIFICATION_DAMAGE_DAMAGE_DEALT,
|
||||
NOTIFICATION_DAMAGE_DAMAGE,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user