| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // AA 09 消费返利活动信息 #tagMCCostRebateInfo
|
| | |
|
| | | public class HAA09_tagMCCostRebateInfo : GameNetPackBasic {
|
| | | public string StartDate; // 开始日期 y-m-d
|
| | | public string EndtDate; // 结束日期 y-m-d
|
| | | public byte IsDayReset; //是否每天重置
|
| | | public ushort LimitLV; // 限制等级
|
| | | public byte AwardDays;
|
| | | public tagMCCostRebateAwardDay[] AwardDayInfo; //每天对应返利信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样
|
| | |
|
| | | public HAA09_tagMCCostRebateInfo () {
|
| | | _cmd = (ushort)0xAA09;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out StartDate, vBytes, NetDataType.Chars, 10);
|
| | | TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10);
|
| | | TransBytes (out IsDayReset, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out LimitLV, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AwardDays, vBytes, NetDataType.BYTE);
|
| | | AwardDayInfo = new tagMCCostRebateAwardDay[AwardDays];
|
| | | for (int i = 0; i < AwardDays; i ++) {
|
| | | AwardDayInfo[i] = new tagMCCostRebateAwardDay();
|
| | | TransBytes (out AwardDayInfo[i].AwardCount, vBytes, NetDataType.BYTE);
|
| | | AwardDayInfo[i].AwardInfo = new tagMCCostRebateAward[AwardDayInfo[i].AwardCount];
|
| | | for (int j = 0; j < AwardDayInfo[i].AwardCount; j ++) {
|
| | | AwardDayInfo[i].AwardInfo[j] = new tagMCCostRebateAward();
|
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardIndex, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].NeedGold, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItemCount, vBytes, NetDataType.BYTE);
|
| | | AwardDayInfo[i].AwardInfo[j].AwardItem = new tagMCCostRebateAwardItem[AwardDayInfo[i].AwardInfo[j].AwardItemCount];
|
| | | for (int k = 0; k < AwardDayInfo[i].AwardInfo[j].AwardItemCount; k ++) {
|
| | | AwardDayInfo[i].AwardInfo[j].AwardItem[k] = new tagMCCostRebateAwardItem();
|
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItem[k].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItem[k].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItem[k].IsBind, vBytes, NetDataType.BYTE);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagMCCostRebateAwardDay {
|
| | | public byte AwardCount; // 奖励档数
|
| | | public tagMCCostRebateAward[] AwardInfo; // 奖励档信息
|
| | | }
|
| | |
|
| | | public struct tagMCCostRebateAwardItem {
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public byte IsBind;
|
| | | }
|
| | |
|
| | | public struct tagMCCostRebateAward {
|
| | | public byte AwardIndex; // 奖励索引 0~31
|
| | | public uint NeedGold; // 所需仙玉数
|
| | | public byte AwardItemCount; // 奖励物品数
|
| | | public tagMCCostRebateAwardItem[] AwardItem; // 奖励物品信息
|
| | | }
|
| | |
|
| | | }
|
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // AA 09 ���ѷ������Ϣ #tagMCCostRebateInfo |
| | | |
| | | |
| | | |
| | | public class HAA09_tagMCCostRebateInfo : GameNetPackBasic { |
| | | |
| | | public string StartDate; // ��ʼ���� y-m-d |
| | | |
| | | public string EndtDate; // �������� y-m-d |
| | | |
| | | public byte IsDayReset; //�Ƿ�ÿ������ |
| | | |
| | | public ushort LimitLV; // ���Ƶȼ� |
| | | |
| | | public byte AwardDays; |
| | | |
| | | public tagMCCostRebateAwardDay[] AwardDayInfo; //ÿ���Ӧ������Ϣ; ���ֻ��һ�죬���ǻ�ж��죬�����ÿ�콱����һ�� |
| | | |
| | | |
| | | |
| | | public HAA09_tagMCCostRebateInfo () { |
| | | |
| | | _cmd = (ushort)0xAA09; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | |
| | | TransBytes (out StartDate, vBytes, NetDataType.Chars, 10); |
| | | |
| | | TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10); |
| | | |
| | | TransBytes (out IsDayReset, vBytes, NetDataType.BYTE); |
| | | |
| | | TransBytes (out LimitLV, vBytes, NetDataType.WORD); |
| | | |
| | | TransBytes (out AwardDays, vBytes, NetDataType.BYTE); |
| | | |
| | | AwardDayInfo = new tagMCCostRebateAwardDay[AwardDays]; |
| | | |
| | | for (int i = 0; i < AwardDays; i ++) { |
| | | |
| | | AwardDayInfo[i] = new tagMCCostRebateAwardDay(); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardCount, vBytes, NetDataType.BYTE); |
| | | |
| | | AwardDayInfo[i].AwardInfo = new tagMCCostRebateAward[AwardDayInfo[i].AwardCount]; |
| | | |
| | | for (int j = 0; j < AwardDayInfo[i].AwardCount; j ++) { |
| | | |
| | | AwardDayInfo[i].AwardInfo[j] = new tagMCCostRebateAward(); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardIndex, vBytes, NetDataType.BYTE); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].NeedGold, vBytes, NetDataType.DWORD); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItemCount, vBytes, NetDataType.BYTE); |
| | | |
| | | AwardDayInfo[i].AwardInfo[j].AwardItem = new tagMCCostRebateAwardItem[AwardDayInfo[i].AwardInfo[j].AwardItemCount]; |
| | | |
| | | for (int k = 0; k < AwardDayInfo[i].AwardInfo[j].AwardItemCount; k ++) { |
| | | |
| | | AwardDayInfo[i].AwardInfo[j].AwardItem[k] = new tagMCCostRebateAwardItem(); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItem[k].ItemID, vBytes, NetDataType.DWORD); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItem[k].ItemCount, vBytes, NetDataType.DWORD); |
| | | |
| | | TransBytes (out AwardDayInfo[i].AwardInfo[j].AwardItem[k].IsBind, vBytes, NetDataType.BYTE); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public struct tagMCCostRebateAwardDay { |
| | | |
| | | public byte AwardCount; // �������� |
| | | |
| | | public tagMCCostRebateAward[] AwardInfo; // ��������Ϣ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public struct tagMCCostRebateAwardItem { |
| | | |
| | | public uint ItemID; |
| | | |
| | | public uint ItemCount; |
| | | |
| | | public byte IsBind; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public struct tagMCCostRebateAward { |
| | | |
| | | public byte AwardIndex; // �������� 0~31 |
| | | |
| | | public uint NeedGold; // ���������� |
| | | |
| | | public byte AwardItemCount; // ������Ʒ�� |
| | | |
| | | public tagMCCostRebateAwardItem[] AwardItem; // ������Ʒ��Ϣ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |