Duplicate region field removed and inlined.

This commit is contained in:
MagicBot committed 2023-04-29 12:33:21 -04:00
1 parent de38c8727a
commit e554171e22
16 files changed
+95 -101

No files matched your search

@@ -74,18 +74,18 @@ public class SendOwnPlayerMsg extends ClientNetMsg {
*/
@Override
protected void _serialize(ByteBufferWriter writer) {
Regions region = this.ch.getRegion();
Regions region = this.ch.region;
//region loading seralization. serialzes building level and floor. -1 = not in building.
if (region == null){
if (region == null) {
writer.putInt(-1);
writer.putInt(-1);
}else{
} else {
Building regionBuilding = Regions.GetBuildingForRegion(region);
if (regionBuilding == null){
if (regionBuilding == null) {
writer.putInt(-1);
writer.putInt(-1);
}else{
} else {
writer.putInt(region.getLevel());
writer.putInt(region.getRoom());
}