buff fixes

This commit is contained in:
Light2
2013-09-14 23:18:52 +02:00
parent 4c440dff08
commit aee55c457b
2 changed files with 4 additions and 12 deletions
+1 -6
View File
@@ -116,19 +116,14 @@ 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);
buffer.putInt(0);
} else {
buffer.putInt((int) (totalPlayTime + getRemainingDuration()));
buffer.putInt(0);
buffer.putInt((int) duration);
}
buffer.putLong(ownerId);
buffer.putInt(1); // unk