[Fix] Fixed visiblity of param2 and param3 in ScriptArgs

Also make use of Accessors chain to need to autogenerate some of the setters.
This commit is contained in:
hartie95 2024-02-17 17:42:59 +01:00
parent 34e9f21cab
commit 0f9db85b24

View File

@ -1,17 +1,20 @@
package org.anime_game_servers.gi_lua.models;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
@Accessors(chain = true)
public class ScriptArgs {
@Getter public int param1;
@Getter int param2;
@Getter int param3;
@Setter @Getter public int param1;
@Setter @Getter public int param2;
@Setter @Getter public int param3;
public int source_eid; // Source entity
public int target_eid;
public int group_id;
public String source; // source string, used for timers
public int type; // lua event type, used by scripts and the ScriptManager
@Getter public int uid; // uid of the player triggering the event
@Setter @Getter public int uid; // uid of the player triggering the event
public ScriptArgs(int groupId, int eventType) {
this(groupId, eventType, 0,0);
@ -28,21 +31,6 @@ public class ScriptArgs {
this.group_id = groupId;
}
public ScriptArgs setParam1(int param1) {
this.param1 = param1;
return this;
}
public ScriptArgs setParam2(int param2) {
this.param2 = param2;
return this;
}
public ScriptArgs setParam3(int param3) {
this.param3 = param3;
return this;
}
public int getSourceEntityId() {
return source_eid;
}
@ -82,9 +70,4 @@ public class ScriptArgs {
this.group_id = groupId;
return this;
}
public ScriptArgs setUid(int uid) {
this.uid = uid;
return this;
}
}