void ModifySkillEffectProperty( HeaderProto.ESkillEffectPro PropertyType, HeaderProto.EOpreationFlag opType, HeaderProto.EOpreationFlag dataType, int data, HeaderProto.EEffectSkillBuffOptType optType, int SkillEffect_UID, bool bBegin ) { string PropertyName = sdActorInterface.SkillEffectName[(int)PropertyType]; if (PropertyName.Length == 0) { return; } SkillEffect baseSkillEffect = sdConfDataMgr.Instance().m_BaseSkillEffect[SkillEffect_UID] as SkillEffect; Hashtable skillEffectArray = GetActor().GetSkillEffect(); SkillEffect skillEffect = skillEffectArray[SkillEffect_UID] as SkillEffect; int Orgin = (int)sdConfDataMgr.GetMemberValue(baseSkillEffect, PropertyName); int Current = (int)sdConfDataMgr.GetMemberValue(skillEffect, PropertyName); int iValue = ConvertValue(dataType, data, Orgin); Current = GetModifyValue(bBegin, opType, Orgin, Current, iValue); sdConfDataMgr.SetMemberValue(skillEffect, PropertyName, Current); }
void ModifySkillProperty( HeaderProto.ESkillInfoPro PropertyType, HeaderProto.EOpreationFlag opType, HeaderProto.EOpreationFlag dataType, int data, HeaderProto.EEffectSkillBuffOptType optType, int skill_UID, bool bBegin ) { string PropertyName = sdActorInterface.SkillPropertyName[(int)PropertyType]; if (PropertyName.Length == 0) { return; } Hashtable baseProperty = GetActor().GetBaseSkillProperty(); Hashtable Property = GetActor().GetSkillProperty(); int iSkillID = skill_UID / 100; Hashtable baseSkill = baseProperty[iSkillID] as Hashtable; Hashtable Skill = Property[iSkillID] as Hashtable; int Orgin = (int)baseSkill[PropertyName]; int Current = (int)Skill[PropertyName]; int iValue = ConvertValue(dataType, data, Orgin); Skill[PropertyName] = GetModifyValue(bBegin, opType, Orgin, Current, iValue);; //t[] }
void ModifySkillActionProperty( HeaderProto.ESkillActionPro PropertyType, HeaderProto.EOpreationFlag opType, HeaderProto.EOpreationFlag dataType, int data, HeaderProto.EEffectSkillBuffOptType optType, int action_UID, bool bBegin ) { string PropertyName = sdActorInterface.SkillActionName[(int)PropertyType]; if (PropertyName.Length == 0) { return; } Hashtable baseProperty = GetActor().GetBaseSkillAction(); Hashtable Property = GetActor().GetSkillAction(); Hashtable baseAction = baseProperty[action_UID] as Hashtable; Hashtable Action = Property[action_UID] as Hashtable; object orginValue = baseAction[PropertyName]; object currentValue = Action[PropertyName]; if (orginValue.GetType() == typeof(int[])) { int[] Orgin = (int[])orginValue; int[] Current = (int[])currentValue; int index = -1; if (PropertyName == "naMoreDamagePer[MONSTER_BODY_TYPE_max]") { int nType = (int)PropertyType; int nSmall = (int)HeaderProto.ESkillActionPro.SKILL_ACTION_PRO_MoreDamagePer_BODY_TYPE_small; index = nType >= nSmall ? nType - nSmall:-1; } for (int i = 0; i < Orgin.Length; i++) { if (index != -1 && i != index) { continue; } int iValue = ConvertValue(dataType, data, Orgin[i]); Current[i] = GetModifyValue(bBegin, opType, Orgin[i], Current[i], iValue); } Action[PropertyName] = Current; } else if (orginValue.GetType() == typeof(int)) { int Orgin = (int)orginValue; int Current = (int)currentValue; int iValue = ConvertValue(dataType, data, Orgin); Action[PropertyName] = GetModifyValue(bBegin, opType, Orgin, Current, iValue); } }