Simplify RuneLite API world

- Use Lombok for World object

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-03-05 17:49:24 +01:00
parent c0e9a502eb
commit 78728c471e
2 changed files with 12 additions and 74 deletions

View File

@@ -71,15 +71,15 @@ public class WorldsService
for (int i = 0; i < num; ++i)
{
World world = new World();
world.setId(buf.getShort() & 0xFFFF);
world.setTypes(getTypes(buf.getInt()));
world.setAddress(readString(buf));
world.setActivity(readString(buf));
world.setLocation(buf.get() & 0xFF);
world.setPlayers(buf.getShort() & 0xFFFF);
final World.WorldBuilder worldBuilder = World.builder()
.id(buf.getShort() & 0xFFFF)
.types(getTypes(buf.getInt()))
.address(readString(buf))
.activity(readString(buf))
.location(buf.get() & 0xFF)
.players(buf.getShort() & 0xFFFF);
worlds.add(world);
worlds.add(worldBuilder.build());
}
WorldResult result = new WorldResult();