public static bool ParseDamage(LogLineEventArgs logInfo) { Match m = RegexCache.Damage.Match(logInfo.logLine); if (!m.Success) { m = RegexCache.DamagePassive.Match(logInfo.logLine); } if (m.Success) { string actor = m.Groups["actorname"].Success ? TranslateName(m.Groups["actorname"].Value) : ""; string target = m.Groups["targetname"].Success ? TranslateName(m.Groups["targetname"].Value) : ""; string amount = m.Groups["amount"].Success ? m.Groups["amount"].Value : ""; string swingtype = m.Groups["swingtype"].Success ? m.Groups["swingtype"].Value : ""; string skill = "attack"; SwingTypeEnum swingType = SwingTypeEnum.Melee; if (m.Groups["type"].Success) { skill = CleanupSkill(m.Groups["type"].Value); if (skill == "non-melee") { if (_LastNonMeleeSkillused.ContainsKey(actor)) { skill = _LastNonMeleeSkillused[actor]; } swingType = SwingTypeEnum.NonMelee; } } MasterSwing ms = new MasterSwing((int)swingType, false, int.Parse(amount), logInfo.detectedTime, ActGlobals.oFormActMain.GlobalTimeSorter, skill, actor, "", target); if (ActGlobals.oFormActMain.SetEncounter(logInfo.detectedTime, actor, target)) { ActGlobals.oFormActMain.AddCombatAction(ms); } return(true); } return(false); }
private void AddCombatAction(LogLineEventArgs logInfo, string attacker, string victim, string theAttackType, bool critical, string special, string damage, SwingTypeEnum swingType) { AddCombatAction(logInfo, attacker, victim, theAttackType, critical, special, damage, swingType, string.Empty); }
private void AddCombatAction(LogLineEventArgs logInfo, string attacker, string victim, string theAttackType, bool critical, string special, Dnum damage, SwingTypeEnum swingType, string damageType) { DateTime now = logInfo.detectedTime; if (ActGlobals.oFormActMain.SetEncounter(now, attacker, victim)) { // attempt to guess the party member's class if (GuessChanter) { PartyMembers.SetClass(attacker, theAttackType); } // redirect attacks from pets/servants as coming from summoner if (SummonerRecordSet.IsSummonedPet(attacker)) { var summonerRecord = SummonerRecordSet.GetSummonerRecord(victim, attacker, now); if (summonerRecord != null) { string pet = attacker; if (AionData.Pet.IsTargettedPet(pet)) { attacker = summonerRecord.Actor; theAttackType = summonerRecord.Skill; } else if (LinkPets) { attacker = summonerRecord.Actor; if (summonerRecord.Duration <= 60) { theAttackType = summonerRecord.Skill; } else { theAttackType += "(" + pet + ")"; } } } } else if (SummonerRecordSet.IsSummonedPet(victim)) { if (AionData.Pet.IsPet(victim)) { // handle player pets if (AionData.Pet.PetDurations[victim] <= 60) { return; // ignore damage done to short-duration temporary pets // TODO: this should be a checkbox as this will decrease the dps of the attacker } var summonerRecord = SummonerRecordSet.GetSummonerRecord(null, victim, now); if (LinkPets) { ////return; // TODO: how do we treat damage done to spiritmaster's pets? } } else { // handle monster/unknown pets if (LinkPets) { // TODO: how do we treat damage done to mob's pets? } else { ////victim += " (inc)"; // TODO: this should be a checkbox if we want damage shown to mob pets } } } int globalTime = ActGlobals.oFormActMain.GlobalTimeSorter++; ActGlobals.oFormActMain.AddCombatAction((int)swingType, critical, special, attacker, theAttackType, damage, now, globalTime, victim, damageType); } }
private void AddCombatAction(LogLineEventArgs logInfo, string attacker, string victim, string theAttackType, bool critical, string special, string damage, SwingTypeEnum swingType, string damageType) { Dnum dnumDamage = NewDnum(damage, null); AddCombatAction(logInfo, attacker, victim, theAttackType, critical, special, dnumDamage, swingType, damageType); }
void LogCombatEvent(SwingTypeEnum st, LogLineEventArgs logInfo, CombatEvent ce, string special = "") { MasterSwing ms = new MasterSwing( (int)st, ce.critical, special, new Dnum(ce.hitValue), logInfo.detectedTime, ActGlobals.oFormActMain.GlobalTimeSorter, ce.ability, ce.sourceName, ce.damageType, ce.targetName); ms.Tags.Add("ActionResult", ce.result); ms.Tags.Add("ActionSlotType", ce.abilitySlotType); ms.Tags.Add("PowerType", ce.powerType); ActGlobals.oFormActMain.AddCombatAction(ms); }
private void AddCombatAction(LogLineEventArgs logInfo, string attacker, string victim, string theAttackType, bool critical, string special, Dnum damage, SwingTypeEnum swingType, string damageType) { DateTime now = logInfo.detectedTime; if (ActGlobals.oFormActMain.SetEncounter(now, attacker, victim)) { // attempt to guess the party member's class if (GuessChanter) { PartyMembers.SetClass(attacker, theAttackType); } // redirect attacks from pets/servants as coming from summoner if (SummonerRecordSet.IsSummonedPet(attacker)) { var summonerRecord = SummonerRecordSet.GetSummonerRecord(victim, attacker, now); if (summonerRecord != null) { string pet = attacker; if (AionData.Pet.IsTargettedPet(pet)) { attacker = summonerRecord.Actor; theAttackType = summonerRecord.Skill; } else if (LinkPets) { attacker = summonerRecord.Actor; if (summonerRecord.Duration <= 60) theAttackType = summonerRecord.Skill; else theAttackType += "(" + pet + ")"; } } } else if (SummonerRecordSet.IsSummonedPet(victim)) { if (AionData.Pet.IsPet(victim)) { // handle player pets if (AionData.Pet.PetDurations[victim] <= 60) return; // ignore damage done to short-duration temporary pets // TODO: this should be a checkbox as this will decrease the dps of the attacker var summonerRecord = SummonerRecordSet.GetSummonerRecord(null, victim, now); if (LinkPets) { ////return; // TODO: how do we treat damage done to spiritmaster's pets? } } else { // handle monster/unknown pets if (LinkPets) { // TODO: how do we treat damage done to mob's pets? } else { ////victim += " (inc)"; // TODO: this should be a checkbox if we want damage shown to mob pets } } } int globalTime = ActGlobals.oFormActMain.GlobalTimeSorter++; ActGlobals.oFormActMain.AddCombatAction((int)swingType, critical, special, attacker, theAttackType, damage, now, globalTime, victim, damageType); } }
private void AddCombatAction(LogLineEventArgs logInfo, string attacker, string victim, string theAttackType, bool critical, string special, Dnum damage, SwingTypeEnum swingType) { AddCombatAction(logInfo, attacker, victim, theAttackType, critical, special, damage, swingType, string.Empty); }
private void AddCombatAction(LogLineEventArgs logInfo, string attacker, string victim, string theAttackType, bool critical, string special, string damage, SwingTypeEnum swingType, string damageType) { Dnum dnumDamage = NewDnum(damage, null); AddCombatAction(logInfo, attacker, victim, theAttackType, critical, special, dnumDamage, swingType, damageType); }