mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-03 04:16:19 -04:00
Allowed buff Priorities Groups checks.
This commit is contained in:
@@ -38,6 +38,8 @@ public class Buff implements IListObject {
|
||||
|
||||
@NotPersistent
|
||||
private SimpleBufferAllocator bufferPool = new SimpleBufferAllocator();
|
||||
private String group1;
|
||||
private int priority;
|
||||
private float duration;
|
||||
private String buffName;
|
||||
private long ownerId;
|
||||
@@ -70,6 +72,8 @@ public class Buff implements IListObject {
|
||||
if(visitor.getObject(i, 0) != null)
|
||||
if(((String) visitor.getObject(i, 0)).equalsIgnoreCase(buffName)) {
|
||||
|
||||
group1 = (String) visitor.getObject(i, 1);
|
||||
priority = (int) visitor.getObject(i, 4);
|
||||
duration = (Float) visitor.getObject(i, 6);
|
||||
effect1Name = (String) visitor.getObject(i, 7);
|
||||
effect1Value = (Float) visitor.getObject(i, 8);
|
||||
@@ -112,14 +116,19 @@ public class Buff implements IListObject {
|
||||
IoBuffer buffer = bufferPool.allocate(28, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putInt(CRC.StringtoCRC(buffName.toLowerCase()));
|
||||
if(duration < 1) {
|
||||
if(duration > 0) {
|
||||
buffer.putInt((int) (totalPlayTime + getRemainingDuration()));
|
||||
buffer.putInt(0);
|
||||
buffer.putInt((int) duration);
|
||||
} else {
|
||||
buffer.putInt(-1);
|
||||
buffer.putInt(0);
|
||||
buffer.putInt(0);
|
||||
} else {
|
||||
buffer.putInt((int) (totalPlayTime + getRemainingDuration()));
|
||||
buffer.putInt(0);
|
||||
buffer.putInt((int) duration);
|
||||
}
|
||||
buffer.putLong(ownerId);
|
||||
buffer.putInt(1); // unk
|
||||
@@ -130,6 +139,22 @@ public class Buff implements IListObject {
|
||||
|
||||
}
|
||||
|
||||
public String getGroup1() {
|
||||
return group1;
|
||||
}
|
||||
|
||||
public void setGroup1(String group1) {
|
||||
this.group1 = group1;
|
||||
}
|
||||
|
||||
public float getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(int priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public float getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user