public virtual void RawEncode(COutPacket p, bool bFromCS = false) { p.Encode4(nItemID); var bCashItem = liCashItemSN != 0; p.Encode1(bCashItem); // ring equips have to have their unique ID sent instead of the cash ID // but not during the locker -> storage transaction in the cash shop // not pretty but it works ok if (!bFromCS && (ItemConstants.is_friendship_equip_item(nItemID) || ItemConstants.is_couple_equip_item(nItemID) || ItemConstants.is_wedding_ring_item(nItemID))) { p.Encode8(liSN); } else { if (bCashItem) { p.Encode8(liCashItemSN); } } p.EncodeDateTime(tDateExpire); }