void StoreSkillCause(Unit target, Unit caster, SkillData skillData, float val = 0, bool inCombat = true) { curAttackData = _combatManager.gameObject.AddComponent <AttackData>(); _combatManager.activeAttackData.Add(curAttackData); curAttackData.skillData = skillData; curAttackData.inCombat = inCombat; curAttackData.target = target; // Calculate value of skill curAttackData.val = _combatManager.CalculateDamageDealt(val, _combatManager.activeSkillValueModifier); curAttackData.effect = skillData.effect; curAttackData.skillName = skillData.name; //if (skillData.effect.name != "") //curAttackData.skillEffectName = skillData.effect.name; curAttackData.effectPower = skillData.effectPower; curAttackData.effectDuration = skillData.effectDuration; curAttackData.curHitsCompleted = skillData.curHitsCompleted; curAttackData.hitsRequired = skillData.hitsRequired; curAttackData.timeBetweenHitUI = skillData.timeBetweenHitUI; curAttackData.timeTillEffectInflict = skillData.timeTillEffectInflict; curAttackData.skillUIValueParent = target.skillUIValueParent; curAttackData.activeSkillValueModifier = _combatManager.activeSkillValueModifier; curAttackData.curTargetCount = _combatManager.unitTargets.Count; //curAttackData.effectVal = skillData.effect.stackValue; }