mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-20 17:14:44 +01:00
-Cleaned up Entity, Aura, and Spell.
-Bound most of the spell system related functions, so they are callable from gdscript.
This commit is contained in:
parent
decb7c3c7d
commit
e2bf5a5286
327
data/aura.cpp
327
data/aura.cpp
@ -242,102 +242,143 @@ void Aura::sapply_simple(Entity *caster, Entity *target, float spell_scale) {
|
||||
sapply(info);
|
||||
}
|
||||
|
||||
|
||||
void Aura::sapply(Ref<AuraApplyInfo> info) {
|
||||
//always exists
|
||||
call("_sapply", info);
|
||||
}
|
||||
|
||||
void Aura::sremove(Ref<AuraData> aura) {
|
||||
//always exists
|
||||
call("_sremove", aura);
|
||||
}
|
||||
|
||||
void Aura::sremove_expired(Ref<AuraData> aura) {
|
||||
//always exists
|
||||
call("_sremove_expired", aura);
|
||||
}
|
||||
|
||||
void Aura::sremove_dispell(Ref<AuraData> aura) {
|
||||
//always exists
|
||||
call("_sremove_dispell", aura);
|
||||
}
|
||||
|
||||
void Aura::supdate(Ref<AuraData> aura, float delta) {
|
||||
//always exists
|
||||
call("_supdate", aura, delta);
|
||||
}
|
||||
|
||||
void Aura::sdispell(Entity *target, AuraData *data) {
|
||||
}
|
||||
|
||||
void Aura::son_before_cast(Ref<SpellCastInfo> info) {
|
||||
call("_son_before_cast", info);
|
||||
if (has_method("_son_before_cast"))
|
||||
call("_son_before_cast", info);
|
||||
}
|
||||
|
||||
void Aura::son_before_cast_target(Ref<SpellCastInfo> info) {
|
||||
call("_son_before_cast_target", info);
|
||||
if (has_method("_son_before_cast_target"))
|
||||
call("_son_before_cast_target", info);
|
||||
}
|
||||
|
||||
void Aura::son_cast_finished(Ref<SpellCastInfo> info) {
|
||||
call("_son_cast_finished", info);
|
||||
if (has_method("_son_cast_finished"))
|
||||
call("_son_cast_finished", info);
|
||||
}
|
||||
|
||||
void Aura::son_cast_started(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_son_cast_started"))
|
||||
call("_son_cast_started", info);
|
||||
}
|
||||
|
||||
void Aura::son_cast_failed(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_son_cast_failed"))
|
||||
call("_son_cast_failed", info);
|
||||
}
|
||||
|
||||
void Aura::son_cast_finished_target(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_son_cast_finished_target"))
|
||||
call("_son_cast_finished_target", info);
|
||||
}
|
||||
|
||||
void Aura::son_before_damage(Ref<SpellDamageInfo> data) {
|
||||
if (has_method("_son_before_damage"))
|
||||
call("_son_before_damage", data);
|
||||
}
|
||||
|
||||
void Aura::son_damage_receive(Ref<SpellDamageInfo> data) {
|
||||
if (has_method("_son_damage_receive"))
|
||||
call("_son_damage_receive", data);
|
||||
}
|
||||
|
||||
void Aura::son_hit(Ref<SpellDamageInfo> data) {
|
||||
if (has_method("_son_hit"))
|
||||
call("_son_hit", data);
|
||||
}
|
||||
|
||||
void Aura::son_damage_dealt(Ref<SpellDamageInfo> data) {
|
||||
if (has_method("_son_damage_dealt"))
|
||||
call("_son_damage_dealt", data);
|
||||
}
|
||||
|
||||
void Aura::son_remove_expired(Ref<AuraData> aura) {
|
||||
if (has_method("_son_remove_expired"))
|
||||
call("_son_remove_expired", aura);
|
||||
}
|
||||
|
||||
void Aura::son_remove(Ref<AuraData> aura) {
|
||||
if (has_method("_son_remove"))
|
||||
call("_son_remove", aura);
|
||||
}
|
||||
|
||||
void Aura::son_remove_dispell(Ref<AuraData> aura) {
|
||||
if (has_method("_son_remove_dispell"))
|
||||
call("_son_remove_dispell", aura);
|
||||
}
|
||||
|
||||
void Aura::son_before_aura_applied(Ref<AuraData> data) {
|
||||
if (has_method("_son_before_aura_applied"))
|
||||
call("_son_before_aura_applied", data);
|
||||
}
|
||||
|
||||
void Aura::son_after_aura_applied(Ref<AuraData> data) {
|
||||
if (has_method("_son_after_aura_applied"))
|
||||
call("_son_after_aura_applied", data);
|
||||
}
|
||||
|
||||
void Aura::con_added(Ref<AuraData> data) {
|
||||
if (has_method("_con_added"))
|
||||
call("_con_added", data);
|
||||
}
|
||||
|
||||
void Aura::con_removed(Ref<AuraData> data) {
|
||||
if (has_method("_con_removed"))
|
||||
call("_con_removed", data);
|
||||
}
|
||||
|
||||
void Aura::con_refresh(Ref<AuraData> data) {
|
||||
if (has_method("_con_refresh"))
|
||||
call("_con_refresh", data);
|
||||
}
|
||||
|
||||
void Aura::sapply_passives_damage_receive(Ref<SpellDamageInfo> data) {
|
||||
//always exists
|
||||
call("_sapply_passives_damage_receive", data);
|
||||
}
|
||||
|
||||
void Aura::sapply_passives_damage_deal(Ref<SpellDamageInfo> data) {
|
||||
//always exists
|
||||
call("_sapply_passives_damage_deal", data);
|
||||
}
|
||||
|
||||
void Aura::son_before_damage(Ref<SpellDamageInfo> data) {
|
||||
call("_son_before_damage", data);
|
||||
}
|
||||
|
||||
void Aura::son_damage_receive(Ref<SpellDamageInfo> data) {
|
||||
call("_son_damage_receive", data);
|
||||
}
|
||||
|
||||
void Aura::son_hit(Ref<SpellDamageInfo> data) {
|
||||
call("_son_hit", data);
|
||||
}
|
||||
|
||||
void Aura::son_damage_dealt(Ref<SpellDamageInfo> data) {
|
||||
call("_son_damage_dealt", data);
|
||||
}
|
||||
|
||||
void Aura::son_remove_expired(Ref<AuraData> aura) {
|
||||
call("_son_remove_expired", aura);
|
||||
}
|
||||
|
||||
void Aura::son_remove(Ref<AuraData> aura) {
|
||||
//Debug::Log(new String("OnRemove called, Deprecated!"));
|
||||
//this->DeApply(caster, null);
|
||||
call("_son_remove", aura);
|
||||
}
|
||||
|
||||
void Aura::son_dispell(Ref<AuraData> aura) {
|
||||
call("_son_dispell", aura);
|
||||
}
|
||||
|
||||
void Aura::son_before_aura_applied(Ref<AuraData> data) {
|
||||
call("_son_before_aura_applied", data);
|
||||
}
|
||||
|
||||
void Aura::son_after_aura_applied(Ref<AuraData> data) {
|
||||
call("_son_after_aura_applied", data);
|
||||
}
|
||||
|
||||
void Aura::con_added(Entity *target, Aura *data, AuraData *aura) {
|
||||
}
|
||||
|
||||
void Aura::con_removed(Entity *target, Aura *data) {
|
||||
}
|
||||
|
||||
void Aura::con_refresh(Entity *target, Object *data, AuraData *aura) {
|
||||
}
|
||||
|
||||
void Aura::setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info) {
|
||||
//always exists
|
||||
call("setup_aura_data", data, info);
|
||||
}
|
||||
|
||||
void Aura::calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info) {
|
||||
//always exists
|
||||
call("_calculate_initial_damage", aura_data, info);
|
||||
}
|
||||
|
||||
void Aura::handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> data) {
|
||||
//always exists
|
||||
call("_handle_aura_damage", aura_data, data);
|
||||
}
|
||||
|
||||
@ -347,7 +388,7 @@ void Aura::_sapply(Ref<AuraApplyInfo> info) {
|
||||
Ref<AuraData> ad(memnew(AuraData()));
|
||||
setup_aura_data(ad, info);
|
||||
|
||||
info->get_target()->add_aura(ad);
|
||||
info->get_target()->sadd_aura(ad);
|
||||
}
|
||||
|
||||
void Aura::_sremove(Ref<AuraData> aura) {
|
||||
@ -358,6 +399,10 @@ void Aura::_sremove_expired(Ref<AuraData> aura) {
|
||||
aura->get_owner()->sremove_aura_expired(aura);
|
||||
}
|
||||
|
||||
void Aura::_sremove_dispell(Ref<AuraData> aura) {
|
||||
aura->get_owner()->sremove_aura_dispelled(aura);
|
||||
}
|
||||
|
||||
void Aura::_supdate(Ref<AuraData> aura, float delta) {
|
||||
|
||||
bool remove = aura->update_remaining_time(delta);
|
||||
@ -383,62 +428,6 @@ void Aura::_supdate(Ref<AuraData> aura, float delta) {
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::_sdispell(Entity *target, AuraData *data) {
|
||||
}
|
||||
|
||||
void Aura::_son_before_cast(Ref<SpellCastInfo> info) {
|
||||
}
|
||||
|
||||
void Aura::_son_before_cast_target(Ref<SpellCastInfo> info) {
|
||||
}
|
||||
|
||||
void Aura::_son_cast_finished(Ref<SpellCastInfo> info) {
|
||||
}
|
||||
|
||||
void Aura::_sapply_passives_damage_receive(Ref<SpellDamageInfo> data) {
|
||||
}
|
||||
|
||||
void Aura::_sapply_passives_damage_deal(Ref<SpellDamageInfo> data) {
|
||||
}
|
||||
|
||||
void Aura::_son_before_damage(Ref<SpellDamageInfo> data) {
|
||||
}
|
||||
|
||||
void Aura::_son_damage_receive(Ref<SpellDamageInfo> data) {
|
||||
}
|
||||
|
||||
void Aura::_son_hit(Ref<SpellDamageInfo> data) {
|
||||
}
|
||||
|
||||
void Aura::_son_damage_dealt(Ref<SpellDamageInfo> data) {
|
||||
}
|
||||
|
||||
void Aura::_son_remove_expired(Ref<AuraData> aura) {
|
||||
}
|
||||
|
||||
void Aura::_son_remove(Ref<AuraData> aura) {
|
||||
//Debug::Log(new String("OnRemove called, Deprecated!"));
|
||||
//this->DeApply(caster, null);
|
||||
}
|
||||
|
||||
void Aura::_son_dispell(Ref<AuraData> aura) {
|
||||
}
|
||||
|
||||
void Aura::_son_before_aura_applied(Ref<AuraData> data) {
|
||||
}
|
||||
|
||||
void Aura::_son_after_aura_applied(Ref<AuraData> data) {
|
||||
}
|
||||
|
||||
void Aura::_con_added(Entity *target, Aura *data, AuraData *aura) {
|
||||
}
|
||||
|
||||
void Aura::_con_removed(Entity *target, Aura *data) {
|
||||
}
|
||||
|
||||
void Aura::_con_refresh(Entity *target, Object *data, AuraData *aura) {
|
||||
}
|
||||
|
||||
void Aura::_setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info) {
|
||||
data->set_aura(Ref<Aura>(this));
|
||||
data->set_caster(info->get_caster());
|
||||
@ -458,7 +447,6 @@ void Aura::_handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> dat
|
||||
data->get_dealer()->sdeal_damage_to(data);
|
||||
}
|
||||
|
||||
|
||||
void Aura::_validate_property(PropertyInfo &property) const {
|
||||
|
||||
String prop = property.name;
|
||||
@ -476,51 +464,32 @@ void Aura::_validate_property(PropertyInfo &property) const {
|
||||
}
|
||||
|
||||
void Aura::_bind_methods() {
|
||||
//VMethods
|
||||
BIND_VMETHOD(MethodInfo("_sapply", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sremove", PropertyInfo(Variant::OBJECT, "aura", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_sremove_expired", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_supdate", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::REAL, "delta")));
|
||||
//BIND_VMETHOD(MethodInfo("_sdispell", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_sapply_passives_damage_receive", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sapply_passives_damage_deal", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_before_cast", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_before_cast_target", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_finished", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_before_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_damage_receive", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_hit", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_damage_dealt", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_remove", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_son_remove_expired", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_son_dispell", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_before_aura_applied", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_son_after_aura_applied", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
//virtual void _con_added(Entity * target, Aura * data, AuraData * aura);
|
||||
//virtual void _con_removed(Entity * target, Aura * data);
|
||||
//virtual void _con_refresh(Entity * target, Object * data, AuraData * aura);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_setup_aura_data", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_calculate_initial_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData") , PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_handle_aura_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData") , PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
//Commands
|
||||
ClassDB::bind_method(D_METHOD("sapply", "info"), &Aura::sapply);
|
||||
ClassDB::bind_method(D_METHOD("sremove", "aura"), &Aura::sremove);
|
||||
ClassDB::bind_method(D_METHOD("sremove_expired", "aura"), &Aura::sremove_expired);
|
||||
ClassDB::bind_method(D_METHOD("supdate","aura", "delta"), &Aura::supdate);
|
||||
ClassDB::bind_method(D_METHOD("sremove_dispell", "aura"), &Aura::sremove_dispell);
|
||||
ClassDB::bind_method(D_METHOD("supdate", "aura", "delta"), &Aura::supdate);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("sapply_passives_damage_receive", "data"), &Aura::sapply_passives_damage_receive);
|
||||
ClassDB::bind_method(D_METHOD("sapply_passives_damage_deal", "data"), &Aura::sapply_passives_damage_deal);
|
||||
BIND_VMETHOD(MethodInfo("_sapply", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sremove", PropertyInfo(Variant::OBJECT, "aura", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_sremove_expired", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_sremove_dispell", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_supdate", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::REAL, "delta")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_sapply", "info"), &Aura::_sapply);
|
||||
ClassDB::bind_method(D_METHOD("_sremove", "aura"), &Aura::_sremove);
|
||||
ClassDB::bind_method(D_METHOD("_sremove_expired", "aura"), &Aura::_sremove_expired);
|
||||
ClassDB::bind_method(D_METHOD("_sremove_dispell", "aura"), &Aura::_sremove_dispell);
|
||||
ClassDB::bind_method(D_METHOD("_supdate", "aura", "delta"), &Aura::_supdate);
|
||||
|
||||
//EventHandlers
|
||||
ClassDB::bind_method(D_METHOD("son_before_cast", "info"), &Aura::son_before_cast);
|
||||
ClassDB::bind_method(D_METHOD("son_before_cast_target", "info"), &Aura::son_before_cast_target);
|
||||
ClassDB::bind_method(D_METHOD("son_cast_started", "info"), &Aura::son_cast_started);
|
||||
ClassDB::bind_method(D_METHOD("son_cast_failed", "info"), &Aura::son_cast_failed);
|
||||
ClassDB::bind_method(D_METHOD("son_cast_finished", "info"), &Aura::son_cast_finished);
|
||||
ClassDB::bind_method(D_METHOD("son_cast_finished_target", "info"), &Aura::son_cast_finished_target);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_before_damage", "data"), &Aura::son_before_damage);
|
||||
ClassDB::bind_method(D_METHOD("son_damage_receive", "data"), &Aura::son_damage_receive);
|
||||
@ -529,19 +498,57 @@ void Aura::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_remove", "aura"), &Aura::son_remove);
|
||||
ClassDB::bind_method(D_METHOD("son_remove_expired", "aura"), &Aura::son_remove_expired);
|
||||
ClassDB::bind_method(D_METHOD("son_dispell", "aura"), &Aura::son_dispell);
|
||||
ClassDB::bind_method(D_METHOD("son_remove_dispell", "aura"), &Aura::son_remove_dispell);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("son_before_aura_applied", "data"), &Aura::son_before_aura_applied);
|
||||
ClassDB::bind_method(D_METHOD("son_after_aura_applied", "data"), &Aura::son_after_aura_applied);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_before_cast", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_before_cast_target", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_started", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_failed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_finished", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_finished_target", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_before_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_damage_receive", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_hit", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_damage_dealt", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_remove", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_son_remove_expired", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("son_remove_dispell", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_son_before_aura_applied", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_son_after_aura_applied", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
//Clientside Event Handlers
|
||||
ClassDB::bind_method(D_METHOD("con_added", "info"), &Aura::con_added);
|
||||
ClassDB::bind_method(D_METHOD("con_removed", "info"), &Aura::con_removed);
|
||||
ClassDB::bind_method(D_METHOD("con_refresh", "info"), &Aura::con_refresh);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_con_added", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_removed", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_con_refresh", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
|
||||
//Calculations / Queries
|
||||
ClassDB::bind_method(D_METHOD("sapply_passives_damage_receive", "data"), &Aura::sapply_passives_damage_receive);
|
||||
ClassDB::bind_method(D_METHOD("sapply_passives_damage_deal", "data"), &Aura::sapply_passives_damage_deal);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("setup_aura_data", "data", "info"), &Aura::setup_aura_data);
|
||||
ClassDB::bind_method(D_METHOD("calculate_initial_damage", "aura_data", "info"), &Aura::calculate_initial_damage);
|
||||
ClassDB::bind_method(D_METHOD("handle_aura_damage", "aura_data", "data"), &Aura::handle_aura_damage);
|
||||
|
||||
//void con_added(Entity * target, Aura * data, AuraData * aura);
|
||||
//void con_removed(Entity * target, Aura * data);
|
||||
//void con_refresh(Entity * target, Object * data, AuraData * aura);
|
||||
BIND_VMETHOD(MethodInfo("_sapply_passives_damage_receive", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sapply_passives_damage_deal", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_setup_aura_data", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_calculate_initial_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_handle_aura_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "AuraData"), PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_setup_aura_data", "data", "info"), &Aura::_setup_aura_data);
|
||||
ClassDB::bind_method(D_METHOD("_calculate_initial_damage", "aura_data", "info"), &Aura::_calculate_initial_damage);
|
||||
ClassDB::bind_method(D_METHOD("_handle_aura_damage", "aura_data", "data"), &Aura::_handle_aura_damage);
|
||||
|
||||
//Properties
|
||||
ClassDB::bind_method(D_METHOD("get_id"), &Aura::get_id);
|
||||
@ -703,10 +710,6 @@ void Aura::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_aura_stat_attribute_percent_mod", "index", "value"), &Aura::set_aura_stat_attribute_percent_mod);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_aura_stat_attribute", "index"), &Aura::get_aura_stat_attribute);
|
||||
//ClassDB::bind_method(D_METHOD("sremove", "info"), &Aura::sremove);
|
||||
//ClassDB::bind_method(D_METHOD("supdate", "info"), &Aura::supdate);
|
||||
//ClassDB::bind_method(D_METHOD("sdispell", "info"), &Aura::sdispell);
|
||||
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "attribute_count", PROPERTY_HINT_RANGE, "0," + itos(MAX_AURA_STATS), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_aura_stat_attribute_count", "get_aura_stat_attribute_count");
|
||||
|
||||
@ -717,7 +720,6 @@ void Aura::_bind_methods() {
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "StatModAttribute_" + itos(i) + "/percent_mod", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_aura_stat_attribute_percent_mod", "get_aura_stat_attribute_percent_mod", i);
|
||||
}
|
||||
|
||||
|
||||
BIND_CONSTANT(MAX_AURA_STATS);
|
||||
BIND_CONSTANT(MAX_TRIGGER_DATA);
|
||||
|
||||
@ -726,8 +728,6 @@ void Aura::_bind_methods() {
|
||||
//ClassDB::bind_method(D_METHOD("get_absorb_scale_for_level"), &Aura::get_absorb_scale_for_level);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
void AuraScript::RemoveAura(Entity* caster)
|
||||
@ -1252,8 +1252,7 @@ bool AuraScript::IsZero(float x)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
GenericAuraScript::GenericAuraScript() {
|
||||
if (aura->GenericAuraScriptData->AttributeModifiers->Count > 0) {
|
||||
this->hasModifiers = true;
|
||||
@ -1356,7 +1355,3 @@ void GenericAuraScript::RemoveModifiers(WorldEntity* target)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
59
data/aura.h
59
data/aura.h
@ -253,21 +253,30 @@ public:
|
||||
Ref<AuraStatAttribute> get_aura_stat_attribute(int index) { return _aura_stat_attributes[index]; }
|
||||
|
||||
//// SpellSystem ////
|
||||
void sdispell(Entity *target, AuraData *data);
|
||||
|
||||
//Commands, c++ only
|
||||
void sapply_simple(Entity *caster, Entity *target, float spell_scale);
|
||||
|
||||
//Commands
|
||||
void sapply(Ref<AuraApplyInfo> info);
|
||||
void sremove(Ref<AuraData> aura);
|
||||
void sremove_expired(Ref<AuraData> aura);
|
||||
void sremove_dispell(Ref<AuraData> aura);
|
||||
void supdate(Ref<AuraData> aura, float delta);
|
||||
|
||||
void sapply_passives_damage_receive(Ref<SpellDamageInfo> data);
|
||||
void sapply_passives_damage_deal(Ref<SpellDamageInfo> data);
|
||||
virtual void _sapply(Ref<AuraApplyInfo> info);
|
||||
virtual void _sremove(Ref<AuraData> aura);
|
||||
virtual void _sremove_expired(Ref<AuraData> aura);
|
||||
virtual void _supdate(Ref<AuraData> aura, float delta);
|
||||
virtual void _sremove_dispell(Ref<AuraData> aura);
|
||||
|
||||
//EventHandlers
|
||||
void son_before_cast(Ref<SpellCastInfo> info);
|
||||
void son_before_cast_target(Ref<SpellCastInfo> info);
|
||||
void son_cast_started(Ref<SpellCastInfo> info);
|
||||
void son_cast_failed(Ref<SpellCastInfo> info);
|
||||
void son_cast_finished(Ref<SpellCastInfo> info);
|
||||
void son_cast_finished_target(Ref<SpellCastInfo> info);
|
||||
|
||||
void son_before_damage(Ref<SpellDamageInfo> data);
|
||||
void son_damage_receive(Ref<SpellDamageInfo> data);
|
||||
@ -276,52 +285,26 @@ public:
|
||||
|
||||
void son_remove(Ref<AuraData> aura);
|
||||
void son_remove_expired(Ref<AuraData> aura);
|
||||
void son_dispell(Ref<AuraData> aura);
|
||||
void son_remove_dispell(Ref<AuraData> aura);
|
||||
|
||||
void son_before_aura_applied(Ref<AuraData> data);
|
||||
void son_after_aura_applied(Ref<AuraData> data);
|
||||
|
||||
void con_added(Entity *target, Aura *data, AuraData *aura);
|
||||
void con_removed(Entity *target, Aura *data);
|
||||
void con_refresh(Entity *target, Object *data, AuraData *aura);
|
||||
//Clientside Event Handlers
|
||||
void con_added(Ref<AuraData> data);
|
||||
void con_removed(Ref<AuraData> data);
|
||||
void con_refresh(Ref<AuraData> data);
|
||||
|
||||
//Calculations / Queries
|
||||
void sapply_passives_damage_receive(Ref<SpellDamageInfo> data);
|
||||
void sapply_passives_damage_deal(Ref<SpellDamageInfo> data);
|
||||
void setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info);
|
||||
void calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info);
|
||||
void handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> data);
|
||||
|
||||
|
||||
virtual void _sapply(Ref<AuraApplyInfo> info);
|
||||
virtual void _sremove(Ref<AuraData> aura);
|
||||
virtual void _sremove_expired(Ref<AuraData> aura);
|
||||
virtual void _supdate(Ref<AuraData> aura, float delta);
|
||||
virtual void _sdispell(Entity *target, AuraData *data);
|
||||
|
||||
virtual void _sapply_passives_damage_receive(Ref<SpellDamageInfo> data);
|
||||
virtual void _sapply_passives_damage_deal(Ref<SpellDamageInfo> data);
|
||||
|
||||
virtual void _son_before_cast(Ref<SpellCastInfo> info);
|
||||
virtual void _son_before_cast_target(Ref<SpellCastInfo> info);
|
||||
virtual void _son_cast_finished(Ref<SpellCastInfo> info);
|
||||
|
||||
virtual void _son_before_damage(Ref<SpellDamageInfo> data);
|
||||
virtual void _son_damage_receive(Ref<SpellDamageInfo> data);
|
||||
virtual void _son_hit(Ref<SpellDamageInfo> data);
|
||||
virtual void _son_damage_dealt(Ref<SpellDamageInfo> data);
|
||||
|
||||
virtual void _son_remove(Ref<AuraData> aura);
|
||||
virtual void _son_remove_expired(Ref<AuraData> aura);
|
||||
virtual void _son_dispell(Ref<AuraData> aura);
|
||||
|
||||
virtual void _son_before_aura_applied(Ref<AuraData> data);
|
||||
virtual void _son_after_aura_applied(Ref<AuraData> data);
|
||||
|
||||
virtual void _con_added(Entity *target, Aura *data, AuraData *aura);
|
||||
virtual void _con_removed(Entity *target, Aura *data);
|
||||
virtual void _con_refresh(Entity *target, Object *data, AuraData *aura);
|
||||
|
||||
virtual void _setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info);
|
||||
virtual void _calculate_initial_damage(Ref<AuraData> aura_data, Ref<AuraApplyInfo> info);
|
||||
virtual void _handle_aura_damage(Ref<AuraData> aura_data, Ref<SpellDamageInfo> data);
|
||||
virtual void _setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info);
|
||||
|
||||
Aura();
|
||||
~Aura();
|
||||
|
@ -127,7 +127,7 @@ void CharacterClass::start_casting(int spell_id, Entity *caster, float spellScal
|
||||
}
|
||||
|
||||
if (s->get_spell_id() == spell_id) {
|
||||
s->start_casting_simple(caster, spellScale);
|
||||
s->sstart_casting_simple(caster, spellScale);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
189
data/spell.cpp
189
data/spell.cpp
@ -71,7 +71,7 @@ float Spell::get_absorb_scale_for_level(int level) {
|
||||
|
||||
//// Spell System ////
|
||||
|
||||
void Spell::start_casting_simple(Entity *caster, float spell_scale) {
|
||||
void Spell::sstart_casting_simple(Entity *caster, float spell_scale) {
|
||||
Ref<SpellCastInfo> info = Ref<SpellCastInfo>(memnew(SpellCastInfo()));
|
||||
|
||||
info->set_caster(caster);
|
||||
@ -81,85 +81,100 @@ void Spell::start_casting_simple(Entity *caster, float spell_scale) {
|
||||
info->set_spell_scale(spell_scale);
|
||||
info->set_spell(Ref<Spell>(this));
|
||||
|
||||
start_casting(info);
|
||||
sstart_casting(info);
|
||||
|
||||
}
|
||||
|
||||
void Spell::casting_failed_simple(Entity *caster) {
|
||||
void Spell::sinterrupt_cast_simple(Entity *caster) {
|
||||
Ref<SpellCastInfo> info(memnew(SpellCastInfo()));
|
||||
|
||||
info->set_caster(caster);
|
||||
info->set_spell(Ref<Spell>(this));
|
||||
|
||||
casting_failed(info);
|
||||
sinterrupt_cast(info);
|
||||
}
|
||||
|
||||
void Spell::start_casting_triggered_simple(Entity *caster) {
|
||||
void Spell::sstart_casting_triggered_simple(Entity *caster) {
|
||||
Ref<SpellCastInfo> info(memnew(SpellCastInfo()));
|
||||
|
||||
info->set_caster(caster);
|
||||
info->set_spell(Ref<Spell>(this));
|
||||
|
||||
start_casting_triggered(info);
|
||||
sstart_casting_triggered(info);
|
||||
}
|
||||
|
||||
//Script0
|
||||
//Script methods
|
||||
|
||||
void Spell::start_casting(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_start_casting")) {
|
||||
call("_start_casting", info);
|
||||
return;
|
||||
void Spell::sstart_casting(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_sstart_casting")) {
|
||||
call("_sstart_casting", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::casting_finished(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_casting_finished")) {
|
||||
call("_casting_finished", info);
|
||||
return;
|
||||
void Spell::sstart_casting_triggered(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_sstart_casting_triggered")) {
|
||||
call("_sstart_casting_triggered", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::casting_failed(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_casting_failed")) {
|
||||
call("_casting_failed", info);
|
||||
return;
|
||||
void Spell::sinterrupt_cast(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_sinterrupt_cast")) {
|
||||
call("_sinterrupt_cast", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::start_casting_triggered(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_start_casting_triggered")) {
|
||||
call("_start_casting_triggered", info);
|
||||
return;
|
||||
void Spell::sfinish_cast(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_sfinish_cast")) {
|
||||
call("_sfinish_cast", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::spell_hit(Entity *caster, Entity *target, Node *worldSpell, Spell *spell, float spell_scale) {
|
||||
void Spell::son_cast_player_moved(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_son_cast_player_moved")) {
|
||||
call("_son_cast_player_moved", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::on_player_move(Entity *player) {
|
||||
call("_on_player_move", player);
|
||||
void Spell::son_cast_damage_received(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_son_cast_damage_received")) {
|
||||
call("_son_cast_damage_received", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::c_on_spell_cast_started(Entity *player) {
|
||||
call("_start_casting_triggered", player);
|
||||
void Spell::son_spell_hit(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_son_spell_hit")) {
|
||||
call("_son_spell_hit", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::c_on_spell_cast_success(Entity *player) {
|
||||
call("_c_on_spell_cast_success", player);
|
||||
void Spell::con_spell_cast_started(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_spell_cast_started")) {
|
||||
call("_con_spell_cast_started", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::c_on_spell_cast_failed(Entity *player) {
|
||||
call("_c_on_spell_cast_failed", player);
|
||||
void Spell::con_spell_cast_success(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_spell_cast_success")) {
|
||||
call("_con_spell_cast_success", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::c_on_spell_cast_ended(Entity *player) {
|
||||
call("_c_on_spell_cast_ended", player);
|
||||
void Spell::con_spell_cast_failed(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_spell_cast_failed")) {
|
||||
call("_con_spell_cast_failed", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::on_cast_state_changed(Entity *caster) {
|
||||
//if (IsStunned(caster)) {
|
||||
// DoCastFail(caster, true);
|
||||
//}
|
||||
void Spell::con_spell_cast_ended(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_spell_cast_ended")) {
|
||||
call("_con_spell_cast_ended", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::con_spell_cast_interrupted(Ref<SpellCastInfo> info) {
|
||||
if (has_method("_con_spell_cast_interrupted")) {
|
||||
call("_con_spell_cast_interrupted", info);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::calculate_initial_damage(Ref<SpellDamageInfo> data) {
|
||||
@ -170,7 +185,7 @@ void Spell::handle_spell_damage(Ref<SpellDamageInfo> data) {
|
||||
call("_handle_spell_damage", data);
|
||||
}
|
||||
|
||||
void Spell::_start_casting(Ref<SpellCastInfo> info) {
|
||||
void Spell::_sstart_casting(Ref<SpellCastInfo> info) {
|
||||
Ref<Spell> spell = info->get_spell();
|
||||
|
||||
if (spell->get_needs_target() || spell->get_has_damage()) {
|
||||
@ -246,18 +261,6 @@ void Spell::_start_casting(Ref<SpellCastInfo> info) {
|
||||
}*/
|
||||
}
|
||||
|
||||
void Spell::_casting_finished(Ref<SpellCastInfo> info) {
|
||||
|
||||
}
|
||||
|
||||
void Spell::_casting_failed(Ref<SpellCastInfo> info) {
|
||||
|
||||
}
|
||||
|
||||
void Spell::_start_casting_triggered(Ref<SpellCastInfo> info) {
|
||||
|
||||
}
|
||||
|
||||
void Spell::_calculate_initial_damage(Ref<SpellDamageInfo> data) {
|
||||
data->set_damage(get_damage_min());
|
||||
}
|
||||
@ -268,22 +271,6 @@ void Spell::_handle_spell_damage(Ref<SpellDamageInfo> data) {
|
||||
data->get_dealer()->sdeal_damage_to(data);
|
||||
}
|
||||
|
||||
void Spell::_on_player_move(Entity *player) {
|
||||
}
|
||||
|
||||
void Spell::_c_on_spell_cast_started(Entity *player) {
|
||||
}
|
||||
|
||||
void Spell::_c_on_spell_cast_success(Entity *player) {
|
||||
}
|
||||
|
||||
void Spell::_c_on_spell_cast_failed(Entity *player) {
|
||||
}
|
||||
|
||||
void Spell::_c_on_spell_cast_ended(Entity *player) {
|
||||
}
|
||||
|
||||
|
||||
String Spell::get_name() {
|
||||
return _spell_name;
|
||||
}
|
||||
@ -399,51 +386,51 @@ Spell::~Spell() {
|
||||
}
|
||||
|
||||
void Spell::_bind_methods() {
|
||||
//Virtuals
|
||||
BIND_VMETHOD(MethodInfo("_start_casting", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_start_casting_triggered", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_casting_finished", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_casting_failed", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
//Commands
|
||||
ClassDB::bind_method(D_METHOD("sstart_casting", "info"), &Spell::sstart_casting);
|
||||
ClassDB::bind_method(D_METHOD("sstart_casting_triggered", "info"), &Spell::sstart_casting_triggered);
|
||||
ClassDB::bind_method(D_METHOD("sinterrupt_cast", "info"), &Spell::sinterrupt_cast);
|
||||
ClassDB::bind_method(D_METHOD("sfinish_cast", "info"), &Spell::sfinish_cast);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_calculate_initial_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_handle_spell_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sstart_casting", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sstart_casting_triggered", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sinterrupt_cast", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sfinish_cast", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_on_player_move", PropertyInfo(Variant::OBJECT, "player", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
BIND_VMETHOD(MethodInfo("_c_on_spell_cast_started", PropertyInfo(Variant::OBJECT, "player", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
BIND_VMETHOD(MethodInfo("_c_on_spell_cast_success", PropertyInfo(Variant::OBJECT, "player", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
BIND_VMETHOD(MethodInfo("_c_on_spell_cast_failed", PropertyInfo(Variant::OBJECT, "player", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
BIND_VMETHOD(MethodInfo("_c_on_spell_cast_ended", PropertyInfo(Variant::OBJECT, "player", PROPERTY_HINT_RESOURCE_TYPE, "Entity")));
|
||||
ClassDB::bind_method(D_METHOD("_sstart_casting", "info"), &Spell::_sstart_casting);
|
||||
|
||||
|
||||
ClassDB::bind_method(D_METHOD("start_casting", "info"), &Spell::start_casting);
|
||||
ClassDB::bind_method(D_METHOD("casting_finished", "info"), &Spell::casting_finished);
|
||||
ClassDB::bind_method(D_METHOD("casting_failed", "info"), &Spell::casting_failed);
|
||||
ClassDB::bind_method(D_METHOD("start_casting_triggered", "info"), &Spell::start_casting_triggered);
|
||||
//Eventhandlers
|
||||
ClassDB::bind_method(D_METHOD("son_cast_player_moved", "info"), &Spell::son_cast_player_moved);
|
||||
ClassDB::bind_method(D_METHOD("son_cast_damage_received", "info"), &Spell::son_cast_damage_received);
|
||||
ClassDB::bind_method(D_METHOD("son_spell_hit", "info"), &Spell::son_spell_hit);
|
||||
|
||||
//ClassDB::bind_method(D_METHOD("on_player_move", "player"), &Spell::on_player_move);
|
||||
//ClassDB::bind_method(D_METHOD("c_on_spell_cast_started", "player"), &Spell::c_on_spell_cast_started);
|
||||
//ClassDB::bind_method(D_METHOD("c_on_spell_cast_success", "player"), &Spell::c_on_spell_cast_success);
|
||||
//ClassDB::bind_method(D_METHOD("c_on_spell_cast_failed", "player"), &Spell::c_on_spell_cast_failed);
|
||||
//ClassDB::bind_method(D_METHOD("c_on_spell_cast_ended", "player"), &Spell::c_on_spell_cast_ended);
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_player_moved", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_cast_damage_received", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_son_spell_hit", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "SpellCastInfo")));
|
||||
|
||||
//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("_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")));
|
||||
|
||||
//Calculations / Queries
|
||||
ClassDB::bind_method(D_METHOD("calculate_initial_damage", "data"), &Spell::calculate_initial_damage);
|
||||
ClassDB::bind_method(D_METHOD("handle_spell_damage", "data"), &Spell::handle_spell_damage);
|
||||
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_start_casting", "info"), &Spell::_start_casting);
|
||||
ClassDB::bind_method(D_METHOD("_casting_finished", "info"), &Spell::_casting_finished);
|
||||
ClassDB::bind_method(D_METHOD("_casting_failed", "info"), &Spell::_casting_failed);
|
||||
ClassDB::bind_method(D_METHOD("_start_casting_triggered", "info"), &Spell::_start_casting_triggered);
|
||||
BIND_VMETHOD(MethodInfo("_calculate_initial_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_handle_spell_damage", PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "SpellDamageInfo")));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_calculate_initial_damage", "info"), &Spell::_calculate_initial_damage);
|
||||
ClassDB::bind_method(D_METHOD("_handle_spell_damage", "info"), &Spell::_handle_spell_damage);
|
||||
|
||||
//ClassDB::bind_method(D_METHOD("_on_player_move", "player"), &Spell::_on_player_move);
|
||||
//ClassDB::bind_method(D_METHOD("_c_on_spell_cast_started", "player"), &Spell::_c_on_spell_cast_started);
|
||||
//ClassDB::bind_method(D_METHOD("_c_on_spell_cast_success", "player"), &Spell::_c_on_spell_cast_success);
|
||||
//ClassDB::bind_method(D_METHOD("_c_on_spell_cast_failed", "player"), &Spell::_c_on_spell_cast_failed);
|
||||
//ClassDB::bind_method(D_METHOD("_c_on_spell_cast_ended", "player"), &Spell::_c_on_spell_cast_ended);
|
||||
|
||||
|
||||
|
||||
//Properties
|
||||
ClassDB::bind_method(D_METHOD("get_spell_id"), &Spell::get_spell_id);
|
||||
|
52
data/spell.h
52
data/spell.h
@ -279,46 +279,38 @@ public:
|
||||
|
||||
float PLAYER_HIT_RADIUS;
|
||||
|
||||
void start_casting_simple(Entity *caster, float spell_scale);
|
||||
void casting_failed_simple(Entity *caster);
|
||||
void start_casting_triggered_simple(Entity *caster);
|
||||
//Commands, c++ only
|
||||
void sstart_casting_simple(Entity *caster, float spell_scale);
|
||||
void sinterrupt_cast_simple(Entity *caster);
|
||||
void sstart_casting_triggered_simple(Entity *caster);
|
||||
|
||||
void start_casting(Ref<SpellCastInfo> info);
|
||||
void casting_finished(Ref<SpellCastInfo> info);
|
||||
void casting_failed(Ref<SpellCastInfo> info);
|
||||
void start_casting_triggered(Ref<SpellCastInfo> info);
|
||||
//Commands
|
||||
void sstart_casting(Ref<SpellCastInfo> info);
|
||||
void sstart_casting_triggered(Ref<SpellCastInfo> info);
|
||||
void sinterrupt_cast(Ref<SpellCastInfo> info);
|
||||
void sfinish_cast(Ref<SpellCastInfo> info);
|
||||
|
||||
//SpellHitInfo
|
||||
|
||||
void on_player_move(Entity *player);
|
||||
void c_on_spell_cast_started(Entity *player);
|
||||
void c_on_spell_cast_success(Entity *player);
|
||||
void c_on_spell_cast_failed(Entity *player);
|
||||
void c_on_spell_cast_ended(Entity *player);
|
||||
void on_cast_state_changed(Entity *player);
|
||||
virtual void _sstart_casting(Ref<SpellCastInfo> info);
|
||||
|
||||
void spell_hit(Entity *caster, Entity *target, Node *worldSpell, Spell *spell, float spellScale);
|
||||
//eventhandlers
|
||||
void son_cast_player_moved(Ref<SpellCastInfo> info);
|
||||
void son_cast_damage_received(Ref<SpellCastInfo> info);
|
||||
void son_spell_hit(Ref<SpellCastInfo> info);
|
||||
|
||||
//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);
|
||||
|
||||
//Calculations / Queries
|
||||
void calculate_initial_damage(Ref<SpellDamageInfo> data);
|
||||
void handle_spell_damage(Ref<SpellDamageInfo> data);
|
||||
|
||||
virtual void _start_casting(Ref<SpellCastInfo> info);
|
||||
virtual void _casting_finished(Ref<SpellCastInfo> info);
|
||||
virtual void _casting_failed(Ref<SpellCastInfo> info);
|
||||
virtual void _start_casting_triggered(Ref<SpellCastInfo> info);
|
||||
|
||||
virtual void _calculate_initial_damage(Ref<SpellDamageInfo> data);
|
||||
virtual void _handle_spell_damage(Ref<SpellDamageInfo> data);
|
||||
|
||||
virtual void _on_player_move(Entity *player);
|
||||
virtual void _c_on_spell_cast_started(Entity *player);
|
||||
virtual void _c_on_spell_cast_success(Entity *player);
|
||||
virtual void _c_on_spell_cast_failed(Entity *player);
|
||||
virtual void _c_on_spell_cast_ended(Entity *player);
|
||||
|
||||
//virtual void _on_cast_state_changed(Entity *caster);
|
||||
|
||||
|
||||
String get_name();
|
||||
String get_description(int level);
|
||||
|
||||
|
1738
entities/entity.cpp
1738
entities/entity.cpp
File diff suppressed because it is too large
Load Diff
@ -31,8 +31,8 @@ class SpellDamageInfo;
|
||||
class SpellCastInfo;
|
||||
|
||||
class EntityCreateInfo : public Object {
|
||||
GDCLASS(EntityCreateInfo, Object);
|
||||
|
||||
GDCLASS(EntityCreateInfo, Object);
|
||||
|
||||
public:
|
||||
int get_guid() { return _guid; }
|
||||
void set_guid(int value) { _guid = value; }
|
||||
@ -130,31 +130,21 @@ enum PlayerSendFlags {
|
||||
#ifdef ENTITIES_2D
|
||||
class Entity : public KinematicBody2D {
|
||||
GDCLASS(Entity, KinematicBody2D);
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
class Entity : public KinematicBody {
|
||||
GDCLASS(Entity, KinematicBody);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
public:
|
||||
Entity();
|
||||
~Entity();
|
||||
|
||||
void initialize(EntityCreateInfo *info);
|
||||
|
||||
//EntityType getType();
|
||||
|
||||
void AfterLoadFinished();
|
||||
void Update();
|
||||
void Awake();
|
||||
void Start();
|
||||
void LateUpdate();
|
||||
void init();
|
||||
void update();
|
||||
void Init();
|
||||
void InitVariables();
|
||||
void Update(); //old, remove
|
||||
|
||||
//// Base ////
|
||||
|
||||
@ -163,7 +153,6 @@ public:
|
||||
|
||||
CharacterSkeleton *get_character_skeleton();
|
||||
|
||||
|
||||
int getc_guid();
|
||||
void setc_guid(int value);
|
||||
|
||||
@ -265,9 +254,6 @@ public:
|
||||
Entity *getc_spell_target();
|
||||
void setc_spell_target(Node *p_target);
|
||||
|
||||
//Game_object *gets_spell_cast_game_object() { return _s_spell_cast_game_object; }
|
||||
//void sets_spell_cast_game_object(Game_object *value) { _s_spell_cast_game_object = value; }
|
||||
|
||||
int gets_target_guid() { return _s_target_guid; }
|
||||
int gets_spell_cast_game_object_guid() { return _s_spell_cast_game_object_guid; }
|
||||
|
||||
@ -298,59 +284,73 @@ public:
|
||||
|
||||
//// SpellSystem ////
|
||||
|
||||
void scast_spell(int spell_id);
|
||||
void crequest_spell_cast(int spell_id);
|
||||
void casting_finished(Entity *caster, int spellId, float scale);
|
||||
void update_auras(float delta);
|
||||
void son_before_cast(Ref<SpellCastInfo> info);
|
||||
void son_before_cast_target(Ref<SpellCastInfo> info);
|
||||
//add heal pipeline
|
||||
|
||||
//EventHandlers
|
||||
void son_before_aura_applied(Ref<AuraData> data);
|
||||
void son_after_aura_applied(Ref<AuraData> data);
|
||||
|
||||
void son_hit(Ref<SpellDamageInfo> data);
|
||||
void son_before_damage(Ref<SpellDamageInfo> data);
|
||||
void son_damage_receive(Ref<SpellDamageInfo> data);
|
||||
void son_dealt_damage(Ref<SpellDamageInfo> data);
|
||||
void son_damage_dealt(Ref<SpellDamageInfo> data);
|
||||
|
||||
void son_before_cast(Ref<SpellCastInfo> info);
|
||||
void son_before_cast_target(Ref<SpellCastInfo> info);
|
||||
void son_cast_finished_target(Ref<SpellCastInfo> info);
|
||||
void son_cast_finished(Ref<SpellCastInfo> info);
|
||||
void son_cast_started(Ref<SpellCastInfo> info);
|
||||
void son_cast_failed(Ref<SpellCastInfo> info);
|
||||
|
||||
//Clientside EventHandlers
|
||||
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);
|
||||
|
||||
//Modifiers/Requesters
|
||||
void sapply_passives_damage_receive(Ref<SpellDamageInfo> data);
|
||||
void sapply_passives_damage_deal(Ref<SpellDamageInfo> data);
|
||||
void remove_auras_with_group(Entity *ac, int auraGroup);
|
||||
|
||||
void sremove_aura_expired(Ref<AuraData> aura);
|
||||
void cremove_aura_expired(Ref<AuraData> aura);
|
||||
|
||||
void sremove_aura(Ref<AuraData> aura);
|
||||
void cremove_aura(Ref<AuraData> aura);
|
||||
|
||||
void crefresh_aura(Entity *ac, int auraId, float time);
|
||||
void crefresh_caster_aura(Entity *ac, int auraId, Entity *caster, float time);
|
||||
void caura_added(Entity *ac, int id, float remaining, Entity *caster, int casterGUID);
|
||||
void caura_removed(Entity *ac, int id);
|
||||
void con_cast_failed(Entity *caster, int spellId);
|
||||
void setup_on_player_moves(Entity *bopmccc, Vector<int> *sspells);
|
||||
void con_cast_started(Entity *caster, int spellId);
|
||||
void con_cast_state_changed(Entity *caster, int spellId);
|
||||
void con_cast_finished(Entity *caster, int spellId);
|
||||
void con_spell_cast_success(Entity *caster, int spellId);
|
||||
|
||||
void son_before_aura_applied(Ref<AuraData> data);
|
||||
void son_after_aura_applied(Ref<AuraData> data);
|
||||
|
||||
//rename to remove_aura()
|
||||
virtual void just_remove_aura(int auraId);
|
||||
virtual void remove_aura(Ref<AuraData> data);
|
||||
virtual void add_aura(Ref<AuraData> data);
|
||||
virtual void remove_auras_with_group(int auraGroup);
|
||||
virtual void refresh_aura(int auraId, float time);
|
||||
virtual void refresh_aura(int auraId, Entity *caster, float time);
|
||||
virtual void ssend_refresh_aura(int auraId, float time);
|
||||
virtual void ssend_refresh_caster_aura(int auraId, Entity *caster, float time);
|
||||
virtual void ssend_aura_added(int auraId, float time, Entity *caster);
|
||||
virtual void ssend_aura_removed(int auraId);
|
||||
virtual void creceive_refresh_aura(int auraId, float time);
|
||||
virtual void creceive_refresh_caster_aura(int auraId, Entity *caster, float time);
|
||||
virtual void creceive_aura_added(int id, float remaining, Entity *caster);
|
||||
virtual void creceive_aura_removed(int id);
|
||||
//Spell operations
|
||||
void scast_spell(int spell_id);
|
||||
void crequest_spell_cast(int spell_id);
|
||||
|
||||
//Damage Operations
|
||||
void stake_damage(Ref<SpellDamageInfo> data);
|
||||
void son_damage_dealt(Ref<SpellDamageInfo> data);
|
||||
void sdeal_damage_to(Ref<SpellDamageInfo> data);
|
||||
|
||||
//Aura Manipulation
|
||||
void sadd_aura(Ref<AuraData> aura);
|
||||
void sremove_aura(Ref<AuraData> aura);
|
||||
void sremove_aura_expired(Ref<AuraData> aura);
|
||||
void sremove_aura_dispelled(Ref<AuraData> aura);
|
||||
|
||||
void cadd_aura(Ref<AuraData> aura);
|
||||
void cremove_aura(Ref<AuraData> aura);
|
||||
void cremove_aura_expired(Ref<AuraData> aura);
|
||||
void cremove_aura_dispelled(Ref<AuraData> aura);
|
||||
|
||||
void sremove_auras_with_group(int aura_group);
|
||||
|
||||
int sget_aura_count();
|
||||
Ref<Aura> sget_aura(int index);
|
||||
|
||||
int cget_aura_count();
|
||||
Ref<Aura> cget_aura(int index);
|
||||
|
||||
//Hooks
|
||||
void moved();
|
||||
|
||||
//Update
|
||||
void update_auras(float delta);
|
||||
|
||||
//Old, hook loading update when needed
|
||||
void setup_on_player_moves(Entity *bopmccc, Vector<int> *sspells); //load -> remove, just store spellIds
|
||||
|
||||
//Old stuff, remove or update
|
||||
void take_heal(int heal, bool crit, Entity *dealer);
|
||||
void die();
|
||||
void resurrect();
|
||||
@ -362,38 +362,22 @@ public:
|
||||
void creceive_mana_changed(int amount);
|
||||
void trigger_global_cooldown();
|
||||
void creceive_trigger_global_cooldown();
|
||||
//void Set(bool SIsDead, float SRezTimer, bool SHasGlobalCooldown);
|
||||
|
||||
bool gets_is_dead();
|
||||
bool getc_is_dead();
|
||||
bool getc_has_global_cooldown();
|
||||
bool gets_has_global_cooldown();
|
||||
|
||||
/*
|
||||
void SendDamageTakenMessage(int damage, bool crit, Entity *dealer);
|
||||
void SendHealTakenMessage(int heal, bool crit, Entity *dealer);
|
||||
void SendResurrectMessage();
|
||||
void SendDieMessage();
|
||||
void SendTriggerGCDMessage();
|
||||
Ref<Stat> GetSStatFromId(int id);
|
||||
Ref<Stat> GetCStatFromId(int id);
|
||||
|
||||
static int GetStatIdFromString(String *name);*/
|
||||
|
||||
/*
|
||||
void AddStat(CStatUpdateMsg &msg, Ref<Stat> stat);
|
||||
void AddStat(CStatUpdateMsg &msg, Ref<Stat> stat);
|
||||
void AddStat(CStatUpdateMsg &msg, Ref<Stat> stat);
|
||||
void AddStat(CStatUpdateMsg &msg, Stat *stat);
|
||||
void CHandleStatUpdateMsg(CStatUpdateMsg &msg);
|
||||
void CReadStat(CStatUpdateMsg &msg);
|
||||
void ReadStat(CStatUpdateMsg &msg, Stat *stat);
|
||||
void ReadStat(CStatUpdateMsg &msg, Stat *stat);
|
||||
void ReadStat(CStatUpdateMsg &msg, Stat *stat);
|
||||
*/
|
||||
//void OnStateChanged(PlayerStates newState);
|
||||
void son_death();
|
||||
|
||||
Ref<SpellCastInfo> gets_spell_cast_info();
|
||||
void sets_spell_cast_info(Ref<SpellCastInfo> info);
|
||||
|
||||
Ref<SpellCastInfo> getc_spell_cast_info();
|
||||
void setc_spell_cast_info(Ref<SpellCastInfo> info);
|
||||
|
||||
//// Casting System ////
|
||||
|
||||
void sstart_casting(Ref<SpellCastInfo> info);
|
||||
void sfail_cast();
|
||||
void sdelay_cast();
|
||||
@ -406,32 +390,6 @@ public:
|
||||
void cfinish_cast();
|
||||
void cinterrupt_cast();
|
||||
|
||||
void scast_finished();
|
||||
void ccast_finished();
|
||||
|
||||
void on_cast_state_change();
|
||||
|
||||
void scast_started(Ref<SpellCastInfo> info);
|
||||
|
||||
|
||||
Ref<SpellCastInfo> gets_spell_cast_info();
|
||||
void sets_spell_cast_info(Ref<SpellCastInfo> info);
|
||||
|
||||
Ref<SpellCastInfo> getc_spell_cast_info();
|
||||
void setc_spell_cast_info(Ref<SpellCastInfo> info);
|
||||
|
||||
//networking
|
||||
//void ssend_start_casting(int spellId, float castTime);
|
||||
//void ssend_cast_failed();
|
||||
//void ssend_cast_finished(int spellId);
|
||||
|
||||
//void creceive_start_casting(int spellId, float castTime);
|
||||
//void creceive_cast_finished();
|
||||
//void creceive_cast_failed();
|
||||
|
||||
|
||||
void start_animation_time(float time);
|
||||
|
||||
//// TargetComponent ////
|
||||
|
||||
Entity *gets_target();
|
||||
@ -440,15 +398,6 @@ public:
|
||||
Entity *getc_target();
|
||||
void setc_target(Node *p_target);
|
||||
|
||||
int get_starget_guid();
|
||||
void set_starget_guid(int value);
|
||||
void set_target(Entity *t);
|
||||
void sreceive_ctarget_change(Entity *t);
|
||||
void ai_set_target(Entity *t);
|
||||
void csend_target();
|
||||
void sbroadcast_target_change();
|
||||
void on_state_changed(PlayerStates newState);
|
||||
|
||||
//// TalentComponent ////
|
||||
|
||||
void csend_request_rank_increase(int talentID);
|
||||
@ -465,9 +414,6 @@ public:
|
||||
Vector<int> *gets_spell_data();
|
||||
Vector<int> *getc_spell_data();
|
||||
//HashMap<int, PlayerLocalSpellData> *getLocalSpellData(); //this should be the same object
|
||||
|
||||
bool get_send();
|
||||
void set_send(bool value);
|
||||
//void AddSSpellData(PlayerSpellData *psd);
|
||||
//void AddCSpellData(PlayerSpellData *psd);
|
||||
//void RemoveSSpellData(PlayerSpellData *psd);
|
||||
@ -532,14 +478,6 @@ public:
|
||||
String request_spell_name(int spellId);
|
||||
String request_spell_description(int spellId, int level);
|
||||
|
||||
/*
|
||||
void AddGraphicScripts();
|
||||
static Entity *SEntitySpawn(EntityType type, int classId, int level, String name, int Guid = 0u, CxConnection *connection = null, bool owner = false, Vector3 *position =, Quaternion *rotation =);
|
||||
static Entity *NetworkSpawnCharacter(int Guid, EntityType type, int classId, int level, String name, CxConnection *connection = null, bool owner = false, Vector3 *position =, Quaternion *rotation =);
|
||||
static Entity *CEntitySpawn(int Guid, EntityType type, int classId, int level, String name, CxConnection *connection = null, bool owner = false, Vector3 *position =, Quaternion *rotation =);
|
||||
void OnPlayerSpawneds(Entity *player, bool isClientPlayer, bool is_serverPlayer, bool isLocalPlayerPlayer);
|
||||
*/
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
virtual void _notification(int p_what);
|
||||
@ -553,7 +491,6 @@ private:
|
||||
NodePath _character_skeleton_path;
|
||||
CharacterSkeleton *_character_skeleton;
|
||||
|
||||
|
||||
//// PlayerData ////
|
||||
|
||||
int _s_guid;
|
||||
@ -605,11 +542,9 @@ private:
|
||||
Ref<Stat> _melee_damage;
|
||||
Ref<Stat> _spell_damage;
|
||||
|
||||
|
||||
Ref<Stat> _stats[Stat::STAT_ID_TOTAL_STATS];
|
||||
|
||||
|
||||
|
||||
//old
|
||||
bool sIsDead;
|
||||
bool cIsDead;
|
||||
bool localClient;
|
||||
|
Loading…
Reference in New Issue
Block a user