/** * Answer when player pick the item * * @param {object} pkt - PACKET.ZC.ITEM_PICKUP_ACK3 */ function onItemPickAnswer( pkt ) { // Fail if (pkt.result !== 0) { ChatBox.addText( DB.getMessage(53), ChatBox.TYPE.ERROR ); return; } ItemObtain.append(); ItemObtain.set(pkt); var it = DB.getItemInfo( pkt.ITID ); ChatBox.addText( DB.getMessage(153).replace('%s', pkt.IsIdentified ? it.identifiedDisplayName : it.unidentifiedDisplayName ).replace('%d', pkt.count ), ChatBox.TYPE.BLUE ); Inventory.addItem(pkt); }
/** * Answer when player pick the item * * @param {object} pkt - PACKET.ZC.ITEM_PICKUP_ACK3 */ function PickAnswer( pkt ) { // Fail if( pkt.result === 6 ) { ChatBox.addText( DB.msgstringtable[53], ChatBox.TYPE.ERROR ); return; } ItemObtain.append(); ItemObtain.set( pkt.ITID, pkt.IsIdentified, pkt.count ); var it = DB.getItemInfo( pkt.ITID ); ChatBox.addText( DB.msgstringtable[153].replace('%s', pkt.IsIdentified ? it.identifiedDisplayName : it.unidentifiedDisplayName ).replace('%d', pkt.count ), ChatBox.TYPE.BLUE ); Inventory.addItem(pkt); }