#include "PhantomForm.h"

using namespace ObjDataEdit;
//######################################################################################################
ReaderClass< DB_GameObjDbStruct >* PhantomForm::ObjReader( )
{
	return GameObjDbStructEx::ObjReader_Phantom( );
}
//主要需要繼承的涵式
void    PhantomForm::OnActive()
{
	
    static bool FirstTime = true;

	Reload_AttrTable();
    //設定種族職業資訊
    if( FirstTime  == false )
        return;

	BaseForm::OnActive();

	FirstTime = false;
	CB_PhantomEqType1->Items->Clear();
	CB_PhantomEqType2->Items->Clear();
	CB_PhantomEqType3->Items->Clear();
	CB_PhantomEqType4->Items->Clear();
	CB_PhantomEqType5->Items->Clear();
	for( int i = 0 ; i < EM_WearEqType_MaxCount ; i++ )
	{
		String* Str = GameObjDbStructEx::GetWearEqTypeENUMString( (WearEqTypeENUM)i );
		CB_PhantomEqType1->Items->Add( Str );
		CB_PhantomEqType2->Items->Add( Str );
		CB_PhantomEqType3->Items->Add( Str );
		CB_PhantomEqType4->Items->Add( Str );
		CB_PhantomEqType5->Items->Add( Str );
	}  

}
void    PhantomForm::OnSelectObj( bool LockOk )
{
    _ObjDB.GameData.Classification = EM_ObjectClass_Phantom;
}
//輸出時額外設定
void    PhantomForm::OnOutputObjSetting( DB_GameObjDbStruct* TempObj )
{
    TempObj->GameData.Classification = EM_ObjectClass_Phantom;
}

void    PhantomForm::OnTimeProc( )
{

}

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

void PhantomForm::OnValueChange( )
{
	OnSelectObj( true );

	DB_GameObjDbStruct __pin * TempObj = &_ObjDB;
}
