Пример #1
0
	public void PotencyProcess(Msg_OtherCharAttackNpc3 _attack)
	{
		m_Potency.PotencyProcess(_attack);
	}
Пример #2
0
		public SequentPotency(Msg_OtherCharAttackNpc3 _attack, string _effect, string _sound, Tbl_SkillPotencyEffect_Record _potency)
		{
	//		m_Owner = _entity;
			
			attack_ = _attack;
			
			effect_ = _effect;
			sound_ = _sound;
			
			potency_ = _potency;
		}
Пример #3
0
	bool PlayPotency(Msg_OtherCharAttackNpc3 _attack, Tbl_Action_HitInfo _hitInfo, int _idx, Tbl_SkillLevel_Potency _lvPotency)
	{
		return PlayPotency(_attack, _hitInfo, _idx, eDAMAGETYPE.eDAMAGETYPE_NORMAL, _lvPotency);
	}
Пример #4
0
	bool PlayPotency(Msg_OtherCharAttackNpc3 _attack, Tbl_Action_HitInfo _hitInfo, int _idx, eDAMAGETYPE _type, Tbl_SkillLevel_Potency _lvPotency)
	{
		if(m_Owner == null)
			return false;
		
		if(_idx == int.MaxValue || m_Owner.ModelObject == null)
			return true;
		
		Tbl_SkillPotencyEffect_Record effect = AsTableManager.Instance.GetTbl_SkillPotencyEffect_Record(_idx);
		if(effect == null)
			return false;
		
		string effectPath = "";
		string soundPath = "";
		
		effectPath = effect.PotencyEffect_FileName;
		soundPath = effect.PotencySound_FileName;
		
		switch(_type)
		{
		case eDAMAGETYPE.eDAMAGETYPE_NORMAL:
			break;
		case eDAMAGETYPE.eDAMAGETYPE_CRITICAL:
			if(effect.PotencyCriticalEffect_FileName != "NONE")
				effectPath = effect.PotencyCriticalEffect_FileName;
			if(effect.PotencyCriticalSound_FileName != "NONE")
				soundPath = effect.PotencyCriticalSound_FileName;
			break;
		case eDAMAGETYPE.eDAMAGETYPE_MISS:
//			effectPath = "Miss";
//			soundPath = "Miss";			
			break;
		case eDAMAGETYPE.eDAMAGETYPE_DODGE:
//			effectPath = "Dodge";
//			soundPath = "Dodge";
			break;
		case eDAMAGETYPE.eDAMAGETYPE_NOTHING:
//			effectPath = "Nothing";
//			soundPath = "Nothing";
			break;
		default:
//			effectPath = "etc";
//			soundPath = "etc";	
//			if(m_Owner.FsmType == eFsmType.MONSTER)
//				Debug.Log("PotencyProcessor::PlayPotency: monster [class:" + m_Owner.GetProperty<string>(eComponentProperty.CLASS) + "] attack type is " + _type);
			break;
		}
		
		if(_hitInfo != null && _hitInfo.HitValueLookType == eValueLookType.Duration)
		{
			float interval = (_hitInfo.HitValueLookDuration / _hitInfo.HitValueLookCount) * 0.0005f;
			
			SequentPotency sequent = new SequentPotency(_attack, effectPath, soundPath, effect);
			
			for(int i=0; i<_hitInfo.HitValueLookCount; ++i)
			{
				AsTimerManager.Instance.SetTimer(interval * i + interval * 0.5f, Timer_SequentEffect, sequent);
//				Debug.Log("PotencyProcessor::PlayPotency: interval=" + interval * i);
			}
		}
		else
		{
			float lifeTime = 0;
//			
			if(effect.PotencyEffect_Timing == eEFFECT_TIMING.Duration && _lvPotency != null)
				lifeTime = _lvPotency.Potency_Duration;
			
			if( null != AsEffectManager.Instance && null != AsSoundManager.Instance)
			{
				float size = 1;
				if(effect.Effect_Size != float.MaxValue)
					size = effect.Effect_Size * 0.001f * m_Owner.characterController.height;
				
				if(size > m_MaxSize)
					size = m_MaxSize;
					
				AsEffectManager.Instance.PlayEffect(effectPath, m_Owner.ModelObject.transform, false, lifeTime, size);
				AsSoundManager.Instance.PlaySound(soundPath, m_Owner.ModelObject.transform.position, false);
				
				if(effect.HitShake != float.MaxValue)
				{
					if(m_Owner.FsmType == eFsmType.MONSTER ||
						(m_Owner.FsmType == eFsmType.OTHER_USER && _attack != null))
						ShakeProcess(effect.HitShake);
				}
			}
			else
			{
				Debug.Log("PotencyProcessor::PlayPotency: AsEffectManager or AsSoundManager instance is null.");
				return false;
			}
		}
		
		return true;
	}
Пример #5
0
	public void PotencyProcess(Msg_OtherCharAttackNpc3 _attack)
	{
		Tbl_Skill_Record skill = _attack.parent_.skill_;
		m_OtherCharAttackNpc1 = _attack.parent_;
		
		for(int i=0; i<skill.listSkillPotency.Count; ++i)
		{
			Tbl_Skill_Potency potency = skill.listSkillPotency[i];
			Tbl_SkillLevel_Potency lvPotency = _attack.parent_.skillLv_.listSkillLevelPotency[i];
			
			if(potency.Potency_DurationType == ePotency_DurationType.Moment)
			{
				Tbl_SkillLevel_Record skillLv = _attack.parent_.skillLv_;
				Tbl_Action_Record action = _attack.parent_.action_;
				
				if(TargetDecider.CheckAffectingUserIsEnemy(m_Owner, _attack.parent_.charUniqKey_) == true) // attack from user
				{
					switch(potency.Potency_Target)
					{
					case ePotency_Target.Enemy:
					case ePotency_Target.All:
						if(PlayPotency(_attack, action.HitAnimation.hitInfo, skillLv.listSkillLevelPotency[i].Potency_EffectIndex, lvPotency) == false)
						{
							Debug.LogError("PotencyProcessor: delivered message is Msg_OtherCharAttackNpc2(Skill level table record:[index:" + skillLv.Index +
								"][action index:" + skillLv.SkillAction_Index + "][skill index:" + skillLv.Skill_GroupIndex + "]");
						}
						break;
					}
					
					if(_attack.knockBack_ == true && _attack.parent_.attacker_ != null)
					{
						switch(potency.Potency_Type)
						{
						case ePotency_Type.Move:
							ForcedMoveProcess(lvPotency, _attack.parent_.attacker_.transform.position);
							break;
						case ePotency_Type.PointMove:
							ForcedMoveProcess(lvPotency, _attack.parent_.targeting_);
							break;
						}
					}
				}
				else
				{
					switch(potency.Potency_Target)
					{
					case ePotency_Target.Alliance:
					case ePotency_Target.Party:
					case ePotency_Target.Self:
					case ePotency_Target.All:
						if(PlayPotency(action.HitAnimation.hitInfo, skillLv.listSkillLevelPotency[i].Potency_EffectIndex, lvPotency) == false)
						{
							Debug.LogError("PotencyProcessor: delivered message is Msg_OtherCharAttackNpc2(Skill level table record:[index:" + skillLv.Index +
								"][action index:" + skillLv.SkillAction_Index + "][skill index:" + skillLv.Skill_GroupIndex + "]");
						}
						break;
					}
				}
			}
		}
		
		BalloonProcess( _attack.parent_.skill_, _attack.parent_.skillLv_);
	}