def.getWieldPos()));
}
affectedPlayer.getInventory().remove(item.id, item.amount,
false);
}
MiscPacketBuilder loginServer = Instance.getServer()
.getLoginConnector().getActionSender();
long playerhash = DataConversions.usernameToHash(player
.getUsername());
long affectedPlayerhash = DataConversions
.usernameToHash(affectedPlayer.getUsername());
for (InvItem item : myOffer) {
affectedPlayer.getInventory().add(item.id, item.amount,
false);
}
for (InvItem item : theirOffer) {
player.getInventory().add(item.id, item.amount, false);
}
boolean senddata = false;
for (InvItem item : myOffer) {
loginServer.tradeLog(playerhash, affectedPlayerhash,
item.id, item.amount, player.getX(), player.getY(),
1);
if (item.amount > 10000000 || Formulae.isRareItem(item.id))
senddata = true;
}
if (senddata)
DataManager.reportHandler.submitDupeData(
DataConversions.hashToUsername(playerhash),
playerhash);
senddata = false;
for (InvItem item : theirOffer) {
loginServer.tradeLog(affectedPlayerhash, playerhash,
item.id, item.amount, player.getX(), player.getY(),
1);
if (item.amount > 10000000 || Formulae.isRareItem(item.id))
senddata = true;
}