Exemplo n.º 1
0
/*----------------------------------------------------------------------------*
*							  Move
*-----------------------------------------------------------------------------*/	
void MoveAssaEffect(cASSAEFFECT *pEffect)
{
	sinAssaSkillEffectProcess(pEffect);   //세부 움직임
	sinAssaParticleProcess(pEffect);      //세부 움직임
	sinAssaParticleTestProcess(pEffect);  //세부 움직임
//	sinAssaParticle7Process(pEffect);     //세부 움직임

	///////////////////////// FACE TYPE 에 대한 MOVE
	switch(pEffect->FACE_TYPE){ 
		case ASSAFACE_SCALE: 
			pEffect->ScalePosi.x += pEffect->ScaleSpeed.x;
			pEffect->ScalePosi.y += pEffect->ScaleSpeed.y;
			pEffect->ScalePosi.z += pEffect->ScaleSpeed.z;
		break;
		case ASSAFACE_TRACE:
			//if(!pEffect->Type && (pEffect->Time%5)==0) //Type 설정일때는 연결리스트를 없앤다 
			pEffect->cAssaTrace->AddData(&pEffect->Posi);

		break;

	}


	///////////// 각각 움직임 /////////////
	if(pEffect->MOVECODE == ASSA_MOVE_RANDOM_ROTATE){ 
		pEffect->Angle.y += pEffect->RAngleSpeed; 
		pEffect->Angle.y &=ANGCLIP;
		GetMoveLocation(pEffect->MoveSpeed.x, pEffect->MoveSpeed.y, pEffect->MoveSpeed.z, 0, pEffect->Angle.y, 0);
		POINT3D tempGeoResult;
		tempGeoResult.x = GeoResult_X;
		tempGeoResult.y = GeoResult_Y;
		tempGeoResult.z = GeoResult_Z;
		GetMoveLocation(tempGeoResult.x, tempGeoResult.y, tempGeoResult.z, pEffect->Angle.x, 0, 0);
		if(pEffect->MOVECODESUB & ASSA_CHAR_POSI){
			pEffect->Posi.x = pEffect->pChar->pX+GeoResult_X;
			pEffect->Posi.z = pEffect->pChar->pZ+GeoResult_Z;
			pEffect->Posi.y = pEffect->pChar->pY+GeoResult_Y+pEffect->AddHeight; 
		}
		else{
			pEffect->Posi.x = pEffect->CenterPosi.x+GeoResult_X;
			pEffect->Posi.z = pEffect->CenterPosi.z+GeoResult_Z;
			pEffect->Posi.y = pEffect->CenterPosi.y+GeoResult_Y; 
		}
		return ;
	}

	if(pEffect->MOVECODE == ASSA_MOVE_SPREAD){ 
		//pEffect->RAngle += pEffect->RAngleSpeed; 
		pEffect->RPosi.x  = pEffect->RDistance.y*GetCos[ pEffect->RAngle&ANGCLIP ] + pEffect->RDistance.z*GetSin[ pEffect->RAngle&ANGCLIP ];     
		pEffect->RPosi.z = -pEffect->RDistance.y*GetSin[ pEffect->RAngle&ANGCLIP ] + pEffect->RDistance.z*GetCos[ pEffect->RAngle&ANGCLIP ];

		pEffect->RPosi.x >>=16;
		pEffect->RPosi.z >>=16;
		pEffect->Posi.x += pEffect->RPosi.x;
		pEffect->Posi.z += pEffect->RPosi.z;
		pEffect->MoveSpeed.y -= pEffect->Gravity;
		pEffect->Posi.y +=  pEffect->MoveSpeed.y ; 
		return ;

	}
Exemplo n.º 2
0
/*----------------------------------------------------------------------------*
*				       PIERCING Paticle Aura
*-----------------------------------------------------------------------------*/	
int AssaParticle_Piercing_Aura(cASSAEFFECT *pEffect)
{

	for(int i = 0; i < 100 ; i++){            
		Assa = SetAssaEffect(100,"line.bmp",0,&pEffect->CenterPosi,0);              
		cAssaEffect[Assa]->Size.w = 250;
		cAssaEffect[Assa]->GatherSpeed = 40;
		cAssaEffect[Assa]->MOVECODE = ASSA_MOVE_GATHER;
		cAssaEffect[Assa]->FACE_TYPE = ASSAFACE_SCALE;
		cAssaEffect[Assa]->RDistance.z = GetRandomPos(256*16,256*16*2);
		cAssaEffect[Assa]->RAngle = GetRandomPos(0,4096);
		cAssaEffect[Assa]->StartPosi.z = cAssaEffect[Assa]->RDistance.z;
		AssaSetStartPosi(cAssaEffect[Assa]);
		cAssaEffect[Assa]->Time = GetRandomPos(0,-300);

		//각에따른 방향으로 Face를 Scale한다 
		GetMoveLocation(  cAssaEffect[Assa]->StartPosi.x, cAssaEffect[Assa]->StartPosi.y,cAssaEffect[Assa]->StartPosi.z*2 , cAssaEffect[Assa]->Angle.x, cAssaEffect[Assa]->Angle.y, 0 );
		cAssaEffect[Assa]->ScalePosi.x = GeoResult_X/2;
		cAssaEffect[Assa]->ScalePosi.y = GeoResult_Y/2;
		cAssaEffect[Assa]->ScalePosi.z = GeoResult_Z/2;

	}

	return TRUE;
} 
void SkillSaintDivinePiercing(smCHAR *pChar)
{
 	GetMoveLocation( 0, 0, 30*fONE, 0, lpCurPlayer->Angle.y, 0);
	POINT3D pos;
	pos.x = pChar->pX+GeoResult_X;
	pos.y = pChar->pY+5000;
	pos.z = pChar->pZ+GeoResult_Z;

	AssaParticle_ChainLance(&pos);
}
void SkillLancelotVague(smCHAR *pChar)
{
	HoEffectGroup *effectGroup = MainWindow.LoadScript("Effect\\NewEffect\\SkillArchMageMeteo1.lua");
	if(effectGroup)
	{
		GetMoveLocation( 0, 0, 30*fONE, 0, lpCurPlayer->Angle.y, 0);
		POINT3D pos;
		pos.x = pChar->pX+GeoResult_X;
		pos.y = pChar->pY;
		pos.z = pChar->pZ+GeoResult_Z;

		HoEffectType_Default *effectType = new HoEffectType_Default();
		effectType->Init(effectGroup, pos.x, pos.y, pos.y,0, pChar->Angle.y, 0);
		HoEffectManager::GetInstance()->AddEffect(effectType);
	}
}
void SkillMetalionGolem(smCHAR *pChar)
{
 	HoEffectGroup *effectGroup = NULL;
	effectGroup = MainWindow.LoadScript("Effect\\NewEffect\\SkillMetalionMetalGolem.lua");
	if(effectGroup)
	{
		GetMoveLocation( 0, 0, 30*fONE, 0, pChar->Angle.y, 0);
 		
		POINT3D pos;
 		pos.x = pChar->pX+GeoResult_X;
		pos.y = pChar->pY+10000;
		pos.z = pChar->pZ+GeoResult_Z;

		HoEffectType_Default *effectType = new HoEffectType_Default();
		effectType->Init(effectGroup, pos.x, pos.y, pos.z, 0, pChar->Angle.y, 0);
		HoEffectManager::GetInstance()->AddEffect(effectType);
	}
}
Exemplo n.º 6
0
/*----------------------------------------------------------------------------*
*				       PIERCING Paticle
*-----------------------------------------------------------------------------*/	
int AssaParticle_Piercing(cASSAEFFECT *pEffect)
{
	POINT3D TempPosi; 
	//무기의 앞부분 과 캐릭의 1직선 방향으로 날린다 
	AssaSearchWeaponPos(pEffect->pChar,&pEffect->Posi,1);           
	cAssaEffect[Assa]->Face.MatNum = g_NewParticleMgr.Start("TwistJavelin1", pEffect->Posi); //호바람 파티클을 붙인다 

	//날아갈곳 지점을 구한다 
	GetMoveLocation(  0, 0,256*128 , pEffect->Angle.x, ((pEffect->pChar->Angle.y&ANGCLIP)+ANGLE_180)&ANGCLIP, 0 );
	TempPosi.x = pEffect->Posi.x+GeoResult_X;
	TempPosi.y = pEffect->Posi.y;
	TempPosi.z = pEffect->Posi.z+GeoResult_Z;

	pEffect->MOVECODE = ASSA_MOVE;
	pEffect->MoveSpeed.x = (pEffect->Posi.x - TempPosi.x)/20;
	pEffect->MoveSpeed.z = (pEffect->Posi.z - TempPosi.z)/20;
	pEffect->CODE = ASSA_PARTICLE_PIERCING; 
	return TRUE;
}
void SkillMetalionSphere(smCHAR *pChar, float time, float attackTime)
{
	HoEffectType_Magnetic_Sphere *effectType = new HoEffectType_Magnetic_Sphere();
	effectType->Init(pChar, time, attackTime);
	HoEffectManager::GetInstance()->AddEffect(effectType);
	
	GetMoveLocation( 0, 0, 10*fONE, 0, pChar->Angle.y, 0);
	POINT3D curPos;
  	curPos.x = pChar->pX + GeoResult_X;
	curPos.y = pChar->pY+8000;
	curPos.z = pChar->pZ + GeoResult_Z;
	

	g_NewParticleMgr.Start("Skill3MechanicianSparkShield", curPos, 0.2f);
	POINT3D destPos;
	destPos.x = curPos.x+30000;
	destPos.y = curPos.y+80000;
	destPos.z = curPos.z+30000;
	
   	Assa = SetAssaEffect(90,"spark01_01.bmp",0,&curPos,0);
	AssaGetAniFileMat(cAssaEffect[Assa]);
	cAssaEffect[Assa]->AniDelayTime = 3;
	cAssaEffect[Assa]->Face.r = 150;
	cAssaEffect[Assa]->Face.g = 255;
	cAssaEffect[Assa]->Face.b = 150;
	cAssaEffect[Assa]->Face.Transparency = 200;
	cAssaEffect[Assa]->Size.w = 5000;
	cAssaEffect[Assa]->FACE_TYPE = ASSAFACE_SCALE; 
	
	cAssaEffect[Assa]->ScalePosi.x = destPos.x - curPos.x;
	cAssaEffect[Assa]->ScalePosi.y = destPos.y - curPos.y;
	cAssaEffect[Assa]->ScalePosi.z = destPos.z - curPos.z;

	
  	destPos.x = curPos.x+22000;
	destPos.y = curPos.y+75000;
	destPos.z = curPos.z+22000;
	
  	Assa = SetAssaEffect(100,"spark01_01.bmp",0,&curPos,0);
	AssaGetAniFileMat(cAssaEffect[Assa]);
	cAssaEffect[Assa]->AniDelayTime = 3;
	cAssaEffect[Assa]->Face.r = 150;
	cAssaEffect[Assa]->Face.g = 255;
	cAssaEffect[Assa]->Face.b = 150;
	cAssaEffect[Assa]->Face.Transparency = 200;
	cAssaEffect[Assa]->Size.w = 5000;
	cAssaEffect[Assa]->FACE_TYPE = ASSAFACE_SCALE; 
	
	cAssaEffect[Assa]->ScalePosi.x = destPos.x - curPos.x;
	cAssaEffect[Assa]->ScalePosi.y = destPos.y - curPos.y;
	cAssaEffect[Assa]->ScalePosi.z = destPos.z - curPos.z;

	
	destPos.x = curPos.x-30000;
	destPos.y = curPos.y+80000;
	destPos.z = curPos.z-30000;

 	Assa = SetAssaEffect(80,"spark01_01.bmp",0,&curPos,0);
	AssaGetAniFileMat(cAssaEffect[Assa]);
	cAssaEffect[Assa]->AniDelayTime = 3;
	cAssaEffect[Assa]->Face.r = 150;
	cAssaEffect[Assa]->Face.g = 255;
	cAssaEffect[Assa]->Face.b = 150;
	cAssaEffect[Assa]->Face.Transparency = 200;
	cAssaEffect[Assa]->Size.w = 5000;
	cAssaEffect[Assa]->FACE_TYPE = ASSAFACE_SCALE; 
	
	cAssaEffect[Assa]->ScalePosi.x = destPos.x - curPos.x;
	cAssaEffect[Assa]->ScalePosi.y = destPos.y - curPos.y;
	cAssaEffect[Assa]->ScalePosi.z = destPos.z - curPos.z;

	destPos.x = curPos.x-22000;
	destPos.y = curPos.y+75000;
	destPos.z = curPos.z-22000;

   	Assa = SetAssaEffect(85,"spark01_01.bmp",0,&curPos,0);
	AssaGetAniFileMat(cAssaEffect[Assa]);
	cAssaEffect[Assa]->AniDelayTime = 3;
	cAssaEffect[Assa]->Face.r = 150;
	cAssaEffect[Assa]->Face.g = 255;
	cAssaEffect[Assa]->Face.b = 150;
	cAssaEffect[Assa]->Face.Transparency = 200;
	cAssaEffect[Assa]->Size.w = 5000;
	cAssaEffect[Assa]->FACE_TYPE = ASSAFACE_SCALE; 
	
	cAssaEffect[Assa]->ScalePosi.x = destPos.x - curPos.x;
	cAssaEffect[Assa]->ScalePosi.y = destPos.y - curPos.y;
	cAssaEffect[Assa]->ScalePosi.z = destPos.z - curPos.z;
}
//------------------------------------------------------------------------
// Name : OnEvent
// Desc : Pet의 동작을 실제로 제어하는 함수
//        하나의 상태는 (Init, Update, Exit)로 구분된다.
// Date : 2004.4.20		Author : HongHoDong		Version : 1.0
//------------------------------------------------------------------------
void HoLowLevelPet::OnEvent(FsmStateEvent eEvent, FsmState eFsmState)
{
    if(eFsmState == FsmState::Spawn)
	{
		switch(eEvent)
		{
			case FsmStateEvent::EVENT_INIT:
			{
				GetMoveLocation( 0, 0, -50*fONE, 0, m_TargetChar->Angle.y+ANGLE_45, 0);
				
				m_CurrentPos.x = m_TargetChar->pX + GeoResult_X;
				m_CurrentPos.y = m_TargetChar->pY + m_TargetChar->PatHeight + 10*fONE;
				m_CurrentPos.z = m_TargetChar->pZ + GeoResult_Z;
				
				break;
			}

			case FsmStateEvent::EVENT_UPDATE:
			{
  				m_iCurrentFrame += 160;
				//날라가는 동작
				if(m_iCurrentFrame >= (70*160))
					m_iCurrentFrame = 10*160;
				
 				GetMoveLocation( 0, 0, 10*fONE, 0, m_TargetChar->Angle.y+ANGLE_90, 0);
				m_TargetPos.x = m_TargetChar->pX + GeoResult_X;
				m_TargetPos.y = m_TargetChar->pY + m_TargetChar->PatHeight + 5*fONE;
				m_TargetPos.z = m_TargetChar->pZ + GeoResult_Z;

				D3DVECTOR	attractLocation;
 				attractLocation.x = float(m_TargetPos.x -	m_CurrentPos.x);
				attractLocation.y = float(m_TargetPos.y - m_CurrentPos.y);
				attractLocation.z = float(m_TargetPos.z -	m_CurrentPos.z);
				D3DVECTOR attractDir = attractLocation;

				//벡터의 길이를 구한다.
				float length;
  				length = (float)sqrt(attractDir.x*attractDir.x+attractDir.y*attractDir.y+attractDir.z*attractDir.z);
				
  		  		if(length > 300.f)
				{
					m_CurrentPos.x += int(((attractLocation.x)/length)*(length/15.f));
					m_CurrentPos.y += int(((attractLocation.y)/length)*(length/15.f));
				    m_CurrentPos.z += int(((attractLocation.z)/length)*(length/15.f));
				}
				else
				{
					if(m_iCurrentFrame == 10*160)
					SetFsmState(HoLowLevelPet::FsmState::Idle);
				}
				break;
			}

			case FsmStateEvent::EVENT_EXIT:
  			{
				break;
			}
		}
	}
	else if(eFsmState == FsmState::Idle)
	{
		switch(eEvent)
		{
			case FsmStateEvent::EVENT_INIT:
			{
				m_iCurrentFrame = 80 * 160;
				m_bAttackTiming = false;
				break;
			}

			case FsmStateEvent::EVENT_UPDATE:
			{
 				m_iCurrentFrame += 160;
				
				if(m_TargetChar)
				{
					if(m_TargetChar->Flag == 0 && !m_bMyCharacterFlag)
						SetFsmState(HoLowLevelPet::FsmState::Vanish);
				}

				GetMoveLocation( 0, 0, 10*fONE, 0, m_TargetChar->Angle.y+ANGLE_90, 0);
				m_TargetPos.x = m_TargetChar->pX + GeoResult_X;
				m_TargetPos.y = m_TargetChar->pY + m_TargetChar->PatHeight + 5*fONE;
				m_TargetPos.z = m_TargetChar->pZ + GeoResult_Z;

				D3DVECTOR	attractLocation;
 				attractLocation.x = float(m_TargetPos.x - m_CurrentPos.x);
				attractLocation.y = float(m_TargetPos.y - m_CurrentPos.y);
				attractLocation.z = float(m_TargetPos.z - m_CurrentPos.z);
				D3DVECTOR attractDir = attractLocation;

				//벡터의 길이를 구한다.
				float length;
  				length = (float)sqrt(attractDir.x*attractDir.x+attractDir.y*attractDir.y+attractDir.z*attractDir.z);
				
   		  		if(length > 300.f)
				{
					m_CurrentPos.x += int( ((attractLocation.x)/length)*(length/15.f) );
					m_CurrentPos.y += int( ((attractLocation.y)/length)*(length/15.f) );
				    m_CurrentPos.z += int( ((attractLocation.z)/length)*(length/15.f) );
					if(m_iCurrentFrame >= (70*160))
						m_iCurrentFrame = 10*160;

					
				}
				else
				{
					//서있기 동작
					if(m_iCurrentFrame >= (230*160))
						m_iCurrentFrame = 80*160;
				}

				if ( m_TargetChar->chrAttackTarget && m_TargetChar->chrAttackTarget->Flag && 
					m_TargetChar->chrAttackTarget->smCharInfo.Brood!=smCHAR_MONSTER_USER && // 박재원 - 피닉스 펫이 유저 크리스탈 몬스터는 공격안한다.(같은편이므로)
					m_TargetChar->chrAttackTarget->smCharInfo.Life[0]>0 && m_TargetChar->chrAttackTarget->smCharInfo.State==smCHAR_STATE_ENEMY &&
					(m_TargetChar->MotionInfo->State==CHRMOTION_STATE_ATTACK || m_TargetChar->MotionInfo->State==CHRMOTION_STATE_SKILL || m_TargetChar->ShootingFlag ) &&
   	 		 		m_bAttackTiming == false && m_bMyCharacterFlag)
				{
 					m_bAttackTiming = true;
					if(m_Type == Type::Terry || m_Type == Type::Nepsys || m_Type == Type::Io || m_Type == Type::Mute)
					{
 						bool flag = false;
						int randomCount = rand()%100;
						
						// 박재원 - 빌링 도우미 펫 공격 성공률 수정
						if(m_TargetChar->smCharInfo.Level >= 1 && m_TargetChar->smCharInfo.Level <= 5) 
						{
							if(	randomCount <= 20 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 6 && m_TargetChar->smCharInfo.Level <= 9) 
						{
							if(	randomCount <= 23 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 10 && m_TargetChar->smCharInfo.Level <= 120) 
						{
							if(	randomCount <= 99 ) flag = true;
						}

/*
						// 박재원 - 빌링 도우미 펫 공격 성공률 수정
						if(m_TargetChar->smCharInfo.Level >= 1 && m_TargetChar->smCharInfo.Level <= 5) 
						{
							if(	randomCount <= 20 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 6 && m_TargetChar->smCharInfo.Level <= 10) 
						{
							if(	randomCount <= 23 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 11 && m_TargetChar->smCharInfo.Level <= 15) 
						{
							if(	randomCount <= 26 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 16 && m_TargetChar->smCharInfo.Level <= 20) 
						{
							if(	randomCount <= 29 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 21 && m_TargetChar->smCharInfo.Level <= 25) 
						{
							if(	randomCount <= 32 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 26 && m_TargetChar->smCharInfo.Level <= 30) 
						{
							if(	randomCount <= 35 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 31 && m_TargetChar->smCharInfo.Level <= 35) 
						{
							if(	randomCount <= 38 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 36 && m_TargetChar->smCharInfo.Level <= 40) 
						{
							if(	randomCount <= 41 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 41 && m_TargetChar->smCharInfo.Level <= 45) 
						{
							if(	randomCount <= 44 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 46 && m_TargetChar->smCharInfo.Level <= 50) 
						{
							if(	randomCount <= 47 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 51 && m_TargetChar->smCharInfo.Level <= 55) 
						{
							if(	randomCount <= 50 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 56 && m_TargetChar->smCharInfo.Level <= 60) 
						{
							if(	randomCount <= 53 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 61 && m_TargetChar->smCharInfo.Level <= 70) 
						{
							if(	randomCount <= 55 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 71 && m_TargetChar->smCharInfo.Level <= 80) 
						{
							if(	randomCount <= 57 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 81 && m_TargetChar->smCharInfo.Level <= 90) 
						{
							if(	randomCount <= 59 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 91 && m_TargetChar->smCharInfo.Level <= 100) 
						{
							if(	randomCount <= 60 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 101 && m_TargetChar->smCharInfo.Level <= 110) 
						{
							if(	randomCount <= 61 ) flag = true;
						}
						else if(m_TargetChar->smCharInfo.Level >= 111 && m_TargetChar->smCharInfo.Level <= 120) 
						{
							if(	randomCount <= 62 ) flag = true;
						}
*/	
						if(flag)
						{
 							SetFsmState(HoLowLevelPet::FsmState::SkillPre);
							m_AttackPos.x = m_TargetChar->chrAttackTarget->pX;
							m_AttackPos.y = m_TargetChar->chrAttackTarget->pY + fONE * 20;
							m_AttackPos.z = m_TargetChar->chrAttackTarget->pZ;
 							m_AttackChar = m_TargetChar->chrAttackTarget;
						}
					}

				}
				
			 	if (m_bMyCharacterFlag)
				{
					if (m_TargetChar->MotionInfo->State!=CHRMOTION_STATE_ATTACK && 
						m_TargetChar->MotionInfo->State!=CHRMOTION_STATE_SKILL && 
						m_TargetChar->ShootingFlag == FALSE)
					{
						m_bAttackTiming = false;
					}
				}

 				break;
			}

			case FsmStateEvent::EVENT_EXIT:
			{
				m_bAttackTiming = false;
				break;
			}
		}
	}
	else if(eFsmState == FsmState::SkillPre)
	{
		switch(eEvent)
 		{
			case FsmStateEvent::EVENT_INIT:
			{
				GetMoveLocation( 0, 0, fONE*2, 0, m_TargetChar->Angle.y, 0);
				
				m_TargetPos.x = m_TargetChar->pX + GeoResult_X;
				m_TargetPos.y = m_TargetChar->pY + m_TargetChar->PatHeight + 10*fONE;
				m_TargetPos.z = m_TargetChar->pZ + GeoResult_Z;
				if(m_Type == Type::Mute)
				{
					if(m_iParticleID != -1)
						g_NewParticleMgr.SetStop(m_iParticleID);
				}
				break;
			}

			case FsmStateEvent::EVENT_UPDATE:
			{
				m_iCurrentFrame += 160;
				//서있기 동작
				if(m_iCurrentFrame >= (70 * 160))
					m_iCurrentFrame = 10*160;
				
				D3DVECTOR	attractLocation;
 				attractLocation.x = float(m_TargetPos.x - m_CurrentPos.x);
				attractLocation.y = float(m_TargetPos.y - m_CurrentPos.y);
				attractLocation.z = float(m_TargetPos.z - m_CurrentPos.z);
				D3DVECTOR attractDir = attractLocation;

				//벡터의 길이를 구한다.
				float length;
  				length = (float)sqrt(attractDir.x*attractDir.x+attractDir.y*attractDir.y+attractDir.z*attractDir.z);
				
  		  		if(length > 300.f)
				{
					m_CurrentPos.x += int( ((attractLocation.x)/length)*(length/15.f) );
					m_CurrentPos.y += int( ((attractLocation.y)/length)*(length/15.f) );
				    m_CurrentPos.z += int( ((attractLocation.z)/length)*(length/15.f) );
				}
				else
					SetFsmState(HoLowLevelPet::FsmState::Skill);
				break;
			}

			case FsmStateEvent::EVENT_EXIT:
			{
			//	if(m_Type == Type::Mute)
			//	{
			//		m_iParticleID = g_NewParticleMgr.Start("Skill3MagicianSpiritElemental",m_CurrentPos);
			//		ObjBip = m_PetBoneRes->GetObjectFromName("Bip01");
			//		SkillPlaySound( SKILL_SOUND_SKILL_HEALING	 ,m_CurrentPos.x, m_CurrentPos.y,m_CurrentPos.z);		//힐링 사운드
			//	}
				break;
			}
		}
	}
	else if(eFsmState == FsmState::Skill)
	{
		switch(eEvent)
 	 	{
			case FsmStateEvent::EVENT_INIT:
			{
				if(m_Type == Type::Terry || m_Type == Type::Nepsys)
				{
					m_iCurrentFrame = 240 * 160;
				}
				else if(m_Type == Type::Io)
					m_iCurrentFrame = 310 * 160;
				else if(m_Type == Type::Mute)
				{
					m_iCurrentFrame = 310 * 160;
				}
				
				m_bSkillFlag = false;
				break;
			}

			case FsmStateEvent::EVENT_UPDATE:
			{
 				GetMoveLocation( 0, 0, fONE*2, 0, m_TargetChar->Angle.y, 0);
				m_CurrentPos.x = m_TargetChar->pX + GeoResult_X;
				m_CurrentPos.y = m_TargetChar->pY + m_TargetChar->PatHeight + 10*fONE;
				m_CurrentPos.z = m_TargetChar->pZ + GeoResult_Z;

  				if(m_iParticleID != -1 && ObjBip)
				{
					smMATRIX *mWorld;
					AnimObjectTree( ObjBip , m_iCurrentFrame, 0, m_TargetChar->Angle.y, 0);
					mWorld = &ObjBip->mWorld;
					
					D3DVECTOR partPos;
					partPos.x = float(m_CurrentPos.x + mWorld->_41);
					partPos.y = float(m_CurrentPos.y + mWorld->_43);
					partPos.z = float(m_CurrentPos.z + mWorld->_42);

					g_NewParticleMgr.SetPos(m_iParticleID, partPos);
				}
				

				m_iCurrentFrame += 160;
				if(m_Type == Type::Terry || m_Type == Type::Nepsys)
				{
					if(m_iCurrentFrame >= (300 * 160))
						SetFsmState(HoLowLevelPet::FsmState::Idle);
				}
				else if(m_Type == Type::Io)
				{
					if(m_iCurrentFrame >= (370 * 160))
						SetFsmState(HoLowLevelPet::FsmState::Idle);
				}
				else if(m_Type == Type::Mute)
				{
					if(m_iCurrentFrame >= (370 * 160))
						SetFsmState(HoLowLevelPet::FsmState::Idle);
				}
				
				if(m_bSkillFlag == false)
				{
 					if(m_Type == Type::Terry)
					{
						if(m_iCurrentFrame >= (270 * 160))
						{
							m_bSkillFlag = true;
							AssaParticle_FireShot(&m_CurrentPos, &m_AttackPos);
							if ( (rand()%2)==0 ) 
								SkillPlaySound( SKILL_SOUND_SKILL_FIREBOLT1 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							else
								SkillPlaySound( SKILL_SOUND_SKILL_FIREBOLT2 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음

							if(m_bMyCharacterFlag && m_AttackChar && 
								m_AttackChar->smCharInfo.Life[0]>0 && 
								m_AttackChar->smCharInfo.State==smCHAR_STATE_ENEMY)
							{
								g_LowLevelPetAttackSerial = m_AttackChar->dwObjectSerial;
								SendLowLevelPetDamage( m_AttackChar, Type::Terry);
							}
							m_AttackChar = NULL;
						}
					}
					else if(m_Type == Type::Nepsys)
					{
						if(m_iCurrentFrame >= (270 * 160))
						{
							m_bSkillFlag = true;
							AssaParticle_IceShot(&m_CurrentPos, &m_AttackPos);
							if ( (rand()%2)==0 ) 
								SkillPlaySound( SKILL_SOUND_SKILL_ENCHANTWEAPON_MAGIC_ICE1 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							else
								SkillPlaySound( SKILL_SOUND_SKILL_ENCHANTWEAPON_MAGIC_ICE2 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							
							if(m_bMyCharacterFlag && m_AttackChar && 
								m_AttackChar->smCharInfo.Life[0]>0 && 
								m_AttackChar->smCharInfo.State==smCHAR_STATE_ENEMY)
							{
								g_LowLevelPetAttackSerial = m_AttackChar->dwObjectSerial;
								SendLowLevelPetDamage( m_AttackChar, Type::Nepsys);
							}

							m_AttackChar = NULL;
						}
					}
					else if(m_Type == Type::Io)
					{
						if(m_iCurrentFrame >= (340 * 160))
						{
							m_bSkillFlag = true;
							AssaParticle_LightShot(&m_CurrentPos, &m_AttackPos);
							if ( (rand()%2)==0 ) 
								SkillPlaySound( SKILL_SOUND_SKILL_ENCHANTWEAPON_MAGIC_LIGHTNING1 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							else
								SkillPlaySound( SKILL_SOUND_SKILL_ENCHANTWEAPON_MAGIC_LIGHTNING2 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							
							if(m_bMyCharacterFlag && m_AttackChar && 
								m_AttackChar->smCharInfo.Life[0]>0 && 
								m_AttackChar->smCharInfo.State==smCHAR_STATE_ENEMY)
							{
								g_LowLevelPetAttackSerial = m_AttackChar->dwObjectSerial;
								SendLowLevelPetDamage( m_AttackChar, Type::Io);
							}

							m_AttackChar = NULL;
						}
					}


					// 장별 - 옐로우 드래곤
					else if(m_Type == Type::Mute)
					{
						if(m_iCurrentFrame >= (340 * 160))
						{
							m_bSkillFlag = true;
							AssaParticle_LightShot(&m_CurrentPos, &m_AttackPos);
							if ( (rand()%2)==0 ) 
								SkillPlaySound( SKILL_SOUND_SKILL_ENCHANTWEAPON_MAGIC_LIGHTNING1 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							else
								SkillPlaySound( SKILL_SOUND_SKILL_ENCHANTWEAPON_MAGIC_LIGHTNING2 , m_CurrentPos.x, m_CurrentPos.y, m_CurrentPos.z);			//스킬 효과음
							
							if(m_bMyCharacterFlag && m_AttackChar && 
								m_AttackChar->smCharInfo.Life[0]>0 && 
								m_AttackChar->smCharInfo.State==smCHAR_STATE_ENEMY)
							{
								g_LowLevelPetAttackSerial = m_AttackChar->dwObjectSerial;
								SendLowLevelPetDamage( m_AttackChar, Type::Mute);
							}

							m_AttackChar = NULL;
						}
					}



					/*
					else if(m_Type == Type::Mute)
					{
  						if(m_iCurrentFrame >= (460 * 160) && m_bMyCharacterFlag)
						{
							m_bSkillFlag = true;
							// 박재원 - 빌링 도우미 펫(무트 회복력 공식 수정)
							sinSetLife( sinGetLife()+10 + short(m_TargetChar->smCharInfo.Level/2) );
							if(m_TargetChar)
								g_LowLevelPetAttackSerial = m_TargetChar->dwObjectSerial;

						}
					}
					*/
					
				} 
				break;
			}

			case FsmStateEvent::EVENT_EXIT:
			{
				m_bSkillFlag = false;
				if(m_iParticleID != -1)
				{
					g_NewParticleMgr.SetStop(m_iParticleID);
					m_iParticleID = -1;
				}
				ObjBip = NULL;
				break;
			}
		}
	}
	else if(eFsmState == FsmState::Vanish)
	{
		switch(eEvent)
		{
			case FsmStateEvent::EVENT_INIT:
			{
				GetMoveLocation( 0, 0, 50*fONE, 0, m_TargetChar->Angle.y+ANGLE_45, 0);
				
				m_TargetPos.x = m_TargetChar->pX + GeoResult_X;
				m_TargetPos.y = m_TargetChar->pY + m_TargetChar->PatHeight + 10*fONE;
				m_TargetPos.z = m_TargetChar->pZ + GeoResult_Z;

				break;
			}

			case FsmStateEvent::EVENT_UPDATE:
			{
				m_iCurrentFrame += 160;
				//서있기 동작
				if(m_iCurrentFrame >= (70 * 160))
					m_iCurrentFrame = 10*160;
				
				D3DVECTOR	attractLocation;
 				attractLocation.x = float(m_TargetPos.x - m_CurrentPos.x);
				attractLocation.y = float(m_TargetPos.y - m_CurrentPos.y);
				attractLocation.z = float(m_TargetPos.z - m_CurrentPos.z);
				D3DVECTOR attractDir = attractLocation;

				//벡터의 길이를 구한다.
				float length;
  				length = (float)sqrt(attractDir.x*attractDir.x+attractDir.y*attractDir.y+attractDir.z*attractDir.z);
				
  		  		if(length > 300.f)
				{
					m_CurrentPos.x += int( ((attractLocation.x)/length)*(length/15.f) );
					m_CurrentPos.y += int( ((attractLocation.y)/length)*(length/15.f) );
				    m_CurrentPos.z += int( ((attractLocation.z)/length)*(length/15.f) );
				}
				else
					SetFsmState(HoLowLevelPet::FsmState::None);
				break;
			}

			case FsmStateEvent::EVENT_EXIT:
			{
				if(m_iParticleID != -1)
				{
					g_NewParticleMgr.SetStop(m_iParticleID);
					m_iParticleID = -1;
				}

				break;
			}
		}
	}
}