5d4
< #include <iostream>
11d9
< #include "Serializer.h"
13c11,13
< #include "func.h"
---
> //#include "Serializer.h"
> 
> //#include "func.h"
19,21d18
< ////////////////////////////////////
< // Construction/Destruction
< ////////////////////////////////////
23,42d19
< /* inlined
< Regen::Regen(REGEN* pRegenStruct, AU* pAu, AU* pParentAu)
<     : m_pStruct(pRegenStruct), m_pAU(pAu), m_pParentAU(pParentAu)
< {
<     if (0 != m_pStruct)
<     {
<         // initialize null member from struct
<         if(0 != m_pStruct->au && 0 == m_pAU)
<         {
<             m_pAU = m_pStruct->au;
<         }
<     }
< }
< */
< 
< Regen::~Regen()
< {
<     // do nothing yet, but may need to clean up m_pStruct
< }
< 
48,50c25,26
<         // write REGEN au ID
<         int auID = m_pAU->id;
<         binaryArchive.write( &(auID), sizeof(auID) ); // data, size
---
>         // write RegenStruct auID
>         binaryArchive.write( &(m_pStruct->m_auID), sizeof(m_pStruct->m_auID) ); // data, size
52c28
<         // write REGEN ToAge
---
>         // write RegenStruct ToAge
55c31
<         // write REGEN Offset
---
>         // write RegenStruct Offset
58c34
<         // write REGEN percent
---
>         // write RegenStruct percent
61c37
<         // write REGEN ReEntryLag
---
>         // write RegenStruct ReEntryLag
66,88d41
<         // read regen parent_zone ID
<         //int auID = 0;
<         binaryArchive.read( &(m_auID), sizeof(m_auID) ); // data, size
<         // can't set au of regen until after all the zone's au's are serialized
<         /*
<         if (0 != m_pZoneOfParentAU)
<         {
<             // parent zone of regen's au and parent zone of regen's parent au should be the same!
<             m_pAU = m_pZoneOfParentAU->lookupAUAddress(auID);
<             if (0 == m_pAU)
<             {
<                 string message = "Au not found in au index vector of zone id: ";
<                 message += m_pZoneOfParentAU->getStruct()->id;
<                 throw message;
<             }
< 
<         }
<         else
<         {
<             throw ("Regen's parent Au is null: can't find parent's zone or REGEN's au");
<         }
<         */
< 
90c43
<         REGEN tempStruct;
---
>         RegenStruct tempStruct;
93c46,50
<         // read REGEN ToAge
---
>         // read regen parent_zone ID
>         //int auID = 0;
>         binaryArchive.read( &(m_pStruct->m_auID), sizeof(m_pStruct->m_auID) ); // data, size
> 
>         // read RegenStruct ToAge
96c53
<         // read REGEN Offset
---
>         // read RegenStruct Offset
99c56
<         // read REGEN percent
---
>         // read RegenStruct percent
102c59
<         // read REGEN ReEntryLag
---
>         // read RegenStruct ReEntryLag
105c62
<         this->recreateStruct(m_pStruct->ToAge, m_pStruct->percent, m_pStruct->Offset, m_pStruct->ReEntryLag);
---
>         this->recreateStruct();
109c66
< void Regen::recreateStruct(int toAge, double percent, int offset, int reEntry)
---
> void Regen::recreateStruct()
111,115c68
<     /*if (0 != m_pStruct) // clean up memory if overwriting existing struct
<     {
<         tsb::init_delete_regen(m_pStruct);
<     }*/
<     REGEN* pRegen = 0;
---
>     RegenStruct* pRegen = 0;
118c71,72
<         pRegen = init_make_regen(m_pParentAU, 0 /*m_pAU*/, toAge, percent, offset, reEntry);
---
>         pRegen = init_make_regen(m_pParentAU, m_pStruct->m_auID, m_pStruct->ToAge,
>                                  m_pStruct->percent, m_pStruct->Offset, m_pStruct->ReEntryLag);
