0312 物品叠加数量支持DWORD,背包大小支持WORD
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //07 15 物品剩余时间刷新#tagItemRemainHourRefresh
|
| | |
|
| | | public class DTC0715_tagItemRemainHourRefresh : DtcBasic {
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | H0715_tagItemRemainHourRefresh vNetData = vNetPack as H0715_tagItemRemainHourRefresh;
|
| | | }
|
| | | }
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5228974a662e48144a13b7443a993ae9 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | public class H0704_tagRolePackRefresh : GameNetPackBasic {
|
| | | public byte PackType; //背包类型:rptItem, rptEquip, rptWarehouse
|
| | | public byte ItemPlace;
|
| | | public ushort ItemPlace;
|
| | | public uint ItemID;
|
| | | public byte IsLocked; //是否锁定
|
| | | public ushort ItemCount; //物品数量
|
| | | public uint ItemCount; //物品数量
|
| | | public byte IsBind; //是否绑定
|
| | | public uint GearScore; //评分
|
| | | public uint RemainHour; //剩余时间(小时)
|
| | |
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PackType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemPlace, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemPlace, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out IsLocked, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ItemCount, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out IsBind, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out GearScore, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out RemainHour, vBytes, NetDataType.DWORD);
|
| | |
| | | public class H0706_tagUseItemSuccess : GameNetPackBasic {
|
| | | public uint PlayerID;
|
| | | public uint ItemID;
|
| | | public byte ItemIndex;
|
| | | public ushort ItemIndex;
|
| | |
|
| | | public H0706_tagUseItemSuccess () {
|
| | | _cmd = (ushort)0x0706;
|
| | |
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PlayerID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.WORD);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public class H0707_tagItemCountRefresh : GameNetPackBasic {
|
| | | public byte PackType;
|
| | | public byte ItemIndex;
|
| | | public ushort ItemCount;
|
| | | public ushort ItemIndex;
|
| | | public uint ItemCount;
|
| | |
|
| | | public H0707_tagItemCountRefresh () {
|
| | | _cmd = (ushort)0x0707;
|
| | |
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PackType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ItemCount, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public class H0709_tagClearItem : GameNetPackBasic {
|
| | | public byte PackType;
|
| | | public byte ItemIndex;
|
| | | public ushort ItemIndex;
|
| | | public byte ClearType; //Type = TItemNotifyType
|
| | |
|
| | | public H0709_tagClearItem () {
|
| | |
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PackType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ClearType, vBytes, NetDataType.BYTE);
|
| | | }
|
| | |
|
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //07 15 物品剩余时间刷新#tagItemRemainHourRefresh
|
| | |
|
| | | public class H0715_tagItemRemainHourRefresh : GameNetPackBasic {
|
| | | public byte PackType;
|
| | | public ushort ItemIndex;
|
| | | public uint RemainHour;
|
| | |
|
| | | public H0715_tagItemRemainHourRefresh () {
|
| | | _cmd = (ushort)0x0715;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PackType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.WORD);
|
| | | TransBytes (out RemainHour, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 059c835959d324246a979047ad681c66 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | public class H0722_tagItemDeadLockRefresh : GameNetPackBasic {
|
| | | public byte PackType;
|
| | | public byte ItemIndex;
|
| | | public ushort ItemIndex;
|
| | | public byte IsLock;
|
| | |
|
| | | public H0722_tagItemDeadLockRefresh () {
|
| | |
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PackType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemIndex, vBytes, NetDataType.WORD);
|
| | | TransBytes (out IsLock, vBytes, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | |
| | | ItemInfo = new tagRoleItemRefresh[ItemCount];
|
| | | for (int i = 0; i < ItemCount; i ++) {
|
| | | ItemInfo[i] = new tagRoleItemRefresh();
|
| | | TransBytes (out ItemInfo[i].ItemPlace, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemInfo[i].ItemPlace, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ItemInfo[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out ItemInfo[i].IsLocked, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemInfo[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ItemInfo[i].ItemCount, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out ItemInfo[i].IsBind, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemInfo[i].GearScore, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out ItemInfo[i].RemainHour, vBytes, NetDataType.DWORD);
|
| | |
| | | }
|
| | |
|
| | | public struct tagRoleItemRefresh {
|
| | | public byte ItemPlace;
|
| | | public ushort ItemPlace;
|
| | | public uint ItemID;
|
| | | public byte IsLocked; //是否锁定
|
| | | public ushort ItemCount; //物品数量
|
| | | public uint ItemCount; //物品数量
|
| | | public byte IsBind; //是否绑定
|
| | | public uint GearScore; //评分
|
| | | public uint RemainHour; //剩余时间(小时)
|
| | |
| | | {
|
| | | itemId = (int)serverItem.ItemID;
|
| | | index = serverItem.ItemPlace;
|
| | | count = serverItem.ItemCount;
|
| | | count = (int)serverItem.ItemCount;
|
| | | remainHour = (int)serverItem.RemainHour;
|
| | | userData = serverItem.UserData;
|
| | | guid = serverItem.ItemGUID;
|
| | |
| | | {
|
| | | itemId = (int)serverItem.ItemID;
|
| | | index = serverItem.ItemPlace;
|
| | | count = serverItem.ItemCount;
|
| | | count = (int)serverItem.ItemCount;
|
| | | remainHour = (int)serverItem.RemainHour;
|
| | | userData = serverItem.UserData;
|
| | | guid = serverItem.ItemGUID;
|
| | |
| | | { |
| | | isAddItemCount = true; |
| | | } |
| | | itemModel.RefreshCount(refresh.ItemCount); |
| | | itemModel.RefreshCount((int)refresh.ItemCount); |
| | | |
| | | if (isAddItemCount) |
| | | { |