Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/luna-rs/luna into mining
Browse files Browse the repository at this point in the history
  • Loading branch information
lare96 committed Mar 22, 2020
2 parents e7010b5 + 4bccc07 commit f33dc1e
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.luna.net.msg.out;

import io.luna.game.model.mob.Player;
import io.luna.net.codec.ByteMessage;
import io.luna.net.codec.ValueType;
import io.luna.net.msg.GameMessageWriter;

/**
* @author lare96 <http://github.com/lare96>
*/
public class AddGlobalGroundItemMessageWriter extends GameMessageWriter {
// TODO utilize
// 84 = change ground item amount
// 215 = make item global for other players, not yourself. this i

@Override
public ByteMessage write(Player player) {
ByteMessage msg = ByteMessage.message(215);
msg.putShort(4151, ValueType.ADD);
msg.put(0, ValueType.SUBTRACT);
msg.putShort(player.getIndex(), ValueType.ADD);
msg.putShort(1);
return msg;
}
}

0 comments on commit f33dc1e

Please sign in to comment.