#include "QuestCollectForm.h"


using namespace ObjDataEdit;

//######################################################################################################
//主要需要繼承的涵式
ReaderClass< DB_GameObjDbStruct >* QuestCollectForm::ObjReader( )
{
    static ReaderClass< DB_GameObjDbStruct > Reader;
    static bool IsInit = false;

    if( IsInit == false )
    {
        DB_GameObjDbStruct* Pt = 0;

        IsInit = true;
        Reader.SetData( "IsLock"            , &Pt->IsLock                   , ENUM_Type_ShortPoint      , 0 , ENUM_Indirect_Address , Def_Disabled_Update_Flag );
        Reader.SetData( "LastModifyDate"    , &Pt->LastModifyDate           , ENUM_Type_TimeCharString  , 0 , ENUM_Indirect_Address );
        Reader.SetData( "LastModifyAccount" , &Pt->LastModifyAccount        , ENUM_Type_CharString      , 0 , ENUM_Indirect_Address );
		Reader.SetData( "DataGroup"			, &Pt->DataGroup		        , ENUM_Type_CharString      , 0 , ENUM_Indirect_Address );
        Reader.SetData( "LockAccount"       , &Pt->LockAccount              , ENUM_Type_CharString      , 0 , ENUM_Indirect_Address , Def_Disabled_Update_Flag );
        Reader.SetData( "ProcRate"          , &Pt->ProcRate.Rate            , ENUM_Type_IntPoint        , 0 , ENUM_Indirect_Address );
        Reader.SetData( "GUID"              , &Pt->GameData.GUID            , ENUM_Type_IntPoint        , 0 , ENUM_Indirect_Address , Def_Disabled_Update_Flag );
        Reader.SetData( "Name"              , &Pt->GameData.Name            , ENUM_Type_CharString      , 0 , ENUM_Indirect_Address );
        Reader.SetData( "ImageID"           , &Pt->GameData.ImageID         , ENUM_Type_IntPoint        , 0 , ENUM_Indirect_Address );
        Reader.SetData( "Note"              , &Pt->GameData.Note            , ENUM_Type_CharString      , 0 , ENUM_Indirect_Address );
        Reader.SetData( "ShortNote"         , &Pt->GameData.ShortNote       , ENUM_Type_CharString      , 0 , ENUM_Indirect_Address );     

		Reader.SetData( "szQuestNpcText"    , &Pt->GameData.QuestCollect.szQuestNpcText			, ENUM_Type_CharString      , 0 , ENUM_Indirect_Address );        
		Reader.SetData( "iQuestID1"			, &Pt->GameData.QuestCollect.iQuestID[0]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID2"			, &Pt->GameData.QuestCollect.iQuestID[1]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID3"			, &Pt->GameData.QuestCollect.iQuestID[2]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID4"			, &Pt->GameData.QuestCollect.iQuestID[3]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID5"			, &Pt->GameData.QuestCollect.iQuestID[4]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID6"			, &Pt->GameData.QuestCollect.iQuestID[5]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID7"			, &Pt->GameData.QuestCollect.iQuestID[6]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID8"			, &Pt->GameData.QuestCollect.iQuestID[7]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID9"			, &Pt->GameData.QuestCollect.iQuestID[8]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID10"		, &Pt->GameData.QuestCollect.iQuestID[9]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID11"		, &Pt->GameData.QuestCollect.iQuestID[10]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID12"		, &Pt->GameData.QuestCollect.iQuestID[11]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID13"		, &Pt->GameData.QuestCollect.iQuestID[12]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID14"		, &Pt->GameData.QuestCollect.iQuestID[13]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID15"		, &Pt->GameData.QuestCollect.iQuestID[14]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID16"		, &Pt->GameData.QuestCollect.iQuestID[15]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID17"		, &Pt->GameData.QuestCollect.iQuestID[16]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID18"		, &Pt->GameData.QuestCollect.iQuestID[17]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID19"		, &Pt->GameData.QuestCollect.iQuestID[18]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     
		Reader.SetData( "iQuestID20"		, &Pt->GameData.QuestCollect.iQuestID[19]			, ENUM_Type_IntPoint		, 0 , ENUM_Indirect_Address );     

    }

    return &Reader;
}
void    QuestCollectForm::OnActive()
{

}
void    QuestCollectForm::OnSelectObj( bool LockOk )
{
    _ObjDB.GameData.Classification = EM_ObjectClass_QuestCollect;
    //panel1->Enabled = LockOk;
}
//輸出時額外設定
void    QuestCollectForm::OnOuputObjSetting( DB_GameObjDbStruct* TempObj )
{
    TempObj->GameData.Classification = EM_ObjectClass_QuestCollect;
}
void    QuestCollectForm::OnTimeProc()
{

}

int     QuestCollectForm::ObjSize(  )
{
    GameObjDbStruct *P = NULL;
    int Size = sizeof( GameObjDbStruct ) - sizeof( P->Temp ) +  sizeof( P->QuestCollect ) + 3;
    Size = Size & 0xfffffC;
    return Size;
}
//######################################################################################################