mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-24 11:33:36 +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 String overrideMapKey;
|
||||
|
||||
public int param1;
|
||||
public int param2;
|
||||
public int param3;
|
||||
public DynamicFloat
|
||||
param1 = DynamicFloat.ZERO,
|
||||
param2 = DynamicFloat.ZERO,
|
||||
param3 = DynamicFloat.ZERO;
|
||||
|
||||
public String funcName;
|
||||
public LuaCallType luaCallType;
|
||||
|
@ -57,6 +57,10 @@ public class DynamicFloat {
|
||||
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) {
|
||||
if (!this.dynamic) return constant;
|
||||
|
||||
|
@ -15,9 +15,13 @@ public class ActionExecuteGadgetLua extends AbilityActionHandler {
|
||||
// Investigate if we need to use target
|
||||
|
||||
if (owner.getEntityController() != null) {
|
||||
var param1 = action.param1.getInt(ability);
|
||||
var param2 = action.param2.getInt(ability);
|
||||
var param3 = action.param3.getInt(ability);
|
||||
|
||||
owner
|
||||
.getEntityController()
|
||||
.onClientExecuteRequest(owner, action.param1, action.param2, action.param3);
|
||||
.onClientExecuteRequest(owner, param1, param2, param3);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user