void CActorInstance::AttachWeapon(DWORD dwItemIndex,DWORD dwParentPartIndex, DWORD dwPartIndex)
{
	if (dwPartIndex>=CRaceData::PART_MAX_NUM)
		return;
	
	m_adwPartItemID[dwPartIndex]=dwItemIndex;

	if (USE_VIETNAM_CONVERT_WEAPON_VNUM)
		dwItemIndex = Vietnam_ConvertWeaponVnum(dwItemIndex);

	CItemData * pItemData;
	if (!CItemManager::Instance().GetItemDataPointer(dwItemIndex, &pItemData))
	{
		RegisterModelThing(dwPartIndex, NULL);
		SetModelInstance(dwPartIndex, dwPartIndex, 0);

		RegisterModelThing(CRaceData::PART_WEAPON_LEFT, NULL);
		SetModelInstance(CRaceData::PART_WEAPON_LEFT, CRaceData::PART_WEAPON_LEFT, 0);

		RefreshActorInstance();
		return;
	}

	__DestroyWeaponTrace();
	//양손무기(자객 이도류) 왼손,오른손 모두에 장착.
	if (__IsRightHandWeapon(pItemData->GetWeaponType()))
		AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON, pItemData);
	if (__IsLeftHandWeapon(pItemData->GetWeaponType()))
		AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON_LEFT, pItemData);
}
Beispiel #2
0
TownHall::TownHall()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "TownHall" ) );
	PlayAnimation("StartPose");
	
	gVegModel = "TownHall_VEG";
}
Beispiel #3
0
WeaponFire::WeaponFire(void)
{
    SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "Fire" ) );
    gTimer = 0.0f;
    gTimerStop = 0.1f;
    gMaxScale = 1.0f;
    gOwner = 0;
}
Beispiel #4
0
Canister::Canister()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "Canister" ) );

	gPointLight	=	0;
	gOffset		=	XMFLOAT3( 0, 6, 0 );
	gTimeSpan	=	MathHelper::RandF( 0.0f, 8000.0f );
}
Beispiel #5
0
WeaponFire::WeaponFire(float timer, float minScale, float maxScale, GameObject* owner)
{
    SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "Fire" ) );
    gTimer = 0.0f;
    gTimerStop = timer;
    gMinScale = minScale;
    gMaxScale = maxScale;
    gOwner = owner;
}
void CActorInstance::AttachWeapon(DWORD dwParentPartIndex, DWORD dwPartIndex, CItemData * pItemData)
{
//	assert(m_pkCurRaceData);
	if (!pItemData)
		return;

	const char * szBoneName;
	if (!GetAttachingBoneName(dwPartIndex, &szBoneName))
		return;

	// NOTE : (이도류처리)단도일 경우 형태가 다른 것으로 얻는다. 없을 경우 디폴트를 리턴
	if (CRaceData::PART_WEAPON_LEFT == dwPartIndex)
	{
		RegisterModelThing(dwPartIndex, pItemData->GetSubModelThing());
	}
	else
	{
		RegisterModelThing(dwPartIndex, pItemData->GetModelThing());
	}

	for (DWORD i = 0; i < pItemData->GetLODModelThingCount(); ++i)
	{
		CGraphicThing * pThing;

		if (!pItemData->GetLODModelThingPointer(i, &pThing))
			continue;

		RegisterLODThing(dwPartIndex, pThing);
	}

	SetModelInstance(dwPartIndex, dwPartIndex, 0);
	AttachModelInstance(dwParentPartIndex, szBoneName, dwPartIndex);

	// 20041208.myevan.무기스펙큘러(값옷은 SetShape에서 직접 해준다.)
	if (USE_WEAPON_SPECULAR)
	{
		SMaterialData kMaterialData;
		kMaterialData.pImage = NULL;
		kMaterialData.isSpecularEnable = TRUE;
		kMaterialData.fSpecularPower = pItemData->GetSpecularPowerf();
		kMaterialData.bSphereMapIndex = 1;
		SetMaterialData(dwPartIndex, NULL, kMaterialData);
	}

	// Weapon Trace
	if (__IsWeaponTrace(pItemData->GetWeaponType()))
	{
		CWeaponTrace * pWeaponTrace = CWeaponTrace::New();		
		pWeaponTrace->SetWeaponInstance(this, dwPartIndex, szBoneName);
		m_WeaponTraceVector.push_back(pWeaponTrace);
	}
}
Beispiel #7
0
UtilityPole::UtilityPole()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "UtilityPole" ) );
	
	gVegModel = "UtilityPole_VEG";
}
Beispiel #8
0
PickupTruck::PickupTruck()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "PickUpTruck" ) );
	
	gVegModel = "PickUpTruck_VEG";
}
Beispiel #9
0
UnitCube::UnitCube()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "UnitCube" ) );
}
FactoryBuilding::FactoryBuilding()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "FactoryBuilding" ) );

	gVegModel = "FactoryBuilding_VEG";
}
Beispiel #11
0
TrashCan::TrashCan()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "TrashCan" ) );
	
	gVegModel = "TrashCan_VEG";
}
Beispiel #12
0
TankBarrier::TankBarrier()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "TankBarrier" ) );
	
	gVegModel = "TankBarrier_VEG";
}
ApartmentBuilding::ApartmentBuilding()
{
	SetModelInstance( ModelManager::GetInstance()->CreateModelInstance( "ApartmentBuilding" ) );

	gVegModel = "ApartmentBuilding_VEG";
}