mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
@@ -117,6 +117,7 @@ public class SWGSet<E> implements Set<E>, Serializable {
|
||||
|
||||
public void clear() {
|
||||
synchronized(objectMutex) {
|
||||
set.clear();
|
||||
queue(item(2, null, null, false, false));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public class TangibleObject extends SWGObject implements Serializable {
|
||||
baseline.put("faction", 0);
|
||||
baseline.put("factionStatus", 0);
|
||||
baseline.put("customization", new byte[] { });
|
||||
baseline.put("componentCustomizations", new SWGList<Integer>(this, 3, 7, false));
|
||||
baseline.put("componentCustomizations", new SWGSet<Integer>(this, 3, 7, false));
|
||||
baseline.put("optionsBitmask", 0);
|
||||
baseline.put("uses", 0);
|
||||
baseline.put("conditionDamage", 0);
|
||||
@@ -172,11 +172,12 @@ public class TangibleObject extends SWGObject implements Serializable {
|
||||
notifyClients(getBaseline(3).set("customization", customization), true);
|
||||
}
|
||||
|
||||
public SWGList<Integer> getComponentCustomizations() {
|
||||
return (SWGList<Integer>) getBaseline(3).get("componentCustomizations");
|
||||
public SWGSet<Integer> getComponentCustomizations() {
|
||||
return (SWGSet<Integer>) getBaseline(3).get("componentCustomizations");
|
||||
}
|
||||
|
||||
public void setComponentCustomizations(List<Integer> componentCustomizations) {
|
||||
getComponentCustomizations().clear();
|
||||
getComponentCustomizations().addAll(componentCustomizations);
|
||||
}
|
||||
|
||||
|
||||
@@ -158,9 +158,8 @@ public class WaypointObject extends IntangibleObject implements Serializable, ID
|
||||
|
||||
@Override
|
||||
public byte[] getBytes() {
|
||||
IoBuffer buffer = bufferPool.allocate(50 + name.length() * 2, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
IoBuffer buffer = bufferPool.allocate(42 + name.length() * 2, false).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
buffer.putLong(getObjectID());
|
||||
buffer.putInt(getCellId());
|
||||
|
||||
buffer.putFloat(getPosition().x);
|
||||
|
||||
@@ -83,7 +83,12 @@ public class ConnectionService implements INetworkDispatch {
|
||||
for(Client c : core.getActiveConnectionsMap().values()) {
|
||||
if(c.getParent() != null) {
|
||||
if ((System.currentTimeMillis() - c.getSession().getLastReadTime()) > 300000) {
|
||||
disconnect(c);
|
||||
try {
|
||||
disconnect(c);
|
||||
} catch (Exception e) {
|
||||
System.err.println("ConnectionService:disconnect(): Error disconnecting client.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,6 +780,8 @@ public class BazaarService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
public void addAuctionItem(AuctionItem auctionItem) {
|
||||
if(auctionItem == null)
|
||||
return;
|
||||
auctionItems.add(auctionItem);
|
||||
int commodityNumber = 0;
|
||||
if(commodityLimit.get(auctionItem.getOwnerId()) != null)
|
||||
|
||||
Reference in New Issue
Block a user