custom races

This commit is contained in:
2024-03-10 18:27:09 -05:00
parent 114ccfee9d
commit 7153216f09
7 changed files with 61 additions and 9 deletions
@@ -805,7 +805,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Update guild binds and tags
//load the new city on the clients
CityZoneMsg czm = new CityZoneMsg(1, treeObject.getLoc().x, treeObject.getLoc().y, treeObject.getLoc().z, cityObject.getCityName(), zoneObject, Enum.CityBoundsType.GRID.extents, Enum.CityBoundsType.GRID.extents);
CityZoneMsg czm = new CityZoneMsg(1, treeObject.getLoc().x, treeObject.getLoc().y, treeObject.getLoc().z, cityObject.getCityName(), zoneObject, Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents);
DispatchMessage.dispatchMsgToAll(czm);
GuildManager.updateAllGuildBinds(playerNation, cityObject);
+2 -2
View File
@@ -43,8 +43,8 @@ public class CityZoneMsg extends ClientNetMsg {
this.locY = locY;
this.locZ = locZ;
this.name = name;
this.radiusX = Enum.CityBoundsType.GRID.extents;
this.radiusZ = Enum.CityBoundsType.GRID.extents;
this.radiusX = Enum.CityBoundsType.ZONE.extents;
this.radiusZ = Enum.CityBoundsType.ZONE.extents;
this.unknown01 = 0;
}
@@ -15,6 +15,7 @@ import engine.net.ByteBufferReader;
import engine.net.ByteBufferWriter;
import engine.net.client.Protocol;
import engine.net.client.msg.ClientNetMsg;
import engine.objects.Race;
public class CommitNewCharacterMsg extends ClientNetMsg {
@@ -175,7 +176,7 @@ public class CommitNewCharacterMsg extends ClientNetMsg {
public int getRace() {
for (int i = 0; i < 23; i++)
if (this.runes[i] > 1999 && this.runes[i] < 2030)
if(Race.getRace(this.runes[i]) != null)
return this.runes[i];
return 0;
}