package de.dakror.arise.net.packet;

public class Packet07Renamecity extends Packet
{
	int cityId;
	String newName;
	
	public Packet07Renamecity(int cityId, String newName)
	{
		super(7);
		this.cityId = cityId;
		this.newName = newName;
	}
	
	public Packet07Renamecity(byte[] data)
	{
		super(7);
		String[] parts = readData(data).split(":");
		cityId = Integer.parseInt(parts[0]);
		newName = parts[1];
	}
	
	@Override
	protected byte[] getPacketData()
	{
		return (cityId + ":" + newName).getBytes();
	}
	
	public int getCityId()
	{
		return cityId;
	}
	
	public String getNewName()
	{
		return newName;
	}
}

@@ -32,11 +32,9 @@
 ket;
-%0D%0A%0D
+%0A
 %0Apub
@@ -80,12 +80,10 @@
 cket
-%0D
 %0A%7B
-%0D
 %0A%09in
@@ -91,17 +91,16 @@
  cityId;
-%0D
 %0A%09String
@@ -108,20 +108,18 @@
 newName;
-%0D
 %0A%09
-%0D
 %0A%09public
@@ -165,21 +165,19 @@
 newName)
-%0D
 %0A%09%7B
-%0D
 %0A%09%09super
@@ -180,17 +180,16 @@
 uper(7);
-%0D
 %0A%09%09this.
@@ -204,17 +204,16 @@
  cityId;
-%0D
 %0A%09%09this.
@@ -230,24 +230,21 @@
 newName;
-%0D
 %0A%09%7D
-%0D
 %0A%09
-%0D
 %0A%09public
@@ -275,21 +275,19 @@
 %5B%5D data)
-%0D
 %0A%09%7B
-%0D
 %0A%09%09super
@@ -290,17 +290,16 @@
 uper(7);
-%0D
 %0A%09%09Strin
@@ -336,17 +336,16 @@
 it(%22:%22);
-%0D
 %0A%09%09cityI
@@ -375,17 +375,16 @@
 rts%5B0%5D);
-%0D
 %0A%09%09newNa
@@ -397,24 +397,21 @@
 arts%5B1%5D;
-%0D
 %0A%09%7D
-%0D
 %0A%09
-%0D
 %0A%09@Overr
@@ -413,17 +413,16 @@
 Override
-%0D
 %0A%09protec
@@ -447,21 +447,19 @@
 etData()
-%0D
 %0A%09%7B
-%0D
 %0A%09%09retur
@@ -496,24 +496,21 @@
 Bytes();
-%0D
 %0A%09%7D
-%0D
 %0A%09
-%0D
 %0A%09public
@@ -525,21 +525,19 @@
 CityId()
-%0D
 %0A%09%7B
-%0D
 %0A%09%09retur
@@ -549,16 +549,13 @@
 yId;
-%0D
 %0A%09%7D
-%0D
 %0A%09
-%0D
 %0A%09pu
@@ -582,13 +582,11 @@
 me()
-%0D
 %0A%09%7B
-%0D
 %0A%09%09r
@@ -603,13 +603,10 @@
 ame;
-%0D
 %0A%09%7D
-%0D
 %0A%7D
-%0D
 %0A

index packet07