#include "RoleDataEx.h"
//-----------------------------------------------------------------------------------------

function< GameObjDbStructEx*(int) >             RoleDataEx::St_GetObjDB             = Empty_GetObjDB;		
function< RoleDataEx*(int) >                    RoleDataEx::St_GetRoleData          = Empty_GetRoleData;		
function< int(int) >                            RoleDataEx::St_GenerateItemVersion  = Empty_GenerateItemVersionFunction;
function< bool(ItemFieldStruct&,int,int) >      RoleDataEx::St_NewItemInit          = Empty_NewitemInit;
function< void(RoleDataEx* , RoleUpdateEvent) > RoleDataEx::St_UpDateEvent          = Empty_UpDateEvent;
function< bool(RoleDataEx*, RoleDataEx*) >      RoleDataEx::St_PrcoessDead          = Empty_PrcoessDead;
function< bool(RoleDataEx*,MagicProcInfo*) >    RoleDataEx::St_SpellMagic           = Empty_SpellMagic;
function< int(int,float,float,float,float,int) >RoleDataEx::St_CreateObj			= Empty_CreateObj;
function< bool(int,int) >						RoleDataEx::St_AddToPartition		= Empty_AddToPartition;

//-----------------------------------------------------------------------------------------
#define Def_Disabled_Update_Flag 0x01
#define Def_Disabled_Insert_Flag 0x02
#define Def_Disabled_Select_Flag 0x04
//-----------------------------------------------------------------------------------------
void RoleDataEx::OnTimeProcAll( )
{
    G_SysTime = timeGetTime() - G_SysTime_Base;
    G_Clock++;

}
ReaderClass<RoleDataEx>*  RoleDataEx::ReaderGMTool( )
{
    static  ReaderClass<RoleDataEx> Reader;
    static  bool    IsReady = false;
    if( IsReady == false )
    {   

        RoleData* Pt = NULL;
        Reader.SetData( "CharField"     , &Pt->Base.CharField                   , ENUM_Type_IntPoint       );
        Reader.SetData( "DBID"          , &Pt->Base.DBID                        , ENUM_Type_IntPoint       , 0								, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag);
        Reader.SetData( "Account_ID"    ,  Pt->Base.Account_ID.Begin()          , ENUM_Type_CharString     , sizeof(Pt->Base.Account_ID)	, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "CreateTime"    ,  Pt->Base.CreateTime.Begin()          , ENUM_Type_CharString     , sizeof(Pt->Base.CreateTime)	, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag);
        Reader.SetData( "LogoutTime"    , &Pt->Base.LogoutTime					, ENUM_Type_IntPoint       );
        Reader.SetData( "Type"          , &Pt->Base.Type                        , ENUM_Type_IntPoint       , 0								, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag);

        Reader.SetData( "Mode"          , &Pt->BaseData.Mode                    , ENUM_Type_IntPoint       );
        Reader.SetData( "RoleName"      ,  Pt->BaseData.RoleName.Begin()        , ENUM_Type_CharString     , sizeof(Pt->BaseData.RoleName) , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "ZoneID"        , &Pt->BaseData.ZoneID                  , ENUM_Type_IntPoint       );
        Reader.SetData( "X"             , &Pt->BaseData.Pos.X                   , ENUM_Type_FloatPoint     );
        Reader.SetData( "Y"             , &Pt->BaseData.Pos.Y                   , ENUM_Type_FloatPoint     );
        Reader.SetData( "Z"             , &Pt->BaseData.Pos.Z                   , ENUM_Type_FloatPoint     );
        Reader.SetData( "Dir"           , &Pt->BaseData.Pos.Dir                 , ENUM_Type_FloatPoint     );
        Reader.SetData( "RoomID"        , &Pt->BaseData.RoomID                  , ENUM_Type_IntPoint       );

        Reader.SetData( "TitleID"       , &Pt->BaseData.TitleID                 , ENUM_Type_IntPoint       );        
        Reader.SetData( "Race"          , &Pt->BaseData.Race                    , ENUM_Type_IntPoint       );        
        Reader.SetData( "Voc"           , &Pt->BaseData.Voc                     , ENUM_Type_IntPoint       );        
        Reader.SetData( "Voc_Sub"       , &Pt->BaseData.Voc_Sub                 , ENUM_Type_IntPoint       );        
        Reader.SetData( "Famous"        , &Pt->BaseData.Famous                  , ENUM_Type_IntPoint       );        
        Reader.SetData( "Sex"           , &Pt->BaseData.Sex                     , ENUM_Type_IntPoint       );        
        Reader.SetData( "HP"            , &Pt->BaseData.HP                      , ENUM_Type_IntPoint       );        
        Reader.SetData( "MP"            , &Pt->BaseData.MP                      , ENUM_Type_IntPoint       );        
        Reader.SetData( "SP"            , &Pt->BaseData.SP                      , ENUM_Type_IntPoint       );        

        Reader.SetData( "ManageLV"      , &Pt->SelfData.ManageLV                , ENUM_Type_IntPoint       );        

        Reader.SetData( "RevZoneID"     , &Pt->SelfData.RevZoneID               , ENUM_Type_IntPoint       );
        Reader.SetData( "RevX"          , &Pt->SelfData.RevPos.X                , ENUM_Type_FloatPoint     );
        Reader.SetData( "RevY"          , &Pt->SelfData.RevPos.Y                , ENUM_Type_FloatPoint     );
        Reader.SetData( "RevZ"          , &Pt->SelfData.RevPos.Z                , ENUM_Type_FloatPoint     );
        Reader.SetData( "RevDir"        , &Pt->SelfData.RevPos.Dir              , ENUM_Type_FloatPoint     );
        Reader.SetData( "LiveTime"      , &Pt->SelfData.LiveTime                , ENUM_Type_IntPoint       );
        Reader.SetData( "OwnerDBID"     , &Pt->SelfData.OwnerDBID               , ENUM_Type_IntPoint       );
        Reader.SetData( "PID"           , &Pt->SelfData.PID                     , ENUM_Type_IntPoint       );
        Reader.SetData( "PlotClassName" ,  Pt->SelfData.PlotClassName.Begin()   , ENUM_Type_CharString     , sizeof(Pt->SelfData.PlotClassName) );
		Reader.SetData( "AutoPlot"      ,  Pt->SelfData.AutoPlot.Begin()        , ENUM_Type_CharString     , sizeof(Pt->SelfData.AutoPlot )		);
        Reader.SetData( "PlayTime"      , &Pt->BaseData.PlayTime                , ENUM_Type_IntPoint       );        
        Reader.SetData( "FaceID"        , &Pt->BaseData.Look.FaceID             , ENUM_Type_IntPoint       );
        Reader.SetData( "HairID"        , &Pt->BaseData.Look.HairID             , ENUM_Type_IntPoint       );
        Reader.SetData( "HairColor"     , &Pt->BaseData.Look.HairColor          , ENUM_Type_IntPoint       );
        Reader.SetData( "BodyColor"     , &Pt->BaseData.Look.BodyColor          , ENUM_Type_IntPoint       );
        Reader.SetData( "OrgObjID"      , &Pt->BaseData.ItemInfo.OrgObjID       , ENUM_Type_IntPoint       );
        Reader.SetData( "DeadCountDown" , &Pt->BaseData.DeadCountDown           , ENUM_Type_IntPoint       );
		Reader.SetData( "RangePlot"     ,  Pt->TempData.RangePlot.Begin()       , ENUM_Type_CharString     , sizeof( Pt->TempData.RangePlot ) );
        Reader.SetData( "TouchPlot"     ,  Pt->TempData.TouchPlot.Begin()       , ENUM_Type_CharString     , sizeof( Pt->TempData.TouchPlot ) );
        Reader.SetData( "DeadPlot"      ,  Pt->TempData.DeadPlot.Begin()        , ENUM_Type_CharString     , sizeof( Pt->TempData.DeadPlot ) );
        Reader.SetData( "SayPlot"       ,  Pt->TempData.SayPlot.Begin()         , ENUM_Type_CharString     , sizeof( Pt->TempData.SayPlot ) );
        Reader.SetData( "TouchPlot_Range", &Pt->TempData.TouchPlot_Range        , ENUM_Type_IntPoint       );
        Reader.SetData( "RangePlot_Range", &Pt->TempData.RangePlot_Range        , ENUM_Type_IntPoint       );
        Reader.SetData( "C_AutoPlot"     ,  Pt->TempData.C_AutoPlot.Begin()     , ENUM_Type_CharString     , sizeof( Pt->TempData.C_AutoPlot ) );


        IsReady = true;
    }      
    return &Reader;
}
ReaderClass<BaseAbilityStruct>*  RoleDataEx::Reader_Ability_GMTools( )
{
    static  ReaderClass<BaseAbilityStruct> Reader;
    static  bool    IsReady = false;
    if( IsReady == false )
    {   
//        char    Buf[256];
        BaseAbilityStruct* Pt = NULL;

        Reader.SetData( "EXP"           , &Pt->EXP             , ENUM_Type_IntPoint        );
        Reader.SetData( "Level"         , &Pt->Level           , ENUM_Type_IntPoint        );
        Reader.SetData( "Point"         , &Pt->Point           , ENUM_Type_IntPoint        );
        Reader.SetData( "SkillPoint"    , &Pt->SkillPoint      , ENUM_Type_IntPoint        );
        Reader.SetData( "STR"           , &Pt->STR             , ENUM_Type_IntPoint        );
        Reader.SetData( "STA"           , &Pt->STA             , ENUM_Type_IntPoint        );
        Reader.SetData( "MND"           , &Pt->MND             , ENUM_Type_IntPoint        );
        Reader.SetData( "INT"           , &Pt->INT             , ENUM_Type_IntPoint        );
        Reader.SetData( "AGI"           , &Pt->AGI             , ENUM_Type_IntPoint        );
/*
        for( int i = 0 ; i < _MAX_NormalSkill_COUNT_ ; i++ )
        {
            sprintf( Buf , "Magic%d" , i+1 );
            Reader.SetData( Buf           , &Pt->MagicPoint[i]             , ENUM_Type_IntPoint        );
        }
		*/
        IsReady = true;
    }      
    return &Reader;
}

ReaderClass<SkillValueStruct>*  RoleDataEx::Reader_SkillValue_GMTools( )
{
    static  ReaderClass<SkillValueStruct> Reader;
    static  bool    IsReady = false;
    if( IsReady == false )
    {   
        char    Buf[256];
        SkillValueStruct* Pt = NULL;


        for( int i = 0 ; i < _MAX_SKILL_COUNT_ ; i++ )
        {
            sprintf( Buf , "SkillValue%d" , i+1 );
            Reader.SetData( Buf           , &Pt->Skill[i]             , ENUM_Type_FloatPoint        );
        }
        IsReady = true;
    }      
    return &Reader;
}
ReaderClass<ItemFieldStruct>*  RoleDataEx::Reader_ItemField_GMTools( )
{
    return NULL;
}

ReaderClass<RoleValueData>*  RoleDataEx::Reader_RoleValueData_GMTools( )
{
    static  ReaderClass<RoleValueData> Reader;
    static  bool    IsReady = false;
    if( IsReady == false )
    {   

        RoleValueData* Pt = NULL;
        Reader.SetData( "BaseStr"               , &Pt->Bas.BaseStr              , ENUM_Type_FloatPoint       );
        Reader.SetData( "BaseSta"               , &Pt->Bas.BaseSta              , ENUM_Type_FloatPoint       );
        Reader.SetData( "BaseInt"               , &Pt->Bas.BaseInt              , ENUM_Type_FloatPoint       );
        Reader.SetData( "BaseMnd"               , &Pt->Bas.BaseMnd              , ENUM_Type_FloatPoint       );
        Reader.SetData( "BaseAgi"               , &Pt->Bas.BaseAgi              , ENUM_Type_FloatPoint       );
        Reader.SetData( "BaseHP"                , &Pt->Bas.BaseHP               , ENUM_Type_FloatPoint       );
        Reader.SetData( "BaseMP"                , &Pt->Bas.BaseMP               , ENUM_Type_FloatPoint       );
//        Reader.SetData( "BaseSP"                , &Pt->Bas.BaseSP               , ENUM_Type_FloatPoint       );

        Reader.SetData( "FinSTR"                , &Pt->Fin.STR                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinSTA"                , &Pt->Fin.STA                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMND"                , &Pt->Fin.MND                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinINT"                , &Pt->Fin.INT                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinAGI"                , &Pt->Fin.AGI                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinLUK"                , &Pt->Fin.LUK                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMaxHP"              , &Pt->Fin.MaxHP                , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMaxMP"              , &Pt->Fin.MaxMP                , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMaxSP"              , &Pt->Fin.MaxSP                , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinATK"                , &Pt->Fin.ATK                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinDEF"                , &Pt->Fin.DEF                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMDEF"               , &Pt->Fin.MDEF                 , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMATK"               , &Pt->Fin.MATK                 , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinHitRate"            , &Pt->Fin.Main_HitRate         , ENUM_Type_FloatPoint       );
		Reader.SetData( "FinHitRate"            , &Pt->Fin.Sec_HitRate          , ENUM_Type_FloatPoint        );
        Reader.SetData( "FinDodgeRate"          , &Pt->Fin.DodgeRate            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMain_CriticalHit"   , &Pt->Fin.Main_CriticalHit     , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinSec_CriticalHit"    , &Pt->Fin.Sec_CriticalHit      , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinParryRate"          , &Pt->Fin.ParryRate            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinReHP"               , &Pt->Fin.ReHP                 , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinReMP"               , &Pt->Fin.ReMP                 , ENUM_Type_FloatPoint       );
//        Reader.SetData( "FinReSP"               , &Pt->Fin.ReSP                 , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMain_ATKSpeed_Per"  , &Pt->Fin.Main_ATKSpeed_Per    , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinSec_ATKSpeed_Per"   , &Pt->Fin.Sec_ATKSpeed_Per     , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMoveSpeed"          , &Pt->Fin.MoveSpeed            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinDMG"                , &Pt->Fin.DMG                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMainHand_DMG"       , &Pt->Fin.Main_DMG				, ENUM_Type_FloatPoint       );
        Reader.SetData( "FinSecondHand_DMG"     , &Pt->Fin.Sec_DMG				, ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMPow"               , &Pt->Fin.MPow                 , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinMAbr"               , &Pt->Fin.MAbr                 , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinAbr"                , &Pt->Fin.Abr                  , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinAB"                 , &Pt->Fin.AB                   , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinResist1"            , &Pt->Fin.Resist._ArrList[0]            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinResist2"            , &Pt->Fin.Resist._ArrList[1]            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinResist3"            , &Pt->Fin.Resist._ArrList[2]            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinResist4"            , &Pt->Fin.Resist._ArrList[3]            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinResist5"            , &Pt->Fin.Resist._ArrList[4]            , ENUM_Type_FloatPoint       );
        Reader.SetData( "FinResist6"            , &Pt->Fin.Resist._ArrList[5]            , ENUM_Type_FloatPoint       );


        IsReady = true;
    }      
    return &Reader;
}
//----------------------------------------------------------------------------------------------------------------
ReaderClass<RoleDataEx>* RoleDataEx::ReaderBase( )
{
    static  ReaderClass<RoleDataEx> Reader;
    static  bool    IsReady = false;
    if( IsReady == false )
    {   
        char    Buf[256];
        RoleData* Pt = NULL;
        Reader.SetData( "CharField"     , &Pt->Base.CharField               , ENUM_Type_IntPoint       );
        Reader.SetData( "DBID"          , &Pt->Base.DBID                    , ENUM_Type_IntPoint       , 0								, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag);
		Reader.SetData( "Account_ID"    ,  Pt->Base.Account_ID.Begin()      , ENUM_Type_CharString     , sizeof(Pt->Base.Account_ID)	, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "CreateTime"    ,  Pt->Base.CreateTime.Begin()      , ENUM_Type_CharString     , sizeof(Pt->Base.CreateTime)	, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag);
        Reader.SetData( "LogoutTime"    , &Pt->Base.LogoutTime              , ENUM_Type_IntPoint       );
        Reader.SetData( "Type"          , &Pt->Base.Type                    , ENUM_Type_IntPoint       , 0								, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag);

        Reader.SetData( "Mode"          , &Pt->BaseData.Mode                , ENUM_Type_IntPoint       );
		Reader.SetData( "RoleName"      ,  Pt->BaseData.RoleName.Begin()    , ENUM_Type_CharString     , sizeof(Pt->BaseData.RoleName)  , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "ZoneID"        , &Pt->BaseData.ZoneID              , ENUM_Type_IntPoint       );
        Reader.SetData( "X"             , &Pt->BaseData.Pos.X               , ENUM_Type_FloatPoint     );
        Reader.SetData( "Y"             , &Pt->BaseData.Pos.Y               , ENUM_Type_FloatPoint     );
        Reader.SetData( "Z"             , &Pt->BaseData.Pos.Z               , ENUM_Type_FloatPoint     );
        Reader.SetData( "Dir"           , &Pt->BaseData.Pos.Dir             , ENUM_Type_FloatPoint     );
        Reader.SetData( "RoomID"        , &Pt->BaseData.RoomID              , ENUM_Type_IntPoint       );

        Reader.SetData( "TitleID"       , &Pt->BaseData.TitleID             , ENUM_Type_IntPoint       );        
        Reader.SetData( "Race"          , &Pt->BaseData.Race                , ENUM_Type_IntPoint       );        
        Reader.SetData( "Voc"           , &Pt->BaseData.Voc                 , ENUM_Type_IntPoint       );        
        Reader.SetData( "Voc_Sub"       , &Pt->BaseData.Voc_Sub             , ENUM_Type_IntPoint       );        
		Reader.SetData( "LV"            , &Pt->TempData.Attr.Level			, ENUM_Type_IntPoint       );        
		Reader.SetData( "LV_Sub"        , &Pt->TempData.Attr.Level_Sub      , ENUM_Type_IntPoint       );        

        Reader.SetData( "Famous"        , &Pt->BaseData.Famous              , ENUM_Type_IntPoint       );        
        Reader.SetData( "Sex"           , &Pt->BaseData.Sex                 , ENUM_Type_IntPoint       );        
        Reader.SetData( "HP"            , &Pt->BaseData.HP                  , ENUM_Type_IntPoint       );        
        Reader.SetData( "MP"            , &Pt->BaseData.MP                  , ENUM_Type_IntPoint       );        

		Reader.SetData( "BodyCount"     , &Pt->BaseData.Body.Count          , ENUM_Type_IntPoint       );        
		Reader.SetData( "BankCount"     , &Pt->BaseData.Bank.Count			, ENUM_Type_IntPoint       );      
		Reader.SetData( "BodyMoney"     , &Pt->BaseData.Body.Money          , ENUM_Type_IntPoint       );        
		Reader.SetData( "BankMoney"     , &Pt->BaseData.Bank.Money			, ENUM_Type_IntPoint       );      



        Reader.SetData( "ManageLV"      , &Pt->SelfData.ManageLV            , ENUM_Type_IntPoint       );        

        Reader.SetData( "RevZoneID"     , &Pt->SelfData.RevZoneID           , ENUM_Type_IntPoint       );
        Reader.SetData( "RevX"          , &Pt->SelfData.RevPos.X            , ENUM_Type_FloatPoint     );
        Reader.SetData( "RevY"          , &Pt->SelfData.RevPos.Y            , ENUM_Type_FloatPoint     );
        Reader.SetData( "RevZ"          , &Pt->SelfData.RevPos.Z            , ENUM_Type_FloatPoint     );
        Reader.SetData( "RevDir"        , &Pt->SelfData.RevPos.Dir          , ENUM_Type_FloatPoint     );

        Reader.SetData( "KeyItem"			, &Pt->BaseData.KeyItem					, ENUM_Type_BinaryData  , sizeof(Pt->BaseData.KeyItem)  );        
        Reader.SetData( "Title"				, &Pt->BaseData.Title                   , ENUM_Type_BinaryData  , sizeof(Pt->BaseData.Title)                 );        
        Reader.SetData( "QuestHistory"		, &Pt->BaseData.Quest.QuestHistory      , ENUM_Type_BinaryData  , sizeof(Pt->BaseData.Quest.QuestHistory)    );        
        Reader.SetData( "QuestKillCount"	, &Pt->BaseData.Quest.iQuestKillCount	, ENUM_Type_BinaryData  , sizeof(Pt->BaseData.Quest.iQuestKillCount) );        

        for( int i = 0 ; i < _MAX_QUEST_COUNT_ ; i++ )
        {
            sprintf( Buf , "Quest%d" , i + 1 );
            Reader.SetData( Buf        , &Pt->BaseData.Quest.QuestLog[i].iQuestID		, ENUM_Type_IntPoint     );

			sprintf( Buf , "QuestMode%d" , i + 1 );
			Reader.SetData( Buf        , &Pt->BaseData.Quest.QuestLog[i].iMode		, ENUM_Type_IntPoint     );
        }


        for( int i = 0 ; i < _MAX_SKILLVALUE_TYPE ; i++ )
        {
            sprintf( Buf , "SkillValue%d" , i + 1 );
            Reader.SetData( Buf        , &Pt->BaseData.SkillValue.Skill[i]  , ENUM_Type_FloatPoint     );
        }

        Reader.SetData( "Buff"          , &Pt->BaseData.Buff                , ENUM_Type_BinaryData  , sizeof(Pt->BaseData.Buff)  );        
        Reader.SetData( "DeadCountDown" , &Pt->BaseData.DeadCountDown       , ENUM_Type_IntPoint     );
        
        //®e»ª
        Reader.SetData( "FaceID"          , &Pt->BaseData.Look.FaceID       , ENUM_Type_IntPoint       );
        Reader.SetData( "HairID"          , &Pt->BaseData.Look.HairID       , ENUM_Type_IntPoint       );
        Reader.SetData( "HairColor"       , &Pt->BaseData.Look.HairColor    , ENUM_Type_IntPoint       );
        Reader.SetData( "BodyColor"       , &Pt->BaseData.Look.BodyColor    , ENUM_Type_IntPoint       );
        Reader.SetData( "OrgObjID"        , &Pt->BaseData.ItemInfo.OrgObjID , ENUM_Type_IntPoint       );
		Reader.SetData( "PartyID"         , &Pt->BaseData.PartyID			, ENUM_Type_IntPoint       );

		Reader.SetData( "FriendNote"		,  Pt->SelfData.FriendList.Note.Begin()			, ENUM_Type_CharString , sizeof(Pt->SelfData.FriendList.Note)   );

		for( int i = 0 ; i < _MAX_FRIENDLIST_COUNT_ ; i++ )
		{
			sprintf( Buf , "BadFriend%d" , i+1  );
			Reader.SetData( Buf			,  Pt->SelfData.FriendList.BadFriendList[i].Begin()	, ENUM_Type_CharString  , sizeof(Pt->SelfData.FriendList.BadFriendList[i])  );
		}

        Reader.SetData( "Coldown"          , &Pt->BaseData.Coldown           , ENUM_Type_BinaryData  , sizeof(Pt->BaseData.Coldown)  );
		Reader.SetData( "RefineColdown"    , &Pt->BaseData.RefineColdown     , ENUM_Type_BinaryData  , sizeof(Pt->BaseData.RefineColdown)  );

        IsReady = true;
    }      
    return &Reader;
}



//----------------------------------------------------------------------------------------------------------------
ReaderClass<NPCData>* RoleDataEx::ReaderNPC( )
{
    static  ReaderClass<NPCData> Reader;
    static  bool    IsReady = false;
    if( IsReady == false )
    {   
        NPCData* Pt = NULL;

        Reader.SetData( "DBID"          , &Pt->DBID                 	, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "CreateTime"    ,  Pt->CreateTime.Begin()   	, ENUM_Type_CharString     , sizeof(Pt->CreateTime) );
        Reader.SetData( "OrgObjID"      ,  &Pt->OrgObjID            	, ENUM_Type_IntPoint       );
        
        Reader.SetData( "Mode"          , &Pt->Mode                 	, ENUM_Type_IntPoint       );
        Reader.SetData( "RoleName"      ,  Pt->RoleName.Begin()     	, ENUM_Type_CharString     , sizeof(Pt->RoleName) );
        Reader.SetData( "ZoneID"        , &Pt->ZoneID               	, ENUM_Type_IntPoint       );
        Reader.SetData( "X"             , &Pt->Pos.X                	, ENUM_Type_FloatPoint     );
        Reader.SetData( "Y"             , &Pt->Pos.Y                	, ENUM_Type_FloatPoint     );
        Reader.SetData( "Z"             , &Pt->Pos.Z                	, ENUM_Type_FloatPoint     );
        Reader.SetData( "Dir"           , &Pt->Pos.Dir              	, ENUM_Type_FloatPoint     );

        Reader.SetData( "LiveTime"      , &Pt->LiveTime             	, ENUM_Type_IntPoint       );        
        Reader.SetData( "OwnerDBID"     , &Pt->OwnerDBID            	, ENUM_Type_IntPoint       );        
        Reader.SetData( "PID"           , &Pt->PID                  	, ENUM_Type_IntPoint       );        
        Reader.SetData( "PlotClassName" ,  Pt->PlotClassName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->PlotClassName) );        
        Reader.SetData( "AutoPlot"      ,  Pt->AutoPlot.Begin()     	, ENUM_Type_CharString     , sizeof(Pt->AutoPlot) );        
        Reader.SetData( "QuestID"       , &Pt->QuestID			    	, ENUM_Type_IntPoint	   );        
        Reader.SetData( "CreateAccount" ,  Pt->CreateAccount.Begin()    , ENUM_Type_CharString	   , sizeof(Pt->CreateAccount) );        
        IsReady = true;
    }      
    return &Reader;
}
//----------------------------------------------------------------------------------------------------------------
ReaderClass<DB_ItemFieldStruct>*  RoleDataEx::ReaderRD_Field( )
{
	static  ReaderClass<DB_ItemFieldStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_ItemFieldStruct* Pt = NULL;
        char    Buf[256];

        Reader.SetData( "DBID"          , &Pt->DBID                 , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "FieldID"       , &Pt->FieldID              , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "FieldType"     , &Pt->FieldType            , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );

        Reader.SetData( "OrgObjID"      , &Pt->Info.OrgObjID        , ENUM_Type_IntPoint        );
        Reader.SetData( "Serial"        , &Pt->Info.Serial          , ENUM_Type_IntPoint        );
        Reader.SetData( "CreateTime"    , &Pt->Info.CreateTime      , ENUM_Type_IntPoint        );
		Reader.SetData( "RuneVolume"	, &Pt->Info.RuneVolume		, ENUM_Type_IntPoint        );
        Reader.SetData( "Count"         , &Pt->Info.Count           , ENUM_Type_IntPoint        );
//        Reader.SetData( "Coldown"       , &Pt->Info.Coldown         , ENUM_Type_IntPoint        );

        Reader.SetData( "Durable"       , &Pt->Info.Durable         , ENUM_Type_IntPoint      );

        Reader.SetData( "Inherent"      , &Pt->Info.Inherent        , ENUM_Type_IntPoint      );
        for( int i = 0 ; i < 4 ; i++ )
        {
            sprintf( Buf , "Rune%d" , i+1 );
            Reader.SetData( Buf           , &Pt->Info.Rune[i]             , ENUM_Type_IntPoint        );
        }

		Reader.SetData( "Mode"       , &Pt->Info.Mode         , ENUM_Type_IntPoint      );

		IsReady = true;
	}

	return &Reader;
}
//----------------------------------------------------------------------------------------------------------------
ReaderClass<DB_AbilityStruct>*  RoleDataEx::ReaderRD_Ability( )
{
	static  ReaderClass<DB_AbilityStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
//        char    Buf[256];
		DB_AbilityStruct* Pt = NULL;
        Reader.SetData( "DBID"          , &Pt->DBID                 , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
        Reader.SetData( "Job"           , &Pt->Job                  , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );


        Reader.SetData( "EXP"           , &Pt->Info.EXP             , ENUM_Type_IntPoint        );
        Reader.SetData( "Level"         , &Pt->Info.Level           , ENUM_Type_IntPoint        );
        Reader.SetData( "Point"         , &Pt->Info.Point           , ENUM_Type_IntPoint        );
        Reader.SetData( "SkillPoint"    , &Pt->Info.SkillPoint      , ENUM_Type_IntPoint        );
        Reader.SetData( "STR"           , &Pt->Info.STR             , ENUM_Type_IntPoint        );
        Reader.SetData( "STA"           , &Pt->Info.STA             , ENUM_Type_IntPoint        );
        Reader.SetData( "MND"           , &Pt->Info.MND             , ENUM_Type_IntPoint        );
        Reader.SetData( "INT"           , &Pt->Info.INT             , ENUM_Type_IntPoint        );
        Reader.SetData( "AGI"           , &Pt->Info.AGI             , ENUM_Type_IntPoint        );
/*
        for( int i = 0 ; i < _MAX_NormalSkill_COUNT_ ; i++ )
        {
            sprintf( Buf , "MagicPoint%d" , i+1 );
            Reader.SetData( Buf           , &Pt->Info.MagicPoint[i]             , ENUM_Type_IntPoint        );
        }
		*/
		IsReady = true;
	}      
	return &Reader;
}
//----------------------------------------------------------------------------------------------------------------

ReaderClass<DB_BaseFriendStruct>*  RoleDataEx::ReaderRD_BaseFriendStruct( )
{
	static  ReaderClass<DB_BaseFriendStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		//char    Buf[256];
		DB_BaseFriendStruct* Pt = NULL;
		Reader.SetData( "DBID"          , &Pt->DBID                 , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
		Reader.SetData( "FieldID"       , &Pt->FieldID              , ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );

		Reader.SetData( "Type"			,  Pt->Info.Group.Begin()	, ENUM_Type_CharString     , sizeof(Pt->Info.Group	));
		Reader.SetData( "Name"			,  Pt->Info.Name.Begin()	, ENUM_Type_CharString     , sizeof(Pt->Info.Name	));
		Reader.SetData( "Note"			,  Pt->Info.Note.Begin()	, ENUM_Type_CharString     , sizeof(Pt->Info.Note	));

		IsReady = true;
	}      
	return &Reader;
}

//----------------------------------------------------------------------------------------------------------------
ReaderClass<DB_MailStruct>*  RoleDataEx::ReaderRD_MailItem( )
{
	static  ReaderClass<DB_MailStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_MailStruct* Pt = NULL;
		Reader.SetData( "GUID"          , &Pt->ItemGUID					, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
		Reader.SetData( "OrgObjID"      , &Pt->MailBase.Item.OrgObjID	, ENUM_Type_IntPoint       );
		Reader.SetData( "Serial"		, &Pt->MailBase.Item.Serial		, ENUM_Type_IntPoint       );
		Reader.SetData( "CreateTime"    , &Pt->MailBase.Item.CreateTime	, ENUM_Type_IntPoint       );
		Reader.SetData( "[Count]"		, &Pt->MailBase.Item.Count		, ENUM_Type_IntPoint       );
//		Reader.SetData( "Coldown"		, &Pt->MailBase.Item.Coldown	, ENUM_Type_IntPoint       );
		Reader.SetData( "Durable"		, &Pt->MailBase.Item.Durable	, ENUM_Type_IntPoint       );
		Reader.SetData( "Inherent"      , &Pt->MailBase.Item.Inherent	, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune1"			, &Pt->MailBase.Item.Rune[0]	, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune2"			, &Pt->MailBase.Item.Rune[1]	, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune3"		    , &Pt->MailBase.Item.Rune[2]	, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune4"			, &Pt->MailBase.Item.Rune[3]	, ENUM_Type_IntPoint       );
		Reader.SetData( "RuneVolume"    , &Pt->MailBase.Item.RuneVolume	, ENUM_Type_IntPoint       );
		Reader.SetData( "Mode"			, &Pt->MailBase.Item.Mode		, ENUM_Type_IntPoint       );
		Reader.SetData( "MailBaseGUID"	, &Pt->GUID						, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
		IsReady = true;
	}      
	return &Reader;
}

ReaderClass<DB_MailStruct>*  RoleDataEx::ReaderRD_MailBase( )
{
	static  ReaderClass<DB_MailStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_MailStruct* Pt = NULL;
		Reader.SetData( "GUID"          , &Pt->GUID								, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
		Reader.SetData( "ItemGUID"      , &Pt->ItemGUID							, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );

		Reader.SetData( "Money"			, &Pt->MailBase.Money					, ENUM_Type_IntPoint       );
		Reader.SetData( "IsSendMoney"	, &Pt->MailBase.IsSendMoney				, ENUM_Type_BitPoint       );
		Reader.SetData( "IsSystem"		, &Pt->MailBase.IsSystem				, ENUM_Type_BitPoint       );
		Reader.SetData( "IsRead"		, &Pt->MailBase.IsRead					, ENUM_Type_BitPoint       );
		Reader.SetData( "OwnerDBID"		, &Pt->OwnerDBID						, ENUM_Type_IntPoint       );
		Reader.SetData( "OrgSendDBID"	, &Pt->OrgSendDBID						, ENUM_Type_IntPoint       );
		Reader.SetData( "OrgSendName"	,  Pt->MailBase.OrgSendName.Begin()		, ENUM_Type_CharString     , sizeof(Pt->MailBase.OrgSendName)	);
		Reader.SetData( "OrgTargetName"	,  Pt->MailBase.OrgTargetName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->MailBase.OrgTargetName) );
		Reader.SetData( "Title"			,  Pt->MailBase.Title.Begin()			, ENUM_Type_CharString     , sizeof(Pt->MailBase.Title)			);
		Reader.SetData( "LiveTime"		, &Pt->MailBase.LiveTime				, ENUM_Type_IntPoint       );
		Reader.SetData( "Content"		,  Pt->Content.Begin()					, ENUM_Type_CharString	   , sizeof(Pt->Content)  );

		IsReady = true;
	}      
	return &Reader;
}
//----------------------------------------------------------------------------------------------------------------
/*
ReaderClass<DB_ACItemStruct>*  RoleDataEx::ReaderRD_ACItem( )
{
	static  ReaderClass<DB_ACItemStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_ACItemStruct* Pt = NULL;
		Reader.SetData( "GUID"          , &Pt->ACDIBD			, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
		Reader.SetData( "OrgObjID"      , &Pt->Item.OrgObjID	, ENUM_Type_IntPoint       );
		Reader.SetData( "Serial"		, &Pt->Item.Serial		, ENUM_Type_IntPoint       );
		Reader.SetData( "CreateTime"    , &Pt->Item.CreateTime	, ENUM_Type_IntPoint       );
		Reader.SetData( "[Count]"		, &Pt->Item.Count		, ENUM_Type_IntPoint       );
		Reader.SetData( "Coldown"		, &Pt->Item.Coldown		, ENUM_Type_IntPoint       );
		Reader.SetData( "Durable"		, &Pt->Item.Durable		, ENUM_Type_IntPoint       );
		Reader.SetData( "Inherent"      , &Pt->Item.Inherent	, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune1"			, &Pt->Item.Rune[0]		, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune2"			, &Pt->Item.Rune[1]		, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune3"		    , &Pt->Item.Rune[2]		, ENUM_Type_IntPoint       );
		Reader.SetData( "Rune4"			, &Pt->Item.Rune[3]		, ENUM_Type_IntPoint       );
		Reader.SetData( "RuneVolume"    , &Pt->Item.RuneVolume	, ENUM_Type_IntPoint       );
		Reader.SetData( "Mode"			, &Pt->Item.Mode		, ENUM_Type_IntPoint       );
		IsReady = true;
	}      
	return &Reader;
}
*/
ReaderClass<DB_ACItemStruct>*  RoleDataEx::ReaderRD_ACBase( )
{
	static  ReaderClass<DB_ACItemStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_ACItemStruct* Pt = NULL;

		Reader.SetData( "GUID"          , &Pt->GUID				, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );
		Reader.SetData( "LiveTime"      , &Pt->LiveTime				, ENUM_Type_IntPoint       );
		Reader.SetData( "NowPrices"     , &Pt->NowPrices			, ENUM_Type_IntPoint       );
		Reader.SetData( "BuyOutPrices"  , &Pt->BuyOutPrices			, ENUM_Type_IntPoint       );
		Reader.SetData( "SellerDBID"	, &Pt->SellerDBID			, ENUM_Type_IntPoint       );
		Reader.SetData( "BuyerDBID"		, &Pt->BuyerDBID			, ENUM_Type_IntPoint       );
		Reader.SetData( "SellerName"	,  Pt->SellerName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->SellerName)	);
		Reader.SetData( "BuyerName"		,  Pt->BuyerName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->BuyerName)	);

		Reader.SetData( "ItemName"		,  Pt->ItemName.Begin()		, ENUM_Type_CharString     , sizeof(Pt->ItemName)	);
		Reader.SetData( "Type1"     	, &Pt->ItemType[0]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Type2"     	, &Pt->ItemType[1]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Type3"     	, &Pt->ItemType[2]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "ItemLevel"		, &Pt->ItemLevel			, ENUM_Type_IntPoint       	);
		Reader.SetData( "EqWearType"	, &Pt->EQType._Skill		, ENUM_Type_IntPoint		);
		Reader.SetData( "Rare"			, &Pt->Rare					, ENUM_Type_IntPoint		);
		Reader.SetData( "SexType"		, &Pt->SexType._Sex			, ENUM_Type_IntPoint		);
		Reader.SetData( "RaceType"		, &Pt->RaceType._Race		, ENUM_Type_IntPoint		);


		Reader.SetData( "OrgObjID"      , &Pt->Item.OrgObjID		, ENUM_Type_IntPoint       	);
		Reader.SetData( "Serial"		, &Pt->Item.Serial			, ENUM_Type_IntPoint       	);
		Reader.SetData( "CreateTime"    , &Pt->Item.CreateTime		, ENUM_Type_IntPoint       	);
		Reader.SetData( "[Count]"		, &Pt->Item.Count			, ENUM_Type_IntPoint       	);
//		Reader.SetData( "Coldown"		, &Pt->Item.Coldown			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Durable"		, &Pt->Item.Durable			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Inherent"      , &Pt->Item.Inherent		, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune1"			, &Pt->Item.Rune[0]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune2"			, &Pt->Item.Rune[1]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune3"		    , &Pt->Item.Rune[2]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune4"			, &Pt->Item.Rune[3]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "RuneVolume"    , &Pt->Item.RuneVolume		, ENUM_Type_IntPoint       	);
		Reader.SetData( "Mode"			, &Pt->Item.Mode			, ENUM_Type_IntPoint       	);
		IsReady = true;
	}      
	return &Reader;
}

ReaderClass<DB_ACItemHistoryStruct>*	RoleDataEx::ReaderRD_ACHistory( )
{
	static  ReaderClass<DB_ACItemHistoryStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_ACItemHistoryStruct* Pt = NULL;
		Reader.SetData( "GUID"          , &Pt->GUID					, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );		
		Reader.SetData( "SellerName"	,  Pt->SellerName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->SellerName)	);
		Reader.SetData( "BuyerName"		,  Pt->BuyerName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->BuyerName)	);
		Reader.SetData( "DateTime"		, &Pt->Date					, ENUM_Type_IntPoint		);
		Reader.SetData( "Prices"		, &Pt->Prices				, ENUM_Type_IntPoint       	);
		
		Reader.SetData( "OrgObjID"      , &Pt->Item.OrgObjID		, ENUM_Type_IntPoint       	);
		Reader.SetData( "Serial"		, &Pt->Item.Serial			, ENUM_Type_IntPoint       	);
		Reader.SetData( "CreateTime"    , &Pt->Item.CreateTime		, ENUM_Type_IntPoint       	);
		Reader.SetData( "[Count]"		, &Pt->Item.Count			, ENUM_Type_IntPoint       	);
//		Reader.SetData( "Coldown"		, &Pt->Item.Coldown			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Durable"		, &Pt->Item.Durable			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Inherent"      , &Pt->Item.Inherent		, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune1"			, &Pt->Item.Rune[0]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune2"			, &Pt->Item.Rune[1]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune3"		    , &Pt->Item.Rune[2]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "Rune4"			, &Pt->Item.Rune[3]			, ENUM_Type_IntPoint       	);
		Reader.SetData( "RuneVolume"    , &Pt->Item.RuneVolume		, ENUM_Type_IntPoint       	);
		Reader.SetData( "Mode"			, &Pt->Item.Mode			, ENUM_Type_IntPoint       	);

		IsReady = true;
	}
	return &Reader;
}

ReaderClass<DB_NPC_MoveBaseStruct>*	RoleDataEx::ReaderRD_NPC_MoveBase( )
{
	static  ReaderClass<DB_NPC_MoveBaseStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		DB_NPC_MoveBaseStruct* Pt = NULL;
		Reader.SetData( "NPCDBID"   		, &Pt->NPCDBID				, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );		
		Reader.SetData( "IndexID"   		, &Pt->IndexID				, ENUM_Type_IntPoint       , 0 , ENUM_Indirect_Address ,  Def_Disabled_Update_Flag );		

		Reader.SetData( "ZoneID"			, &Pt->ZoneID				, ENUM_Type_IntPoint       	);
		Reader.SetData( "X"					, &Pt->Base.X				, ENUM_Type_FloatPoint      );
		Reader.SetData( "Y"					, &Pt->Base.Y				, ENUM_Type_FloatPoint      );
		Reader.SetData( "Z"					, &Pt->Base.Z				, ENUM_Type_FloatPoint      );
		Reader.SetData( "Dir"				, &Pt->Base.Dir				, ENUM_Type_FloatPoint      );
		Reader.SetData( "Range"				, &Pt->Base.Range			, ENUM_Type_FloatPoint      );
		Reader.SetData( "MoveType"			, &Pt->Base.MoveType		, ENUM_Type_IntPoint       	);
		Reader.SetData( "WaitTime_Base"		, &Pt->Base.WaitTime_Base	, ENUM_Type_IntPoint       	);
		Reader.SetData( "WaitTime_Rand"		, &Pt->Base.WaitTime_Rand	, ENUM_Type_IntPoint       	);
		Reader.SetData( "ActionType"		, &Pt->Base.ActionType		, ENUM_Type_IntPoint       	);

		IsReady = true;
	}
	return &Reader;
}

ReaderClass<GuildMemberStruct>*	RoleDataEx::ReaderRD_GuildMember( )
{
	static  ReaderClass<GuildMemberStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		GuildMemberStruct* Pt = NULL;
		Reader.SetData( "GuildID"			, &Pt->GuildID				, ENUM_Type_IntPoint       	);
		Reader.SetData( "GuildRank"			, &Pt->Rank					, ENUM_Type_IntPoint       	);
		Reader.SetData( "GuildGroupID"		, &Pt->GroupID				, ENUM_Type_IntPoint       	);
		Reader.SetData( "GuildRankTime"		, &Pt->RankTime				, ENUM_Type_IntPoint       	);
		Reader.SetData( "DBID"   			, &Pt->MemberDBID			, ENUM_Type_IntPoint       , 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );		
		Reader.SetData( "RoleName"			,  Pt->MemberName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->MemberName)	, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );		

		Reader.SetData( "GuildSelfNote"		,  Pt->SelfNote.Begin()		, ENUM_Type_CharString     , sizeof(Pt->SelfNote) );		
		Reader.SetData( "GuildLeaderNote"	,  Pt->LeaderNote.Begin()	, ENUM_Type_CharString     , sizeof(Pt->LeaderNote) );		

		Reader.SetData( "Voc"           	, &Pt->Voc                  , ENUM_Type_IntPoint       , 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );        
		Reader.SetData( "Voc_Sub"       	, &Pt->Voc_Sub              , ENUM_Type_IntPoint       , 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );        
		Reader.SetData( "Sex"           	, &Pt->Sex                  , ENUM_Type_IntPoint       , 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );        
		Reader.SetData( "LV"           		, &Pt->LV                   , ENUM_Type_IntPoint       , 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );        
		Reader.SetData( "LV_Sub"       		, &Pt->LV_Sub               , ENUM_Type_IntPoint       , 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag | Def_Disabled_Insert_Flag );        

		IsReady = true;
	}
	return &Reader;
}
ReaderClass<GuildBaseStruct>*	RoleDataEx::ReaderRD_GuildBase( )
{
	static  ReaderClass<GuildBaseStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		GuildBaseStruct* Pt = NULL;
		Reader.SetData( "GUID"				, &Pt->GuildID				, ENUM_Type_IntPoint       	, 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag  );		
		Reader.SetData( "LeaderDBID"		, &Pt->LeaderDBID			, ENUM_Type_IntPoint       );
		Reader.SetData( "Medal"				, &Pt->Medal				, ENUM_Type_IntPoint       );
		Reader.SetData( "IsRecruit"			, &Pt->IsRecruit			, ENUM_Type_BitPoint       );
		Reader.SetData( "IsReady"			, &Pt->IsReady				, ENUM_Type_BitPoint       );

		Reader.SetData( "GuildName"			,  Pt->GuildName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->GuildName)		);		
		Reader.SetData( "LeaderName"		,  Pt->LeaderName.Begin()	, ENUM_Type_CharString     , sizeof(Pt->LeaderName)		);		
		Reader.SetData( "Note"				,  Pt->Note.Begin()			, ENUM_Type_CharString     , sizeof(Pt->Note)			);		
		Reader.SetData( "Introduce"			,  Pt->Introduce.Begin()			, ENUM_Type_CharString     , sizeof(Pt->Introduce)			);		

		Reader.SetData( "RankCount"			, &Pt->RankCount			, ENUM_Type_IntPoint       );
		for( int i = 0 ; i < EM_GuildRank_Count ; i++ )
		{
			char Buf[256];
			sprintf( Buf ,"RankAbility%d" , i+1 );
			Reader.SetData( Buf				, &Pt->Rank[i].Setting.Type		, ENUM_Type_IntPoint       );
			sprintf( Buf ,"RankName%d" , i+1 );
			Reader.SetData( Buf				,  Pt->Rank[i].RankName.Begin() , ENUM_Type_CharString     , sizeof( Pt->Rank[i].RankName )	);		
		}

		for( int i = 0 ; i < _MAX_GUILD_GROUP_COUNT_ ; i++ )
		{
			char Buf[256];
			sprintf( Buf ,"GroupName%d" , i+1 );
			Reader.SetData( Buf		, Pt->Group[i].Begin()		, ENUM_Type_CharString     , sizeof(  Pt->Group[i] )	);		 
		}
		IsReady = true;
	}
	return &Reader;

}

ReaderClass<GuildBoardStruct>*	RoleDataEx::ReaderRD_GuildBoard( )
{
	static  ReaderClass<GuildBoardStruct> Reader;
	static  bool    IsReady = false;
	if( IsReady == false )
	{   
		GuildBoardStruct* Pt = NULL;
		Reader.SetData( "GUID"				, &Pt->GUID					, ENUM_Type_IntPoint       	, 0						, ENUM_Indirect_Address ,  Def_Disabled_Update_Flag  );		
		Reader.SetData( "GuildID"			, &Pt->GuildID				, ENUM_Type_IntPoint       );		

		Reader.SetData( "Type"				, &Pt->Type._Type			, ENUM_Type_IntPoint       );
		Reader.SetData( "PostTime"			, &Pt->Time					, ENUM_Type_IntPoint       );

		Reader.SetData( "Title"				,  Pt->Title.Begin()		, ENUM_Type_CharString      , sizeof(Pt->Title)		);		
		Reader.SetData( "Message"			,  Pt->Message.Begin()		, ENUM_Type_CharString      , sizeof(Pt->Message)		);		
		Reader.SetData( "PostName"			,  Pt->PlayerName.Begin()	, ENUM_Type_CharString		, sizeof(Pt->PlayerName)		);		

		IsReady = true;
	}
	return &Reader;
}