mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-04-19 21:33:15 +02:00
Updated old style getters/setters to use the new style. E.g. sget_ -> gets_.
This commit is contained in:
parent
a3dda3035f
commit
3e10779dbc
@ -542,18 +542,18 @@ void Aura::sremove(Ref<AuraData> aura) {
|
||||
call("_sremove", aura);
|
||||
}
|
||||
|
||||
void Aura::sremove_expired(Ref<AuraData> aura) {
|
||||
void Aura::removes_expired(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
//always exists
|
||||
call("_sremove_expired", aura);
|
||||
call("_removes_expired", aura);
|
||||
}
|
||||
|
||||
void Aura::sremove_dispell(Ref<AuraData> aura) {
|
||||
void Aura::removes_dispell(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
//always exists
|
||||
call("_sremove_dispell", aura);
|
||||
call("_removes_dispell", aura);
|
||||
}
|
||||
|
||||
void Aura::supdate(Ref<AuraData> aura, float delta) {
|
||||
@ -1105,7 +1105,7 @@ void Aura::_sapply(Ref<AuraApplyInfo> info) {
|
||||
|
||||
Ref<Aura> aura = info->get_aura();
|
||||
|
||||
Ref<AuraData> ad = info->get_target()->sget_aura_by(info->get_caster(), _id);
|
||||
Ref<AuraData> ad = info->get_target()->gets_aura_by(info->get_caster(), _id);
|
||||
|
||||
if (!ad.is_valid()) {
|
||||
ad.instance();
|
||||
@ -1124,12 +1124,12 @@ void Aura::_sapply(Ref<AuraApplyInfo> info) {
|
||||
int t = 1 << i;
|
||||
|
||||
if ((_add_states & t) != 0) {
|
||||
info->get_target()->sadd_state_ref(i);
|
||||
info->get_target()->adds_state_ref(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
info->get_target()->sadd_aura(ad);
|
||||
info->get_target()->adds_aura(ad);
|
||||
} else {
|
||||
ad->set_remaining_time(_time);
|
||||
}
|
||||
@ -1150,7 +1150,7 @@ void Aura::_sdeapply(Ref<AuraData> data) {
|
||||
int t = 1 << i;
|
||||
|
||||
if ((_add_states & t) != 0) {
|
||||
data->get_owner()->sremove_state_ref(i);
|
||||
data->get_owner()->removes_state_ref(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1161,8 +1161,8 @@ void Aura::_sadd(Ref<AuraData> aura) {
|
||||
|
||||
//sapply(aura);
|
||||
|
||||
aura->get_owner()->sremove_aura(aura);
|
||||
aura->get_owner()->sadd_aura(aura);
|
||||
aura->get_owner()->removes_aura(aura);
|
||||
aura->get_owner()->adds_aura(aura);
|
||||
}
|
||||
|
||||
void Aura::_sremove(Ref<AuraData> aura) {
|
||||
@ -1170,23 +1170,23 @@ void Aura::_sremove(Ref<AuraData> aura) {
|
||||
|
||||
sdeapply(aura);
|
||||
|
||||
aura->get_owner()->sremove_aura(aura);
|
||||
aura->get_owner()->removes_aura(aura);
|
||||
}
|
||||
|
||||
void Aura::_sremove_expired(Ref<AuraData> aura) {
|
||||
void Aura::_removes_expired(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(aura->get_owner() == NULL);
|
||||
|
||||
sdeapply(aura);
|
||||
|
||||
aura->get_owner()->sremove_aura_expired(aura);
|
||||
aura->get_owner()->removes_aura_expired(aura);
|
||||
}
|
||||
|
||||
void Aura::_sremove_dispell(Ref<AuraData> aura) {
|
||||
void Aura::_removes_dispell(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(aura->get_owner() == NULL);
|
||||
|
||||
sdeapply(aura);
|
||||
|
||||
aura->get_owner()->sremove_aura_dispelled(aura);
|
||||
aura->get_owner()->removes_aura_dispelled(aura);
|
||||
}
|
||||
|
||||
void Aura::_supdate(Ref<AuraData> aura, float delta) {
|
||||
@ -1222,7 +1222,7 @@ void Aura::_supdate(Ref<AuraData> aura, float delta) {
|
||||
}
|
||||
|
||||
if (remove) {
|
||||
sremove_expired(aura);
|
||||
removes_expired(aura);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1322,24 +1322,24 @@ void Aura::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("sdeapply", "aura"), &Aura::sdeapply);
|
||||
ClassDB::bind_method(D_METHOD("sadd", "aura"), &Aura::sadd);
|
||||
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("removes_expired", "aura"), &Aura::removes_expired);
|
||||
ClassDB::bind_method(D_METHOD("removes_dispell", "aura"), &Aura::removes_dispell);
|
||||
ClassDB::bind_method(D_METHOD("supdate", "aura", "delta"), &Aura::supdate);
|
||||
|
||||
BIND_VMETHOD(MethodInfo("_sapply", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraApplyInfo")));
|
||||
BIND_VMETHOD(MethodInfo("_sdeapply", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_sadd", PropertyInfo(Variant::OBJECT, "aura", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
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("_removes_expired", PropertyInfo(Variant::OBJECT, "info", PROPERTY_HINT_RESOURCE_TYPE, "AuraData")));
|
||||
BIND_VMETHOD(MethodInfo("_removes_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("_sdeapply", "aura"), &Aura::_sdeapply);
|
||||
ClassDB::bind_method(D_METHOD("_sadd", "aura"), &Aura::_sadd);
|
||||
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("_removes_expired", "aura"), &Aura::_removes_expired);
|
||||
ClassDB::bind_method(D_METHOD("_removes_dispell", "aura"), &Aura::_removes_dispell);
|
||||
ClassDB::bind_method(D_METHOD("_supdate", "aura", "delta"), &Aura::_supdate);
|
||||
|
||||
//EventHandlers
|
||||
|
@ -249,8 +249,8 @@ public:
|
||||
void sdeapply(Ref<AuraData> info);
|
||||
void sadd(Ref<AuraData> aura);
|
||||
void sremove(Ref<AuraData> aura);
|
||||
void sremove_expired(Ref<AuraData> aura);
|
||||
void sremove_dispell(Ref<AuraData> aura);
|
||||
void removes_expired(Ref<AuraData> aura);
|
||||
void removes_dispell(Ref<AuraData> aura);
|
||||
void supdate(Ref<AuraData> aura, float delta);
|
||||
|
||||
//EventHandlers
|
||||
@ -365,8 +365,8 @@ protected:
|
||||
virtual void _sdeapply(Ref<AuraData> info);
|
||||
virtual void _sadd(Ref<AuraData> aura);
|
||||
virtual void _sremove(Ref<AuraData> aura);
|
||||
virtual void _sremove_expired(Ref<AuraData> aura);
|
||||
virtual void _sremove_dispell(Ref<AuraData> aura);
|
||||
virtual void _removes_expired(Ref<AuraData> aura);
|
||||
virtual void _removes_dispell(Ref<AuraData> aura);
|
||||
virtual void _supdate(Ref<AuraData> aura, float delta);
|
||||
|
||||
virtual void _setup_aura_data(Ref<AuraData> data, Ref<AuraApplyInfo> info);
|
||||
|
@ -1005,13 +1005,13 @@ void Spell::_handle_effect(Ref<SpellCastInfo> info) {
|
||||
Ref<AuraData> ad;
|
||||
|
||||
if (aura->get_aura_group().is_valid()) {
|
||||
ad = info->get_target()->sget_aura_with_group_by_bind(info->get_caster(), aura->get_aura_group());
|
||||
ad = info->get_target()->gets_aura_with_group_by_bind(info->get_caster(), aura->get_aura_group());
|
||||
} else {
|
||||
ad = info->get_target()->sget_aura_by(info->get_caster(), aura->get_id());
|
||||
ad = info->get_target()->gets_aura_by(info->get_caster(), aura->get_id());
|
||||
}
|
||||
|
||||
if (ad.is_valid()) {
|
||||
info->get_target()->sremove_aura_exact(ad);
|
||||
info->get_target()->removes_aura_exact(ad);
|
||||
}
|
||||
|
||||
Ref<AuraApplyInfo> aai;
|
||||
|
@ -768,7 +768,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="_sremove_dispell" qualifiers="virtual">
|
||||
<method name="_removes_dispell" qualifiers="virtual">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="info" type="AuraData">
|
||||
@ -776,7 +776,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="_sremove_expired" qualifiers="virtual">
|
||||
<method name="_removes_expired" qualifiers="virtual">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="info" type="AuraData">
|
||||
@ -1662,7 +1662,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_dispell">
|
||||
<method name="removes_dispell">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -1670,7 +1670,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_expired">
|
||||
<method name="removes_expired">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
|
@ -817,7 +817,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cadd_aura">
|
||||
<method name="addc_aura">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -825,7 +825,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cadd_aura_rpc">
|
||||
<method name="addc_aura_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="data" type="String">
|
||||
@ -833,7 +833,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cadd_item">
|
||||
<method name="addc_item">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -843,7 +843,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cadd_item_rpc">
|
||||
<method name="addc_item_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -853,7 +853,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cadd_target_item">
|
||||
<method name="addc_target_item">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -863,7 +863,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cadd_target_item_rpc">
|
||||
<method name="addc_target_item_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -1033,7 +1033,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cget_aura">
|
||||
<method name="getc_aura">
|
||||
<return type="AuraData">
|
||||
</return>
|
||||
<argument index="0" name="index" type="int">
|
||||
@ -1041,7 +1041,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cget_aura_count">
|
||||
<method name="getc_aura_count">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
@ -1389,7 +1389,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura">
|
||||
<method name="removec_aura">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -1397,7 +1397,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_dispelled">
|
||||
<method name="removec_aura_dispelled">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -1405,7 +1405,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_dispelled_rpc">
|
||||
<method name="removec_aura_dispelled_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="data" type="String">
|
||||
@ -1413,7 +1413,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_exact">
|
||||
<method name="removec_aura_exact">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -1421,7 +1421,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_exact_rpc">
|
||||
<method name="removec_aura_exact_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="data" type="String">
|
||||
@ -1429,7 +1429,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_expired">
|
||||
<method name="removec_aura_expired">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -1437,7 +1437,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_expired_rpc">
|
||||
<method name="removec_aura_expired_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="data" type="String">
|
||||
@ -1445,7 +1445,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_aura_rpc">
|
||||
<method name="removec_aura_rpc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="data" type="String">
|
||||
@ -1453,7 +1453,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_item">
|
||||
<method name="removec_item">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -1461,7 +1461,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cremove_target_item">
|
||||
<method name="removec_target_item">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -2689,7 +2689,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sadd_aura">
|
||||
<method name="adds_aura">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -2697,7 +2697,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sadd_state_ref">
|
||||
<method name="adds_state_ref">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="state_index" type="int">
|
||||
@ -2905,7 +2905,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sget_aura">
|
||||
<method name="gets_aura">
|
||||
<return type="AuraData">
|
||||
</return>
|
||||
<argument index="0" name="index" type="int">
|
||||
@ -2913,7 +2913,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sget_aura_by">
|
||||
<method name="gets_aura_by">
|
||||
<return type="AuraData">
|
||||
</return>
|
||||
<argument index="0" name="caster" type="Node">
|
||||
@ -2923,13 +2923,13 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sget_aura_count">
|
||||
<method name="gets_aura_count">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sget_aura_with_group_by">
|
||||
<method name="gets_aura_with_group_by">
|
||||
<return type="AuraData">
|
||||
</return>
|
||||
<argument index="0" name="caster" type="Node">
|
||||
@ -3231,7 +3231,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_aura">
|
||||
<method name="removes_aura">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -3239,7 +3239,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_aura_dispelled">
|
||||
<method name="removes_aura_dispelled">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -3247,7 +3247,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_aura_exact">
|
||||
<method name="removes_aura_exact">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -3255,7 +3255,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_aura_expired">
|
||||
<method name="removes_aura_expired">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura" type="AuraData">
|
||||
@ -3263,7 +3263,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_auras_with_group">
|
||||
<method name="removes_auras_with_group">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="aura_group" type="AuraGroup">
|
||||
@ -3271,7 +3271,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_item">
|
||||
<method name="removes_item">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
@ -3279,7 +3279,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_state_ref">
|
||||
<method name="removes_state_ref">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="state_index" type="int">
|
||||
@ -3287,7 +3287,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sremove_target_item">
|
||||
<method name="removes_target_item">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="slot_id" type="int">
|
||||
|
@ -64,8 +64,8 @@ and :ref:`Entity.centity_flags <class_Entity_property_centity_flags>`.
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
For ease of use, Entity refcounts states, this is the enum, used to do it. When you want to add a state to an
|
||||
entity, you need to use See :ref:`Entity.sadd_state_ref() <class_Entity_method_sadd_state_ref>`,
|
||||
when you want to remove states use :ref:`Entity.sremove_state_ref() <class_Entity_method_sremove_state_ref>`.
|
||||
entity, you need to use See :ref:`Entity.adds_state_ref() <class_Entity_method_adds_state_ref>`,
|
||||
when you want to remove states use :ref:`Entity.removes_state_ref() <class_Entity_method_removes_state_ref>`.
|
||||
|
||||
.. note:: This in only available serverside.
|
||||
|
||||
@ -73,13 +73,13 @@ For exmaple let's add a stun to an Entity:
|
||||
|
||||
.. code-block:: gdscript
|
||||
|
||||
entity.sadd_state_ref(EntityEnums.ENTITY_STATE_TYPE_INDEX_STUN)
|
||||
entity.adds_state_ref(EntityEnums.ENTITY_STATE_TYPE_INDEX_STUN)
|
||||
|
||||
Let's remove it:
|
||||
|
||||
.. code-block:: gdscript
|
||||
|
||||
entity.sremove_state_ref(EntityEnums.ENTITY_STATE_TYPE_INDEX_STUN)
|
||||
entity.removes_state_ref(EntityEnums.ENTITY_STATE_TYPE_INDEX_STUN)
|
||||
|
||||
Since these states are refcounted, everything will work, even if you have multiple sources stunning an entity.
|
||||
|
||||
|
@ -457,7 +457,7 @@ void Entity::_setup(Ref<EntityCreateInfo> info) {
|
||||
Ref<AuraData> ad = _s_auras.get(i);
|
||||
|
||||
if (!ad->get_aura()->get_hide())
|
||||
VRPCOBJ(cadd_aura_rpc, JSON::print(ad->to_dict()), cadd_aura, ad);
|
||||
VRPCOBJ(addc_aura_rpc, JSON::print(ad->to_dict()), addc_aura, ad);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _s_resources.size(); ++i) {
|
||||
@ -1333,7 +1333,7 @@ void Entity::setc_state(int state) {
|
||||
emit_signal("cstate_changed", state);
|
||||
}
|
||||
|
||||
void Entity::sadd_state_ref(int state_index) {
|
||||
void Entity::adds_state_ref(int state_index) {
|
||||
ERR_FAIL_INDEX(state_index, EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX);
|
||||
|
||||
if (_s_states[state_index]++ == 0) {
|
||||
@ -1341,7 +1341,7 @@ void Entity::sadd_state_ref(int state_index) {
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::sremove_state_ref(int state_index) {
|
||||
void Entity::removes_state_ref(int state_index) {
|
||||
ERR_FAIL_INDEX(state_index, EntityEnums::ENTITY_STATE_TYPE_INDEX_MAX);
|
||||
|
||||
if (--_s_states[state_index] == 0) {
|
||||
@ -2994,7 +2994,7 @@ void Entity::son_character_level_up(int value) {
|
||||
emit_signal("son_character_level_up", this, value);
|
||||
}
|
||||
|
||||
void Entity::sadd_aura(Ref<AuraData> aura) {
|
||||
void Entity::adds_aura(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
son_before_aura_applied(aura);
|
||||
@ -3008,10 +3008,10 @@ void Entity::sadd_aura(Ref<AuraData> aura) {
|
||||
emit_signal("saura_added", aura);
|
||||
|
||||
if (!aura->get_aura()->get_hide())
|
||||
VRPCOBJ(cadd_aura_rpc, JSON::print(aura->to_dict()), cadd_aura, aura);
|
||||
VRPCOBJ(addc_aura_rpc, JSON::print(aura->to_dict()), addc_aura, aura);
|
||||
}
|
||||
|
||||
void Entity::sremove_aura(Ref<AuraData> aura) {
|
||||
void Entity::removes_aura(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
int aid = aura->get_aura_id();
|
||||
@ -3033,11 +3033,11 @@ void Entity::sremove_aura(Ref<AuraData> aura) {
|
||||
emit_signal("saura_removed", a);
|
||||
|
||||
if (!aura->get_aura()->get_hide())
|
||||
VRPCOBJ(cremove_aura_rpc, JSON::print(aura->to_dict()), cremove_aura, aura);
|
||||
VRPCOBJ(removec_aura_rpc, JSON::print(aura->to_dict()), removec_aura, aura);
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::sremove_aura_exact(Ref<AuraData> aura) {
|
||||
void Entity::removes_aura_exact(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
for (int i = 0; i < _s_auras.size(); i++) {
|
||||
@ -3055,10 +3055,10 @@ void Entity::sremove_aura_exact(Ref<AuraData> aura) {
|
||||
emit_signal("saura_removed", aura);
|
||||
|
||||
if (!aura->get_aura()->get_hide())
|
||||
VRPCOBJ(cremove_aura_rpc, JSON::print(aura->to_dict()), cremove_aura, aura);
|
||||
VRPCOBJ(removec_aura_rpc, JSON::print(aura->to_dict()), removec_aura, aura);
|
||||
}
|
||||
|
||||
void Entity::sremove_aura_expired(Ref<AuraData> aura) {
|
||||
void Entity::removes_aura_expired(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
for (int i = 0; i < _s_auras.size(); i++) {
|
||||
@ -3076,10 +3076,10 @@ void Entity::sremove_aura_expired(Ref<AuraData> aura) {
|
||||
emit_signal("saura_removed_expired", aura);
|
||||
|
||||
if (!aura->get_aura()->get_hide())
|
||||
VRPCOBJ(cremove_aura_rpc, JSON::print(aura->to_dict()), cremove_aura, aura);
|
||||
VRPCOBJ(removec_aura_rpc, JSON::print(aura->to_dict()), removec_aura, aura);
|
||||
}
|
||||
|
||||
void Entity::sremove_aura_dispelled(Ref<AuraData> aura) {
|
||||
void Entity::removes_aura_dispelled(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
for (int i = 0; i < _s_auras.size(); i++) {
|
||||
@ -3097,7 +3097,7 @@ void Entity::sremove_aura_dispelled(Ref<AuraData> aura) {
|
||||
emit_signal("saura_removed_dispelled", aura);
|
||||
|
||||
if (!aura->get_aura()->get_hide())
|
||||
VRPCOBJ(cremove_aura_rpc, JSON::print(aura->to_dict()), cremove_aura, aura);
|
||||
VRPCOBJ(removec_aura_rpc, JSON::print(aura->to_dict()), removec_aura, aura);
|
||||
}
|
||||
|
||||
void Entity::saura_refreshed(Ref<AuraData> aura) {
|
||||
@ -3112,54 +3112,54 @@ void Entity::saura_refreshed(Ref<AuraData> aura) {
|
||||
VRPCOBJ(caura_refreshed_rpc, JSON::print(aura->to_dict()), caura_refreshed, aura);
|
||||
}
|
||||
|
||||
void Entity::cadd_aura_rpc(String data) {
|
||||
void Entity::addc_aura_rpc(String data) {
|
||||
Ref<AuraData> aura;
|
||||
aura.instance();
|
||||
aura->from_dict(data_as_dict(data));
|
||||
aura->set_owner(this);
|
||||
aura->resolve_references(this);
|
||||
|
||||
cadd_aura(aura);
|
||||
addc_aura(aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_rpc(String data) {
|
||||
void Entity::removec_aura_rpc(String data) {
|
||||
Ref<AuraData> aura;
|
||||
aura.instance();
|
||||
aura->from_dict(data_as_dict(data));
|
||||
aura->set_owner(this);
|
||||
aura->resolve_references(this);
|
||||
|
||||
cremove_aura(aura);
|
||||
removec_aura(aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_exact_rpc(String data) {
|
||||
void Entity::removec_aura_exact_rpc(String data) {
|
||||
Ref<AuraData> aura;
|
||||
aura.instance();
|
||||
aura->from_dict(data_as_dict(data));
|
||||
aura->set_owner(this);
|
||||
aura->resolve_references(this);
|
||||
|
||||
cremove_aura_exact(aura);
|
||||
removec_aura_exact(aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_expired_rpc(String data) {
|
||||
void Entity::removec_aura_expired_rpc(String data) {
|
||||
Ref<AuraData> aura;
|
||||
aura.instance();
|
||||
aura->from_dict(data_as_dict(data));
|
||||
aura->set_owner(this);
|
||||
aura->resolve_references(this);
|
||||
|
||||
cremove_aura_expired(aura);
|
||||
removec_aura_expired(aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_dispelled_rpc(String data) {
|
||||
void Entity::removec_aura_dispelled_rpc(String data) {
|
||||
Ref<AuraData> aura;
|
||||
aura.instance();
|
||||
aura->from_dict(data_as_dict(data));
|
||||
aura->set_owner(this);
|
||||
aura->resolve_references(this);
|
||||
|
||||
cremove_aura_dispelled(aura);
|
||||
removec_aura_dispelled(aura);
|
||||
}
|
||||
|
||||
void Entity::caura_refreshed_rpc(String data) {
|
||||
@ -3172,7 +3172,7 @@ void Entity::caura_refreshed_rpc(String data) {
|
||||
caura_refreshed(aura);
|
||||
}
|
||||
|
||||
void Entity::cadd_aura(Ref<AuraData> aura) {
|
||||
void Entity::addc_aura(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
_c_auras.push_back(aura);
|
||||
@ -3182,7 +3182,7 @@ void Entity::cadd_aura(Ref<AuraData> aura) {
|
||||
emit_signal("caura_added", aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura(Ref<AuraData> aura) {
|
||||
void Entity::removec_aura(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
int aid = aura->get_aura_id();
|
||||
@ -3207,7 +3207,7 @@ void Entity::cremove_aura(Ref<AuraData> aura) {
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_exact(Ref<AuraData> aura) {
|
||||
void Entity::removec_aura_exact(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); i++) {
|
||||
@ -3222,7 +3222,7 @@ void Entity::cremove_aura_exact(Ref<AuraData> aura) {
|
||||
emit_signal("caura_removed", aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_dispelled(Ref<AuraData> aura) {
|
||||
void Entity::removec_aura_dispelled(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); i++) {
|
||||
@ -3246,7 +3246,7 @@ void Entity::caura_refreshed(Ref<AuraData> aura) {
|
||||
emit_signal("caura_refreshed", aura);
|
||||
}
|
||||
|
||||
void Entity::cremove_aura_expired(Ref<AuraData> aura) {
|
||||
void Entity::removec_aura_expired(Ref<AuraData> aura) {
|
||||
ERR_FAIL_COND(!aura.is_valid());
|
||||
|
||||
for (int i = 0; i < _c_auras.size(); i++) {
|
||||
@ -3261,17 +3261,17 @@ void Entity::cremove_aura_expired(Ref<AuraData> aura) {
|
||||
emit_signal("caura_removed_expired", aura);
|
||||
}
|
||||
|
||||
int Entity::sget_aura_count() {
|
||||
int Entity::gets_aura_count() {
|
||||
return _s_auras.size();
|
||||
}
|
||||
|
||||
Ref<AuraData> Entity::sget_aura(int index) {
|
||||
Ref<AuraData> Entity::gets_aura(int index) {
|
||||
ERR_FAIL_INDEX_V(index, _s_auras.size(), Ref<AuraData>(NULL));
|
||||
|
||||
return Ref<AuraData>(_s_auras.get(index));
|
||||
}
|
||||
|
||||
Ref<AuraData> Entity::sget_aura_by(Entity *caster, int aura_id) {
|
||||
Ref<AuraData> Entity::gets_aura_by(Entity *caster, int aura_id) {
|
||||
for (int i = 0; i < _s_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _s_auras.get(i);
|
||||
|
||||
@ -3282,7 +3282,7 @@ Ref<AuraData> Entity::sget_aura_by(Entity *caster, int aura_id) {
|
||||
|
||||
return Ref<AuraData>(NULL);
|
||||
}
|
||||
Ref<AuraData> Entity::sget_aura_by_bind(Node *caster, int aura_id) {
|
||||
Ref<AuraData> Entity::gets_aura_by_bind(Node *caster, int aura_id) {
|
||||
if (!caster) {
|
||||
return Ref<AuraData>();
|
||||
}
|
||||
@ -3293,10 +3293,10 @@ Ref<AuraData> Entity::sget_aura_by_bind(Node *caster, int aura_id) {
|
||||
return Ref<AuraData>();
|
||||
}
|
||||
|
||||
return sget_aura_by(e, aura_id);
|
||||
return gets_aura_by(e, aura_id);
|
||||
}
|
||||
|
||||
Ref<AuraData> Entity::sget_aura_with_group_by(Entity *caster, Ref<AuraGroup> aura_group) {
|
||||
Ref<AuraData> Entity::gets_aura_with_group_by(Entity *caster, Ref<AuraGroup> aura_group) {
|
||||
for (int i = 0; i < _s_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _s_auras.get(i);
|
||||
|
||||
@ -3307,7 +3307,7 @@ Ref<AuraData> Entity::sget_aura_with_group_by(Entity *caster, Ref<AuraGroup> aur
|
||||
|
||||
return Ref<AuraData>();
|
||||
}
|
||||
Ref<AuraData> Entity::sget_aura_with_group_by_bind(Node *caster, Ref<AuraGroup> aura_group) {
|
||||
Ref<AuraData> Entity::gets_aura_with_group_by_bind(Node *caster, Ref<AuraGroup> aura_group) {
|
||||
if (!ObjectDB::instance_validate(caster)) {
|
||||
return Ref<AuraData>();
|
||||
}
|
||||
@ -3318,14 +3318,14 @@ Ref<AuraData> Entity::sget_aura_with_group_by_bind(Node *caster, Ref<AuraGroup>
|
||||
return Ref<AuraData>();
|
||||
}
|
||||
|
||||
return sget_aura_with_group_by(e, aura_group);
|
||||
return gets_aura_with_group_by(e, aura_group);
|
||||
}
|
||||
|
||||
int Entity::cget_aura_count() {
|
||||
int Entity::getc_aura_count() {
|
||||
return _s_auras.size();
|
||||
}
|
||||
|
||||
Ref<AuraData> Entity::cget_aura(int index) {
|
||||
Ref<AuraData> Entity::getc_aura(int index) {
|
||||
ERR_FAIL_INDEX_V(index, _c_auras.size(), Ref<AuraData>(NULL));
|
||||
|
||||
return Ref<AuraData>(_c_auras.get(index));
|
||||
@ -4516,19 +4516,19 @@ void Entity::setc_spell_cast_info(Ref<SpellCastInfo> info) {
|
||||
_c_spell_cast_info = Ref<SpellCastInfo>(info);
|
||||
}
|
||||
|
||||
void Entity::sremove_auras_with_group(Ref<AuraGroup> aura_group) {
|
||||
void Entity::removes_auras_with_group(Ref<AuraGroup> aura_group) {
|
||||
for (int i = 0; i < _s_auras.size(); ++i) {
|
||||
Ref<AuraData> ad = _s_auras.get(i);
|
||||
|
||||
if (ad->get_aura()->get_aura_group() == aura_group) {
|
||||
|
||||
cremove_aura(ad);
|
||||
removec_aura(ad);
|
||||
|
||||
_s_auras.remove(i);
|
||||
|
||||
emit_signal("saura_removed", ad);
|
||||
|
||||
cremove_aura(ad);
|
||||
removec_aura(ad);
|
||||
|
||||
i--;
|
||||
}
|
||||
@ -4730,11 +4730,11 @@ void Entity::_sreceive_talent_learn_request(int spec_index, int talent_row, int
|
||||
if (i > 0) {
|
||||
Ref<Aura> pt = tr->get_talent(talent_culomn, i - 1);
|
||||
|
||||
for (int j = 0; j < sget_aura_count(); ++j) {
|
||||
Ref<AuraData> ad = sget_aura(j);
|
||||
for (int j = 0; j < gets_aura_count(); ++j) {
|
||||
Ref<AuraData> ad = gets_aura(j);
|
||||
|
||||
if (ad->get_aura_id() == pt->get_id()) {
|
||||
sremove_aura(ad);
|
||||
removes_aura(ad);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -4805,11 +4805,11 @@ void Entity::removes_talent(int talent) {
|
||||
if (_s_talents[i] == talent) {
|
||||
_s_talents.remove(i);
|
||||
|
||||
for (int j = 0; j < sget_aura_count(); ++j) {
|
||||
Ref<AuraData> ad = sget_aura(j);
|
||||
for (int j = 0; j < gets_aura_count(); ++j) {
|
||||
Ref<AuraData> ad = gets_aura(j);
|
||||
|
||||
if (ad->get_aura_id() == talent) {
|
||||
sremove_aura(ad);
|
||||
removes_aura(ad);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -5001,30 +5001,30 @@ void Entity::cloot(int index) {
|
||||
}
|
||||
|
||||
void Entity::ons_item_added(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {
|
||||
ORPCOBJP(cadd_item_rpc, slot_id, JSON::print(item->to_dict()), cadd_item, slot_id, item);
|
||||
ORPCOBJP(addc_item_rpc, slot_id, JSON::print(item->to_dict()), addc_item, slot_id, item);
|
||||
}
|
||||
void Entity::cadd_item_rpc(int slot_id, String item_data) {
|
||||
void Entity::addc_item_rpc(int slot_id, String item_data) {
|
||||
Ref<ItemInstance> ii;
|
||||
ii.instance();
|
||||
ii->from_dict(data_as_dict(item_data));
|
||||
|
||||
cadd_item(slot_id, ii);
|
||||
addc_item(slot_id, ii);
|
||||
}
|
||||
void Entity::cadd_item(int slot_id, Ref<ItemInstance> item) {
|
||||
void Entity::addc_item(int slot_id, Ref<ItemInstance> item) {
|
||||
ERR_FAIL_COND(!_c_bag.is_valid());
|
||||
|
||||
_c_bag->add_item_at(slot_id, item);
|
||||
}
|
||||
|
||||
void Entity::ons_item_removed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {
|
||||
ORPC(cremove_item, slot_id);
|
||||
ORPC(removec_item, slot_id);
|
||||
}
|
||||
void Entity::sremove_item(const int slot_id) {
|
||||
void Entity::removes_item(const int slot_id) {
|
||||
ERR_FAIL_COND(!_s_bag.is_valid());
|
||||
|
||||
_s_bag->remove_item(slot_id);
|
||||
}
|
||||
void Entity::cremove_item(const int slot_id) {
|
||||
void Entity::removec_item(const int slot_id) {
|
||||
ERR_FAIL_COND(!_c_bag.is_valid());
|
||||
|
||||
_c_bag->remove_item(slot_id);
|
||||
@ -5032,7 +5032,7 @@ void Entity::cremove_item(const int slot_id) {
|
||||
void Entity::cdenyremove_item(const int slot_id) {
|
||||
}
|
||||
void Entity::crequest_remove_item(const int slot_id) {
|
||||
RPCS(sremove_item, slot_id);
|
||||
RPCS(removes_item, slot_id);
|
||||
}
|
||||
|
||||
void Entity::ons_items_swapped(Ref<Bag> bag, int slot_id_1, int slot_id_2) {
|
||||
@ -5073,30 +5073,30 @@ void Entity::ons_overburden_removed(Ref<Bag> bag) {
|
||||
//Target Bag
|
||||
|
||||
void Entity::ons_target_item_added(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {
|
||||
ORPCOBJP(cadd_target_item_rpc, slot_id, JSON::print(item->to_dict()), cadd_target_item, slot_id, item);
|
||||
ORPCOBJP(addc_target_item_rpc, slot_id, JSON::print(item->to_dict()), addc_target_item, slot_id, item);
|
||||
}
|
||||
void Entity::cadd_target_item_rpc(int slot_id, String item_data) {
|
||||
void Entity::addc_target_item_rpc(int slot_id, String item_data) {
|
||||
Ref<ItemInstance> ii;
|
||||
ii.instance();
|
||||
ii->from_dict(data_as_dict(item_data));
|
||||
|
||||
cadd_target_item(slot_id, ii);
|
||||
addc_target_item(slot_id, ii);
|
||||
}
|
||||
void Entity::cadd_target_item(int slot_id, Ref<ItemInstance> item) {
|
||||
void Entity::addc_target_item(int slot_id, Ref<ItemInstance> item) {
|
||||
ERR_FAIL_COND(!_c_target_bag.is_valid());
|
||||
|
||||
_c_target_bag->add_item_at(slot_id, item);
|
||||
}
|
||||
|
||||
void Entity::ons_target_item_removed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id) {
|
||||
ORPC(cremove_target_item, slot_id);
|
||||
ORPC(removec_target_item, slot_id);
|
||||
}
|
||||
void Entity::sremove_target_item(const int slot_id) {
|
||||
void Entity::removes_target_item(const int slot_id) {
|
||||
ERR_FAIL_COND(!_s_target_bag.is_valid());
|
||||
|
||||
_s_target_bag->remove_item(slot_id);
|
||||
}
|
||||
void Entity::cremove_target_item(const int slot_id) {
|
||||
void Entity::removec_target_item(const int slot_id) {
|
||||
ERR_FAIL_COND(!_c_target_bag.is_valid());
|
||||
|
||||
_c_target_bag->remove_item(slot_id);
|
||||
@ -5104,7 +5104,7 @@ void Entity::cremove_target_item(const int slot_id) {
|
||||
void Entity::cdenyremove_target_item(const int slot_id) {
|
||||
}
|
||||
void Entity::crequest_target_remove_item(const int slot_id) {
|
||||
RPCS(sremove_target_item, slot_id);
|
||||
RPCS(removes_target_item, slot_id);
|
||||
}
|
||||
|
||||
void Entity::ons_target_items_swapped(Ref<Bag> bag, int slot_id_1, int slot_id_2) {
|
||||
@ -5699,11 +5699,11 @@ Entity::Entity() {
|
||||
|
||||
//Aura Manipulation
|
||||
|
||||
SET_RPC_REMOTE("cadd_aura_rpc");
|
||||
SET_RPC_REMOTE("cremove_aura_rpc");
|
||||
SET_RPC_REMOTE("cremove_aura_exact_rpc");
|
||||
SET_RPC_REMOTE("cremove_aura_expired_rpc");
|
||||
SET_RPC_REMOTE("cremove_aura_dispelled_rpc");
|
||||
SET_RPC_REMOTE("addc_aura_rpc");
|
||||
SET_RPC_REMOTE("removec_aura_rpc");
|
||||
SET_RPC_REMOTE("removec_aura_exact_rpc");
|
||||
SET_RPC_REMOTE("removec_aura_expired_rpc");
|
||||
SET_RPC_REMOTE("removec_aura_dispelled_rpc");
|
||||
SET_RPC_REMOTE("caura_refreshed_rpc");
|
||||
|
||||
//// Casting System ////
|
||||
@ -5767,18 +5767,18 @@ Entity::Entity() {
|
||||
SET_RPC_REMOTE("sloot");
|
||||
SET_RPC_REMOTE("cloot");
|
||||
|
||||
SET_RPC_REMOTE("cadd_item_rpc");
|
||||
SET_RPC_REMOTE("sremove_item");
|
||||
SET_RPC_REMOTE("cremove_item");
|
||||
SET_RPC_REMOTE("addc_item_rpc");
|
||||
SET_RPC_REMOTE("removes_item");
|
||||
SET_RPC_REMOTE("removec_item");
|
||||
SET_RPC_REMOTE("cdenyremove_item");
|
||||
SET_RPC_REMOTE("sswap_items");
|
||||
SET_RPC_REMOTE("cswap_items");
|
||||
SET_RPC_REMOTE("cdeny_item_swap");
|
||||
SET_RPC_REMOTE("cchange_item_count");
|
||||
|
||||
SET_RPC_REMOTE("cadd_target_item_rpc");
|
||||
SET_RPC_REMOTE("sremove_target_item");
|
||||
SET_RPC_REMOTE("cremove_target_item");
|
||||
SET_RPC_REMOTE("addc_target_item_rpc");
|
||||
SET_RPC_REMOTE("removes_target_item");
|
||||
SET_RPC_REMOTE("removec_target_item");
|
||||
SET_RPC_REMOTE("cdenyremove_target_item");
|
||||
SET_RPC_REMOTE("sswap_target_items");
|
||||
SET_RPC_REMOTE("cswap_target_items");
|
||||
@ -5982,8 +5982,8 @@ void Entity::_son_death() {
|
||||
return
|
||||
|
||||
#warning-ignore:unused_variable
|
||||
for i in range(sget_aura_count()):
|
||||
sremove_aura(sget_aura(0))
|
||||
for i in range(gets_aura_count()):
|
||||
removes_aura(gets_aura(0))
|
||||
|
||||
dead = true
|
||||
|
||||
@ -6439,35 +6439,35 @@ void Entity::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("son_character_level_up", "value"), &Entity::son_character_level_up);
|
||||
|
||||
//Aura Manipulation
|
||||
ClassDB::bind_method(D_METHOD("sadd_aura", "aura"), &Entity::sadd_aura);
|
||||
ClassDB::bind_method(D_METHOD("sremove_aura", "aura"), &Entity::sremove_aura);
|
||||
ClassDB::bind_method(D_METHOD("sremove_aura_exact", "aura"), &Entity::sremove_aura_exact);
|
||||
ClassDB::bind_method(D_METHOD("sremove_aura_expired", "aura"), &Entity::sremove_aura_expired);
|
||||
ClassDB::bind_method(D_METHOD("sremove_aura_dispelled", "aura"), &Entity::sremove_aura_dispelled);
|
||||
ClassDB::bind_method(D_METHOD("adds_aura", "aura"), &Entity::adds_aura);
|
||||
ClassDB::bind_method(D_METHOD("removes_aura", "aura"), &Entity::removes_aura);
|
||||
ClassDB::bind_method(D_METHOD("removes_aura_exact", "aura"), &Entity::removes_aura_exact);
|
||||
ClassDB::bind_method(D_METHOD("removes_aura_expired", "aura"), &Entity::removes_aura_expired);
|
||||
ClassDB::bind_method(D_METHOD("removes_aura_dispelled", "aura"), &Entity::removes_aura_dispelled);
|
||||
//ClassDB::bind_method(D_METHOD("saura_refreshed", "aura"), &Entity::saura_refreshed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("cadd_aura_rpc", "data"), &Entity::cadd_aura_rpc);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_rpc", "data"), &Entity::cremove_aura_rpc);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_exact_rpc", "data"), &Entity::cremove_aura_exact_rpc);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_expired_rpc", "data"), &Entity::cremove_aura_expired_rpc);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_dispelled_rpc", "data"), &Entity::cremove_aura_dispelled_rpc);
|
||||
ClassDB::bind_method(D_METHOD("addc_aura_rpc", "data"), &Entity::addc_aura_rpc);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_rpc", "data"), &Entity::removec_aura_rpc);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_exact_rpc", "data"), &Entity::removec_aura_exact_rpc);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_expired_rpc", "data"), &Entity::removec_aura_expired_rpc);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_dispelled_rpc", "data"), &Entity::removec_aura_dispelled_rpc);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("cadd_aura", "aura"), &Entity::cadd_aura);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura", "aura"), &Entity::cremove_aura);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_exact", "aura"), &Entity::cremove_aura_exact);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_expired", "aura"), &Entity::cremove_aura_expired);
|
||||
ClassDB::bind_method(D_METHOD("cremove_aura_dispelled", "aura"), &Entity::cremove_aura_dispelled);
|
||||
ClassDB::bind_method(D_METHOD("addc_aura", "aura"), &Entity::addc_aura);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura", "aura"), &Entity::removec_aura);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_exact", "aura"), &Entity::removec_aura_exact);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_expired", "aura"), &Entity::removec_aura_expired);
|
||||
ClassDB::bind_method(D_METHOD("removec_aura_dispelled", "aura"), &Entity::removec_aura_dispelled);
|
||||
//ClassDB::bind_method(D_METHOD("caura_refreshed", "aura"), &Entity::caura_refreshed);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("sremove_auras_with_group", "aura_group"), &Entity::sremove_auras_with_group);
|
||||
ClassDB::bind_method(D_METHOD("removes_auras_with_group", "aura_group"), &Entity::removes_auras_with_group);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("sget_aura_count"), &Entity::sget_aura_count);
|
||||
ClassDB::bind_method(D_METHOD("sget_aura", "index"), &Entity::sget_aura);
|
||||
ClassDB::bind_method(D_METHOD("sget_aura_by", "caster", "aura_id"), &Entity::sget_aura_by_bind);
|
||||
ClassDB::bind_method(D_METHOD("sget_aura_with_group_by", "caster", "aura_group"), &Entity::sget_aura_with_group_by_bind);
|
||||
ClassDB::bind_method(D_METHOD("gets_aura_count"), &Entity::gets_aura_count);
|
||||
ClassDB::bind_method(D_METHOD("gets_aura", "index"), &Entity::gets_aura);
|
||||
ClassDB::bind_method(D_METHOD("gets_aura_by", "caster", "aura_id"), &Entity::gets_aura_by_bind);
|
||||
ClassDB::bind_method(D_METHOD("gets_aura_with_group_by", "caster", "aura_group"), &Entity::gets_aura_with_group_by_bind);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("cget_aura_count"), &Entity::cget_aura_count);
|
||||
ClassDB::bind_method(D_METHOD("cget_aura", "index"), &Entity::cget_aura);
|
||||
ClassDB::bind_method(D_METHOD("getc_aura_count"), &Entity::getc_aura_count);
|
||||
ClassDB::bind_method(D_METHOD("getc_aura", "index"), &Entity::getc_aura);
|
||||
|
||||
//Hooks
|
||||
BIND_VMETHOD(MethodInfo("_moved"));
|
||||
@ -6774,8 +6774,8 @@ void Entity::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("setc_state", "state"), &Entity::setc_state);
|
||||
ClassDB::bind_method(D_METHOD("gets_state"), &Entity::gets_state);
|
||||
ClassDB::bind_method(D_METHOD("sets_state", "state"), &Entity::sets_state);
|
||||
ClassDB::bind_method(D_METHOD("sadd_state_ref", "state_index"), &Entity::sadd_state_ref);
|
||||
ClassDB::bind_method(D_METHOD("sremove_state_ref", "state_index"), &Entity::sremove_state_ref);
|
||||
ClassDB::bind_method(D_METHOD("adds_state_ref", "state_index"), &Entity::adds_state_ref);
|
||||
ClassDB::bind_method(D_METHOD("removes_state_ref", "state_index"), &Entity::removes_state_ref);
|
||||
|
||||
//Casting System
|
||||
|
||||
@ -6983,12 +6983,12 @@ void Entity::_bind_methods() {
|
||||
|
||||
//Bag
|
||||
ClassDB::bind_method(D_METHOD("ons_item_added", "bag", "item", "slot_id"), &Entity::ons_item_added);
|
||||
ClassDB::bind_method(D_METHOD("cadd_item_rpc", "slot_id", "item_data"), &Entity::cadd_item_rpc);
|
||||
ClassDB::bind_method(D_METHOD("cadd_item", "slot_id", "item"), &Entity::cadd_item);
|
||||
ClassDB::bind_method(D_METHOD("addc_item_rpc", "slot_id", "item_data"), &Entity::addc_item_rpc);
|
||||
ClassDB::bind_method(D_METHOD("addc_item", "slot_id", "item"), &Entity::addc_item);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("ons_item_removed", "bag", "item", "slot_id"), &Entity::ons_item_removed);
|
||||
ClassDB::bind_method(D_METHOD("sremove_item", "slot_id"), &Entity::sremove_item);
|
||||
ClassDB::bind_method(D_METHOD("cremove_item", "slot_id"), &Entity::cremove_item);
|
||||
ClassDB::bind_method(D_METHOD("removes_item", "slot_id"), &Entity::removes_item);
|
||||
ClassDB::bind_method(D_METHOD("removec_item", "slot_id"), &Entity::removec_item);
|
||||
ClassDB::bind_method(D_METHOD("cdenyremove_item", "slot_id"), &Entity::cdenyremove_item);
|
||||
ClassDB::bind_method(D_METHOD("crequest_remove_item", "slot_id"), &Entity::crequest_remove_item);
|
||||
|
||||
@ -7006,12 +7006,12 @@ void Entity::_bind_methods() {
|
||||
|
||||
//target Bag
|
||||
ClassDB::bind_method(D_METHOD("ons_target_item_added", "bag", "item", "slot_id"), &Entity::ons_target_item_added);
|
||||
ClassDB::bind_method(D_METHOD("cadd_target_item_rpc", "slot_id", "item_data"), &Entity::cadd_target_item_rpc);
|
||||
ClassDB::bind_method(D_METHOD("cadd_target_item", "slot_id", "item"), &Entity::cadd_target_item);
|
||||
ClassDB::bind_method(D_METHOD("addc_target_item_rpc", "slot_id", "item_data"), &Entity::addc_target_item_rpc);
|
||||
ClassDB::bind_method(D_METHOD("addc_target_item", "slot_id", "item"), &Entity::addc_target_item);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("ons_target_item_removed", "bag", "item", "slot_id"), &Entity::ons_target_item_removed);
|
||||
ClassDB::bind_method(D_METHOD("sremove_target_item", "slot_id"), &Entity::sremove_target_item);
|
||||
ClassDB::bind_method(D_METHOD("cremove_target_item", "slot_id"), &Entity::cremove_target_item);
|
||||
ClassDB::bind_method(D_METHOD("removes_target_item", "slot_id"), &Entity::removes_target_item);
|
||||
ClassDB::bind_method(D_METHOD("removec_target_item", "slot_id"), &Entity::removec_target_item);
|
||||
ClassDB::bind_method(D_METHOD("cdenyremove_target_item", "slot_id"), &Entity::cdenyremove_target_item);
|
||||
ClassDB::bind_method(D_METHOD("crequest_target_remove_item", "slot_id"), &Entity::crequest_target_remove_item);
|
||||
|
||||
|
@ -426,8 +426,8 @@ public:
|
||||
int gets_state();
|
||||
void sets_state(int state);
|
||||
|
||||
void sadd_state_ref(int state_index);
|
||||
void sremove_state_ref(int state_index);
|
||||
void adds_state_ref(int state_index);
|
||||
void removes_state_ref(int state_index);
|
||||
|
||||
//// Crafting System ////
|
||||
|
||||
@ -574,40 +574,40 @@ public:
|
||||
void ccharacter_levelup(int value);
|
||||
|
||||
//Aura Manipulation
|
||||
void sadd_aura(Ref<AuraData> aura);
|
||||
void sremove_aura(Ref<AuraData> aura);
|
||||
void sremove_aura_exact(Ref<AuraData> aura);
|
||||
void sremove_aura_expired(Ref<AuraData> aura);
|
||||
void sremove_aura_dispelled(Ref<AuraData> aura);
|
||||
void adds_aura(Ref<AuraData> aura);
|
||||
void removes_aura(Ref<AuraData> aura);
|
||||
void removes_aura_exact(Ref<AuraData> aura);
|
||||
void removes_aura_expired(Ref<AuraData> aura);
|
||||
void removes_aura_dispelled(Ref<AuraData> aura);
|
||||
void saura_refreshed(Ref<AuraData> aura);
|
||||
|
||||
void cadd_aura_rpc(String data);
|
||||
void cremove_aura_rpc(String data);
|
||||
void cremove_aura_exact_rpc(String data);
|
||||
void cremove_aura_expired_rpc(String data);
|
||||
void cremove_aura_dispelled_rpc(String data);
|
||||
void addc_aura_rpc(String data);
|
||||
void removec_aura_rpc(String data);
|
||||
void removec_aura_exact_rpc(String data);
|
||||
void removec_aura_expired_rpc(String data);
|
||||
void removec_aura_dispelled_rpc(String data);
|
||||
void caura_refreshed_rpc(String data);
|
||||
|
||||
void cadd_aura(Ref<AuraData> aura);
|
||||
void cremove_aura(Ref<AuraData> aura);
|
||||
void cremove_aura_exact(Ref<AuraData> aura);
|
||||
void cremove_aura_expired(Ref<AuraData> aura);
|
||||
void cremove_aura_dispelled(Ref<AuraData> aura);
|
||||
void addc_aura(Ref<AuraData> aura);
|
||||
void removec_aura(Ref<AuraData> aura);
|
||||
void removec_aura_exact(Ref<AuraData> aura);
|
||||
void removec_aura_expired(Ref<AuraData> aura);
|
||||
void removec_aura_dispelled(Ref<AuraData> aura);
|
||||
void caura_refreshed(Ref<AuraData> aura);
|
||||
|
||||
void sremove_auras_with_group(Ref<AuraGroup> aura_group);
|
||||
void removes_auras_with_group(Ref<AuraGroup> aura_group);
|
||||
|
||||
//NOTE: No reason for shas_aura_by, just query it, and check for null.
|
||||
int sget_aura_count();
|
||||
Ref<AuraData> sget_aura(int index);
|
||||
Ref<AuraData> sget_aura_by(Entity *caster, int aura_id);
|
||||
Ref<AuraData> sget_aura_by_bind(Node *caster, int aura_id);
|
||||
int gets_aura_count();
|
||||
Ref<AuraData> gets_aura(int index);
|
||||
Ref<AuraData> gets_aura_by(Entity *caster, int aura_id);
|
||||
Ref<AuraData> gets_aura_by_bind(Node *caster, int aura_id);
|
||||
|
||||
Ref<AuraData> sget_aura_with_group_by(Entity *caster, Ref<AuraGroup> aura_group);
|
||||
Ref<AuraData> sget_aura_with_group_by_bind(Node *caster, Ref<AuraGroup> aura_group);
|
||||
Ref<AuraData> gets_aura_with_group_by(Entity *caster, Ref<AuraGroup> aura_group);
|
||||
Ref<AuraData> gets_aura_with_group_by_bind(Node *caster, Ref<AuraGroup> aura_group);
|
||||
|
||||
int cget_aura_count();
|
||||
Ref<AuraData> cget_aura(int index);
|
||||
int getc_aura_count();
|
||||
Ref<AuraData> getc_aura(int index);
|
||||
|
||||
//Hooks
|
||||
void moved();
|
||||
@ -813,13 +813,13 @@ public:
|
||||
void cloot(int index);
|
||||
|
||||
void ons_item_added(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);
|
||||
void cadd_item_rpc(int slot_id, String item_data);
|
||||
void cadd_item(int slot_id, Ref<ItemInstance> item);
|
||||
void addc_item_rpc(int slot_id, String item_data);
|
||||
void addc_item(int slot_id, Ref<ItemInstance> item);
|
||||
|
||||
//Bag
|
||||
void ons_item_removed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);
|
||||
void sremove_item(const int slot_id);
|
||||
void cremove_item(const int slot_id);
|
||||
void removes_item(const int slot_id);
|
||||
void removec_item(const int slot_id);
|
||||
void cdenyremove_item(const int slot_id);
|
||||
void crequest_remove_item(const int slot_id);
|
||||
|
||||
@ -837,12 +837,12 @@ public:
|
||||
|
||||
//Target Bag
|
||||
void ons_target_item_added(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);
|
||||
void cadd_target_item_rpc(int slot_id, String item_data);
|
||||
void cadd_target_item(int slot_id, Ref<ItemInstance> item);
|
||||
void addc_target_item_rpc(int slot_id, String item_data);
|
||||
void addc_target_item(int slot_id, Ref<ItemInstance> item);
|
||||
|
||||
void ons_target_item_removed(Ref<Bag> bag, Ref<ItemInstance> item, int slot_id);
|
||||
void sremove_target_item(const int slot_id);
|
||||
void cremove_target_item(const int slot_id);
|
||||
void removes_target_item(const int slot_id);
|
||||
void removec_target_item(const int slot_id);
|
||||
void cdenyremove_target_item(const int slot_id);
|
||||
void crequest_target_remove_item(const int slot_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user