public BuffElement(Msg_CharBuff_Body _body, BuffProcessor _owner, bool _effect) { m_CurId = s_Index++; m_Owner = _owner.Owner; m_Processor = _owner; m_Body = _body; m_BuffType = _body.type_; m_Activated = _effect; int effectIdx = int.MaxValue; if(BuffBaseMgr.s_MonsterSkillIndexRange_Min <= _body.skillTableIdx_ && _body.skillTableIdx_ <= BuffBaseMgr.s_MonsterSkillIndexRange_Max) { #region - set skill name - Tbl_MonsterSkill_Record skillRecord = AsTableManager.Instance.GetTbl_MonsterSkill_Record(_body.skillTableIdx_); SetSkillData(skillRecord); #endregion // Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_); Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.skillLevelTableIdx_); try{ effectIdx = skill.listSkillLevelPotency[_body.potencyIdx_].Potency_EffectIndex; m_SkillLevelPotency = skill.listSkillLevelPotency[_body.potencyIdx_]; } catch(System.Exception e) { Debug.LogError(e); } } else { #region - set skill name - Tbl_Skill_Record skillRecord = AsTableManager.Instance.GetTbl_Skill_Record(_body.skillTableIdx_); SetSkillData(skillRecord); #endregion Tbl_SkillLevel_Record skill = null; if(_body.chargeStep_ == int.MaxValue) { skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_); } else { skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_, _body.chargeStep_); } effectIdx = skill.listSkillLevelPotency[_body.potencyIdx_].Potency_EffectIndex; m_SkillLevelPotency = skill.listSkillLevelPotency[_body.potencyIdx_]; } m_SkillIdx = _body.skillTableIdx_; m_PotencyIdx = _body.potencyIdx_; m_Record = AsTableManager.Instance.GetTbl_SkillPotencyEffect_Record(effectIdx); }
public Tbl_MonsterSkillLevel_Record(XmlElement _element)// : base(_element) { try{ XmlNode node = (XmlElement)_element; SetValue(ref m_Index, node, "Index"); SetValue(ref m_Des_SkillName, node, "Des_SkillName"); SetValue(ref m_Skill_GroupIndex, node, "Skill_GroupIndex"); SetValue(ref m_Skill_Level, node, "Skill_Level"); SetValue(ref m_Mp_Decrease, node, "Mp_Decrease"); SetValue(ref m_CoolTime, node, "CoolTime"); SetValue(ref m_SkillAction_Index, node, "SkillAction_Index"); for(int i=1; i<=AsTableManager.sMonsterSkillLevelPotencyCount; ++i) { // if(node["Potency" + i + "_Value"].InnerText == "NONE" && // node["Potency" + i + "_Duration"].InnerText == "NONE") // continue; float _prob = 0; float __value = 0; float __int_value = 0; float duration = 0; int effectIndex = 0; SetValue( ref _prob, node, "Potency" + i + "_Prob"); SetValue( ref __value, node, "Potency" + i + "_Value"); SetValue( ref __int_value, node, "Potency" + i + "_IntValue"); SetValue( ref duration, node, "Potency" + i + "_Duration"); SetValue( ref effectIndex, node, "Potency" + i + "_EffectIndex"); Tbl_SkillLevel_Potency potency = new Tbl_SkillLevel_Potency( _prob * 0.1f, __value, __int_value, duration, effectIndex); m_listSkillLevelPotency.Add(potency); } } catch(System.Exception e) { Debug.LogError("[Tbl_MonsterSkillLevel_Record] 'constructor':|" + e + "| error while parsing"); } }
public Tbl_SkillLevel_Record(XmlElement _element)// : base(_element) { try{ XmlNode node = (XmlElement)_element; SetValue(ref m_Index, node, "Index"); SetValue(ref m_Skill_GroupIndex, node, "Skill_GroupIndex"); SetValue(ref m_Skill_Level, node, "Skill_Level"); SetValue(ref m_Level_Limit, node, "Level_Limit"); SetValue(ref m_Mp_Decrease, node, "Mp_Decrease"); SetValue(ref m_Usable_Distance, node, "Usable_Distance"); SetValue(ref m_CoolTime, node, "CoolTime"); SetValue(ref m_ChargeDuration, node, "ChargeDuration"); SetValue(ref m_ChargeMaxStep, node, "ChargeMaxStep"); SetValue(ref m_ChargeStep, node, "ChargeStep"); SetValue(ref m_SkillAction_Index, node, "SkillAction_Index"); SetValue(ref m_SkillActionCCW_Index, node, "SkillActionCCW_Index"); SetValue(ref m_SkillAction_Index_Female, node, "SkillAction_Index_Female"); SetValue(ref m_SkillActionCCW_Index_Female, node, "SkillActionCCW_Index_Female"); SetValue<eAggro_ValueType>( ref m_Aggro_ValueType, node, "Aggro_ValueType"); SetValue( ref m_Aggro_Value, node, "Aggro_Value"); for(int i=1; i<=AsTableManager.sSkillLevelPotencyCount; ++i) { // if(node["Potency" + i + "_Value"].InnerText == "NONE" && // node["Potency" + i + "_Duration"].InnerText == "NONE") // continue;// float prob = 0; float __value = 0; float __int_value = 0; float duration = 0; int effectIndex = 0; SetValue(ref prob, node, "Potency" + i + "_Prob"); SetValue(ref __value, node, "Potency" + i + "_Value"); SetValue( ref __int_value, node, "Potency" + i + "_IntValue"); SetValue(ref duration, node, "Potency" + i + "_Duration"); SetValue(ref effectIndex, node, "Potency" + i + "_EffectIndex"); // Tbl_SkillLevel_Potency potency = new Tbl_SkillLevel_Potency(__value * 0.01f, duration * 0.001f, effectIndex); Tbl_SkillLevel_Potency potency = new Tbl_SkillLevel_Potency( prob * 0.1f, __value, __int_value, duration * 0.001f, effectIndex); m_listSkillLevelPotency.Add(potency); } } catch(System.Exception e) { Debug.LogError("[Tbl_SkillLevel_Record] 'constructor':|" + e + "| error while parsing"); } }
public Tbl_SkillLevel_Record(BinaryReader br)// : base(_element) { m_Index = br.ReadInt32(); m_Skill_GroupIndex = br.ReadInt32(); m_Skill_Level = br.ReadInt32(); m_Level_Limit = br.ReadInt32(); m_Mp_Decrease = br.ReadInt32(); m_Usable_Distance = br.ReadSingle(); m_CoolTime = br.ReadInt32(); m_ChargeDuration = br.ReadInt32(); m_ChargeMaxStep = br.ReadInt32(); m_ChargeStep = br.ReadInt32(); m_SkillAction_Index = br.ReadInt32(); m_SkillActionCCW_Index = br.ReadInt32(); m_SkillAction_Index_Female = br.ReadInt32(); m_SkillActionCCW_Index_Female = br.ReadInt32(); m_Aggro_ValueType = (eAggro_ValueType)br.ReadInt32(); m_Aggro_Value = br.ReadInt32(); for(int i=1; i<=AsTableManager.sSkillLevelPotencyCount; ++i) { float prob = br.ReadSingle(); float __value = br.ReadSingle(); float __int_value = br.ReadSingle(); float duration = br.ReadSingle(); int effectIndex = br.ReadInt32(); Tbl_SkillLevel_Potency potency = new Tbl_SkillLevel_Potency( prob, __value, __int_value, duration, effectIndex); m_listSkillLevelPotency.Add(potency); } }
public BuffElement(Msg_NpcBuff_Body _body, BuffProcessor _owner, bool _effect) { m_CurId = s_Index++; m_Owner = _owner.Owner; m_Processor = _owner; m_BuffType = _body.type_; m_Activated = _effect; int effectIdx = int.MaxValue; if(BuffBaseMgr.s_MonsterSkillIndexRange_Min <= _body.skillTableIdx_ && _body.skillTableIdx_ <= BuffBaseMgr.s_MonsterSkillIndexRange_Max) { #region - set skill name - Tbl_MonsterSkill_Record skillRecord = AsTableManager.Instance.GetTbl_MonsterSkill_Record(_body.skillTableIdx_); SetSkillData(skillRecord); #endregion // Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_); Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.skillLevelTableIdx_); if( null == skill ) { AsUtil.ShutDown ( "BuffProcessor::BuffElement()[ (GetTbl_MonsterSkillLevel_Record) null == skill ] skill id : " + _body.skillTableIdx_ + " skill level : " + _body.skillLevel_ ); return; } effectIdx = skill.listSkillLevelPotency[_body.potencyIdx_].Potency_EffectIndex; m_SkillLevelPotency = skill.listSkillLevelPotency[_body.potencyIdx_]; } else { #region - set skill name - Tbl_Skill_Record skillRecord = AsTableManager.Instance.GetTbl_Skill_Record(_body.skillTableIdx_); SetSkillData(skillRecord); #endregion Tbl_SkillLevel_Record skill = null; if(_body.chargeStep_ == int.MaxValue) { skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_); } else { skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.skillLevel_, _body.skillTableIdx_, _body.chargeStep_); } if( null == skill ) { AsUtil.ShutDown ( "BuffProcessor::BuffElement()[ (GetTbl_SkillLevel_Record) null == skill ] skill id : " + _body.skillTableIdx_ + " skill level : " + _body.skillLevel_ ); return; } effectIdx = skill.listSkillLevelPotency[_body.potencyIdx_].Potency_EffectIndex; m_SkillLevelPotency = skill.listSkillLevelPotency[_body.potencyIdx_]; } m_SkillIdx = _body.skillTableIdx_; m_PotencyIdx = _body.potencyIdx_; m_Record = AsTableManager.Instance.GetTbl_SkillPotencyEffect_Record(effectIdx); }
public BuffElement(body2_SC_CHAR_BUFF _body, BuffProcessor _owner, bool _effect) { m_CurId = s_Index++; m_Owner = _owner.Owner; m_Processor = _owner; m_BuffType = _body.eType; m_Activated = _effect; int effectIdx = int.MaxValue; if(BuffBaseMgr.s_MonsterSkillIndexRange_Min <= _body.nSkillTableIdx && _body.nSkillTableIdx <= BuffBaseMgr.s_MonsterSkillIndexRange_Max) { #region - set skill name - Tbl_MonsterSkill_Record skillRecord = AsTableManager.Instance.GetTbl_MonsterSkill_Record(_body.nSkillTableIdx); SetSkillData(skillRecord); #endregion // Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.nSkillLevel, _body.nSkillTableIdx); Tbl_MonsterSkillLevel_Record skill = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record(_body.nSkillLevelTableIdx); effectIdx = skill.listSkillLevelPotency[_body.nPotencyIdx].Potency_EffectIndex; m_SkillLevelPotency = skill.listSkillLevelPotency[_body.nPotencyIdx]; } else { #region - set skill name - Tbl_Skill_Record skillRecord = AsTableManager.Instance.GetTbl_Skill_Record(_body.nSkillTableIdx); SetSkillData(skillRecord); #endregion Tbl_SkillLevel_Record skill = null; if(_body.nChargeStep == int.MaxValue) { skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.nSkillLevel, _body.nSkillTableIdx); } else { skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.nSkillLevel, _body.nSkillTableIdx, _body.nChargeStep); } // Tbl_SkillLevel_Record skill = AsTableManager.Instance.GetTbl_SkillLevel_Record(_body.nSkillLevel, _body.nSkillTableIdx); effectIdx = skill.listSkillLevelPotency[_body.nPotencyIdx].Potency_EffectIndex; m_SkillLevelPotency = skill.listSkillLevelPotency[_body.nPotencyIdx]; } m_SkillIdx = _body.nSkillTableIdx; m_PotencyIdx = _body.nPotencyIdx; m_Record = AsTableManager.Instance.GetTbl_SkillPotencyEffect_Record(effectIdx); }
void ForcedMoveProcess(Tbl_SkillLevel_Potency _lvPotency, Vector3 _originPos) { if(_originPos == Vector3.zero) Debug.LogWarning("PotencyProcessor::ForcedMoveProcess: indicated position is {0,0,0}"); Vector3 dir = -_originPos + m_Owner.transform.position; float distReal = dir.magnitude * 0.8f; float distCalcul = _lvPotency.Potency_IntValue * 0.01f; float dist = distCalcul; if(distCalcul < 0 && -distCalcul > distReal) dist = -distReal; if(Mathf.Abs(dist) > 0.2f) { Vector3 dest = m_Owner.transform.position + dir.normalized * dist; Msg_ConditionIndicate_ForcedMove indication = new Msg_ConditionIndicate_ForcedMove(dest, dist, s_ForcedMoveDuratioin); // Msg_ForcedMoveUserIndication indication = new Msg_ForcedMoveUserIndication(s_ForcedMoveDuratioin, dest); m_Owner.HandleMessage(indication); } }
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; }
bool PlayPotency(Tbl_Action_HitInfo _hitInfo, int _idx, eDAMAGETYPE _type, Tbl_SkillLevel_Potency _lvPotency) { return PlayPotency(null, _hitInfo, _idx, _type, _lvPotency); }
bool PlayPotency(Msg_OtherCharAttackNpc3 _attack, Tbl_Action_HitInfo _hitInfo, int _idx, Tbl_SkillLevel_Potency _lvPotency) { return PlayPotency(_attack, _hitInfo, _idx, eDAMAGETYPE.eDAMAGETYPE_NORMAL, _lvPotency); }
public Msg_BalloonIndicate( Tbl_SkillLevel_Potency _potency) { m_MessageType = eMessageType.BALLOON; potency_ = _potency; }
public Msg_ConditionRecover_SizeControl( Tbl_SkillLevel_Potency _potency) { m_MessageType = eMessageType.RECOVER_CONDITION_SIZECONTROL; potency_ = _potency; }
public Tbl_MonsterSkillLevel_Record(BinaryReader br)// : base(_element) { m_Index = br.ReadInt32(); m_Des_SkillName = br.ReadString(); m_Skill_GroupIndex = br.ReadInt32(); m_Skill_Level = br.ReadInt32(); m_Mp_Decrease = br.ReadInt32(); m_CoolTime = br.ReadSingle(); m_SkillAction_Index = br.ReadInt32(); for(int i=1; i<=AsTableManager.sMonsterSkillLevelPotencyCount; ++i) { float _prob = br.ReadSingle(); float __value = br.ReadSingle(); float __int_value = br.ReadSingle(); float duration = br.ReadSingle(); int effectIndex = br.ReadInt32(); Tbl_SkillLevel_Potency potency = new Tbl_SkillLevel_Potency( _prob * 0.1f, __value, __int_value, duration, effectIndex); m_listSkillLevelPotency.Add(potency); } }