mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-28 07:20:28 +00:00
fix(AbilityModifier.java): Always parse param[1-3]
as DynamicFloat
s
This commit is contained in:
parent
5167253136
commit
5b9d386e17
@ -345,9 +345,10 @@ public class AbilityModifier implements Serializable {
|
|||||||
public DynamicFloat valueRangeMax;
|
public DynamicFloat valueRangeMax;
|
||||||
public String overrideMapKey;
|
public String overrideMapKey;
|
||||||
|
|
||||||
public int param1;
|
public DynamicFloat
|
||||||
public int param2;
|
param1 = DynamicFloat.ZERO,
|
||||||
public int param3;
|
param2 = DynamicFloat.ZERO,
|
||||||
|
param3 = DynamicFloat.ZERO;
|
||||||
|
|
||||||
public String funcName;
|
public String funcName;
|
||||||
public LuaCallType luaCallType;
|
public LuaCallType luaCallType;
|
||||||
|
@ -57,6 +57,10 @@ public class DynamicFloat {
|
|||||||
return this.get(ability.getAbilitySpecials(), 0f);
|
return this.get(ability.getAbilitySpecials(), 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getInt(Ability ability) {
|
||||||
|
return (int) this.get(ability.getAbilitySpecials(), 0f);
|
||||||
|
}
|
||||||
|
|
||||||
public float get(Object2FloatMap<String> props, float defaultValue) {
|
public float get(Object2FloatMap<String> props, float defaultValue) {
|
||||||
if (!this.dynamic) return constant;
|
if (!this.dynamic) return constant;
|
||||||
|
|
||||||
|
@ -15,9 +15,13 @@ public class ActionExecuteGadgetLua extends AbilityActionHandler {
|
|||||||
// Investigate if we need to use target
|
// Investigate if we need to use target
|
||||||
|
|
||||||
if (owner.getEntityController() != null) {
|
if (owner.getEntityController() != null) {
|
||||||
|
var param1 = action.param1.getInt(ability);
|
||||||
|
var param2 = action.param2.getInt(ability);
|
||||||
|
var param3 = action.param3.getInt(ability);
|
||||||
|
|
||||||
owner
|
owner
|
||||||
.getEntityController()
|
.getEntityController()
|
||||||
.onClientExecuteRequest(owner, action.param1, action.param2, action.param3);
|
.onClientExecuteRequest(owner, param1, param2, param3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user