Ejemplo n.º 1
0
 internal static void Write(int version, BinaryWriter bw, AWARD_ITEMS_CAND canditems)
 {
     bw.Write(canditems.m_bRandChoose);
     bw.Write(canditems.m_ulAwardItems);
     for (int index = 0; index < canditems.m_AwardItems.Length; index++)
     {
         ITEM_WANTED.Write(version, bw, canditems.m_AwardItems[index]);
     }
 }
Ejemplo n.º 2
0
 internal static void Write(int version, BinaryWriter bw, ITEM_WANTED item)
 {
     bw.Write(item.m_ulItemTemplId);
     bw.Write(item.m_bCommonItem);
     bw.Write(item.m_ulItemNum);
     bw.Write(item.m_fProb);
     if (version < 60)
     {
         return;
     }
     bw.Write(item.m_lPeriod);
 }
Ejemplo n.º 3
0
        internal static AWARD_ITEMS_CAND Read(int version, BinaryReader br)
        {
            AWARD_ITEMS_CAND itemGroup = new AWARD_ITEMS_CAND();

            itemGroup.m_bRandChoose  = br.ReadBoolean();
            itemGroup.m_ulAwardItems = br.ReadInt32();
            itemGroup.m_AwardItems   = new ITEM_WANTED[itemGroup.m_ulAwardItems];
            for (int index = 0; index < itemGroup.m_AwardItems.Length; index++)
            {
                itemGroup.m_AwardItems[index] = ITEM_WANTED.Read(version, br);
            }
            return(itemGroup);
        }