mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-04-19 21:33:15 +02:00
Same to the global cooldown related methods.
This commit is contained in:
parent
c28fbd155b
commit
1afc3511f8
@ -752,7 +752,7 @@ void Spell::handle_gcd(Ref<SpellCastInfo> info) {
|
||||
Ref<Stat> gcd = info->get_caster()->get_stat(ESS::get_instance()->stat_get_id("Global Cooldown"));
|
||||
|
||||
if (gcd.is_valid())
|
||||
info->get_caster()->sstart_global_cooldown(gcd->gets_current());
|
||||
info->get_caster()->gcd_starts(gcd->gets_current());
|
||||
}
|
||||
}
|
||||
void Spell::handle_cooldown(Ref<SpellCastInfo> info) {
|
||||
@ -921,7 +921,7 @@ void Spell::_sstart_casting(Ref<SpellCastInfo> info) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((get_global_cooldown_enabled() && info->get_caster()->gets_has_global_cooldown()) ||
|
||||
if ((get_global_cooldown_enabled() && info->get_caster()->gcd_hass()) ||
|
||||
info->get_caster()->hass_category_cooldown(get_spell_type()) ||
|
||||
info->get_caster()->hass_cooldown(get_id())) {
|
||||
return;
|
||||
|
@ -1692,7 +1692,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="cstart_global_cooldown">
|
||||
<method name="gcd_startc">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="value" type="float">
|
||||
@ -1970,13 +1970,13 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="getc_global_cooldown">
|
||||
<method name="gcd_getc">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="getc_has_global_cooldown">
|
||||
<method name="gcd_hasc">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
@ -2196,13 +2196,13 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="gets_global_cooldown">
|
||||
<method name="gcd_gets">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="gets_has_global_cooldown">
|
||||
<method name="gcd_hass">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
@ -3604,7 +3604,7 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="sstart_global_cooldown">
|
||||
<method name="gcd_starts">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="value" type="float">
|
||||
|
@ -1523,33 +1523,33 @@ bool Entity::getc_is_dead() {
|
||||
return _c_is_dead;
|
||||
}
|
||||
|
||||
bool Entity::getc_has_global_cooldown() {
|
||||
bool Entity::gcd_hasc() {
|
||||
return _c_gcd >= 0.000000001;
|
||||
}
|
||||
|
||||
bool Entity::gets_has_global_cooldown() {
|
||||
bool Entity::gcd_hass() {
|
||||
return _s_gcd >= 0.000000001;
|
||||
}
|
||||
|
||||
bool Entity::getc_global_cooldown() {
|
||||
float Entity::gcd_getc() {
|
||||
return _c_gcd;
|
||||
}
|
||||
|
||||
bool Entity::gets_global_cooldown() {
|
||||
float Entity::gcd_gets() {
|
||||
return _s_gcd;
|
||||
}
|
||||
|
||||
void Entity::sstart_global_cooldown(float value) {
|
||||
void Entity::gcd_starts(float value) {
|
||||
_s_gcd = value;
|
||||
|
||||
void son_gcd_started();
|
||||
|
||||
emit_signal("sgcd_started", _s_gcd);
|
||||
|
||||
ORPC(cstart_global_cooldown, value);
|
||||
ORPC(gcd_startc, value);
|
||||
}
|
||||
|
||||
void Entity::cstart_global_cooldown(float value) {
|
||||
void Entity::gcd_startc(float value) {
|
||||
_c_gcd = value;
|
||||
|
||||
void con_gcd_started();
|
||||
@ -5751,7 +5751,7 @@ Entity::Entity() {
|
||||
|
||||
//// Global Cooldown ////
|
||||
|
||||
SET_RPC_REMOTE("cstart_global_cooldown");
|
||||
SET_RPC_REMOTE("gcd_startc");
|
||||
|
||||
//// States ////
|
||||
|
||||
@ -7401,12 +7401,12 @@ void Entity::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("cgcd_started", PropertyInfo(Variant::REAL, "value")));
|
||||
ADD_SIGNAL(MethodInfo("cgcd_finished"));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("getc_has_global_cooldown"), &Entity::getc_has_global_cooldown);
|
||||
ClassDB::bind_method(D_METHOD("gets_has_global_cooldown"), &Entity::gets_has_global_cooldown);
|
||||
ClassDB::bind_method(D_METHOD("getc_global_cooldown"), &Entity::getc_global_cooldown);
|
||||
ClassDB::bind_method(D_METHOD("gets_global_cooldown"), &Entity::gets_global_cooldown);
|
||||
ClassDB::bind_method(D_METHOD("sstart_global_cooldown", "value"), &Entity::sstart_global_cooldown);
|
||||
ClassDB::bind_method(D_METHOD("cstart_global_cooldown", "value"), &Entity::cstart_global_cooldown);
|
||||
ClassDB::bind_method(D_METHOD("gcd_hasc"), &Entity::gcd_hasc);
|
||||
ClassDB::bind_method(D_METHOD("gcd_hass"), &Entity::gcd_hass);
|
||||
ClassDB::bind_method(D_METHOD("gcd_getc"), &Entity::gcd_getc);
|
||||
ClassDB::bind_method(D_METHOD("gcd_gets"), &Entity::gcd_gets);
|
||||
ClassDB::bind_method(D_METHOD("gcd_starts", "value"), &Entity::gcd_starts);
|
||||
ClassDB::bind_method(D_METHOD("gcd_startc", "value"), &Entity::gcd_startc);
|
||||
|
||||
//Data
|
||||
ClassDB::bind_method(D_METHOD("adds_data", "data"), &Entity::adds_data);
|
||||
|
@ -417,12 +417,12 @@ public:
|
||||
|
||||
//// Global Cooldown ////
|
||||
|
||||
bool getc_has_global_cooldown();
|
||||
bool gets_has_global_cooldown();
|
||||
bool getc_global_cooldown();
|
||||
bool gets_global_cooldown();
|
||||
void sstart_global_cooldown(float value);
|
||||
void cstart_global_cooldown(float value);
|
||||
bool gcd_hasc();
|
||||
bool gcd_hass();
|
||||
float gcd_getc();
|
||||
float gcd_gets();
|
||||
void gcd_starts(float value);
|
||||
void gcd_startc(float value);
|
||||
|
||||
//// States ////
|
||||
int getc_state();
|
||||
|
Loading…
Reference in New Issue
Block a user