More work on vendors

This commit is contained in:
Light2
2014-05-12 17:35:19 +02:00
parent 61bfc193ec
commit 119e58318c
7 changed files with 213 additions and 4 deletions
+4 -2
View File
@@ -142,9 +142,11 @@ public class BazaarService implements INetworkDispatch {
SWGObject terminal = core.objectService.getObject(terminalId);
if(terminal == null)
return;
int permission = 2;
if(terminal.getAttachment("isVendor") != null && (Boolean) terminal.getAttachment("isVendor"))
permission = (long) terminal.getAttachment("vendorOwner") == player.getObjectID() ? 0 : 1;
Point3D pos = terminal.getWorldPosition();
session.write(new IsVendorOwnerResponseMessage(2, 0, terminalId, getVendorUID((TangibleObject) terminal)).serialize());
session.write(new IsVendorOwnerResponseMessage(permission, 0, terminalId, getVendorUID((TangibleObject) terminal)).serialize());
});