#include "BodyObjForm.h"
using namespace ObjDataEdit;

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

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

	BaseForm::OnActive();

	CLB_RaceLimit->Items->Clear();
	for( unsigned int i = 0 ; i < Global::RaceName.size() ; i++ )
	{
		String* Str =  Global::RaceName[i].c_str();
		System::Object* AddItem[] = new System::Object*[1];
		AddItem[0] = Str;
		CLB_RaceLimit->Items->AddRange(AddItem);

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

}

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

//######################################################################################################
