void sendCombatData(CombatActionEventArgs actionInfo) { if (actionInfo.cancelAction) { return; } // get encounter EncounterData encounter = actionInfo.combatAction.ParentEncounter; // send encounter data sendEncounterData(encounter); // send combatant data foreach (CombatantData cd in encounter.GetAllies()) { if (cd.Name == actionInfo.attacker) { // get actor id (stored as tag in actionInfo) Int32 actorId = int.Parse( (string)actionInfo.tags["ActorID"], System.Globalization.NumberStyles.HexNumber ); // send combatant data with actor id sendEncounterCombatantData(cd, actorId); break; } } }
public static String GetActorId(CombatActionEventArgs actionInfo) { Object actorId = null; actionInfo.tags.TryGetValue("ActorID", out actorId); return(actorId == null ? "" : actorId.ToString()); }
void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (incDamageTypes.Contains(actionInfo.swingType) == false) { return; } if (actionInfo.damage <= 0) { return; } // Get the incoming damage combatant from the current encounter EncounterData activeEncounter = ActGlobals.oFormActMain.ActiveZone.Items[ActGlobals.oFormActMain.ActiveZone.Items.Count - 1]; CombatantData combatant = activeEncounter.GetCombatant(actionInfo.victim); SortedList <DateTime, long> damagePerSecond; if (combatant.Tags.ContainsKey(tagName)) // See if the combatant already has a DamageTakenPerSecond container { damagePerSecond = (SortedList <DateTime, long>)combatant.Tags[tagName]; } else { damagePerSecond = new SortedList <DateTime, long>(); combatant.Tags.Add(tagName, damagePerSecond); } if (damagePerSecond.ContainsKey(actionInfo.time)) // See if the container has an entry for the current second { damagePerSecond[actionInfo.time] += actionInfo.damage; // Add damage to the current second } else { damagePerSecond.Add(actionInfo.time, actionInfo.damage); // Add this damage as the current second } }
// // ACT EVENT HANDLERS // void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if ( actionInfo.cancelAction || !actionInfo.tags.ContainsKey("Job") || (string)actionInfo.tags["Job"] == "" ) { return; } var job = (string)actionInfo.tags["Job"]; if (job.Length > 3) { return; } // add to death tracker if not already added if (actionInfo.tags.ContainsKey("ActorID")) { int cId = int.Parse( (string)actionInfo.tags["ActorID"], System.Globalization.NumberStyles.HexNumber ); // add and/or reset entry in death tracker this.deathTracker[cId] = false; // add entry to name lookup table if (!this.nameLookupTable.ContainsKey(cId)) { this.nameLookupTable[cId] = new string[] { actionInfo.attacker, "", job }; this.writeLog("Add name lookup (ACT) " + actionInfo.attacker + " (" + job + ")."); } } }
void botd_oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { string skillName = actionInfo.theAttackType.ToLower(); string skillUser = actionInfo.attacker; if (skillUser == "YOU") { switch (skillName) { case "blood of the dragon": botdDuration = new TimeSpan(0, 0, 15); lag_compensation = 2; botdNext = 60; break; case "fang and claw": addBotdDuration(); break; case "wheeling thrust": addBotdDuration(); break; case "geirskogul": TimeSpan ts = new TimeSpan(0, 0, 10); botdDuration = botdDuration.Subtract(ts); UXduration = 0; break; } } //throw new NotImplementedException(); }
void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (isImport) { return; } if (actionInfo.attacker == ActGlobals.charName && actionInfo.swingType == (int)SwingTypeEnum.Melee) { if (!ActGlobals.oFormActMain.LastLogLine.Substring(ActGlobals.oFormActMain.TimeStampLen).StartsWith(ActGlobals.charName)) { if (!InputContains(actionInfo.victim, aSentryStrings)) { string key = actionInfo.special.ToLower(); if (key == "none") { usedSpecials.Clear(); totalSwings++; } else { if (!usedSpecials.ContainsKey(key)) { usedSpecials.Add(key, true); if (specialProc.ContainsKey(key)) { specialProc[key] += 1F; } else { specialProc.Add(key, 1F); } } if (specialExtra.ContainsKey(key)) { specialExtra[key] += 1F; } else { specialExtra.Add(key, 1F); } } if (soundSettings.ContainsKey(key)) { try { soundSettings[key].PlayAlert(); } catch (Exception ex) { ActGlobals.oFormActMain.WriteExceptionLog(ex, actionInfo.special); } } UpdateListView(); } } } }
public static bool IsMySkill(CombatActionEventArgs actionInfo) { // 自分のスキルかどうか if (!actionInfo.combatAction.Attacker.Equals(ActGlobals.charName)) { return(false); } // 2がスキルっぽい(1がオートアタック、Dotも2以外) if (actionInfo.swingType != 2) { return(false); } return(true); }
private void AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (CombatActionChecker.IsMySkill(actionInfo)) { if (actorId == null) { actorId = CombatActionChecker.GetActorId(actionInfo); } if (!CombatActionChecker.JudgeFlankOrRearSkill(actionInfo)) { AttackMissView.CountUp(actionInfo.theAttackType); if (soundPlayer != null && ACTTabControl.IsSoundEnable()) { soundPlayer.Play(); } } } }
private void FormActMain_BeforeCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (silenceLimit == 0 || actionInfo.cancelAction) { return; } if (CombatantData.DamageSwingTypes.Contains(actionInfo.swingType)) { if ((actionInfo.time - lastHostile).TotalSeconds > silenceLimit) { ActGlobals.oFormActMain.ActiveZone.ActiveEncounter.EndTimes.Add(ActGlobals.oFormActMain.ActiveZone.ActiveEncounter.EndTime); ActGlobals.oFormActMain.ActiveZone.ActiveEncounter.StartTimes.Add(actionInfo.time); if (ActGlobals.oFormActMain.ActiveZone.PopulateAll) { ActGlobals.oFormActMain.ActiveZone.Items[0].EndTimes.Add(ActGlobals.oFormActMain.ActiveZone.ActiveEncounter.EndTime); ActGlobals.oFormActMain.ActiveZone.Items[0].StartTimes.Add(actionInfo.time); } } lastHostile = actionInfo.time; } }
void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { throw new NotImplementedException(); }
void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { }
void encounter_oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (workerRunning) // implement in new way later PLZ, too resource intensive { if (!quickMode) { #region add players to list, sort it, and get boss name if (ffxiv_player_list.Count != int.Parse(txt_partySize.Text)) //partySize { Match m; if (isNewPC(actionInfo.attacker)) { int jobID = 0; foreach (string actionList in ffxiv_jobSkillList) { string toCheckActionName = "#" + actionInfo.theAttackType.ToLower() + "#"; m = Regex.Match(actionList, toCheckActionName); if (m.Success) { ffxiv_player_list.Add(new ffxiv_player() { varName = actionInfo.attacker, varJob = ffxiv_jobList[jobID], varClass = ffxiv_classList[jobID], varOrder = ffxiv_jobSortOrder[jobID] }); log("adding " + actionInfo.attacker + " to player list", false, actionInfo.combatAction.ToString()); break; } jobID++; } } } else { if (!partySorted) { log("fixing player names"); foreach (ffxiv_player p in ffxiv_player_list) { if ((p.varName == "YOU") && (this.txt_you.Text != "")) { p.varName = this.txt_you.Text; } } log("sorting party"); List <ffxiv_player> SortedList = ffxiv_player_list.ToList <ffxiv_player>().OrderBy(o => o.varOrder).ToList(); ffxiv_player_list = new BindingList <ffxiv_player>(SortedList); partySorted = true; this.grid_players.DataSource = ffxiv_player_list; } if (currentFight == "") { if ((isNewPC(actionInfo.victim)) && (actionInfo.victim != "YOU")) { currentFight = actionInfo.victim; //------------------------------ temp //a6s bandaid fix if ((currentFight == "Vortexer") || (currentFight == "Brawler") || (currentFight == "Blaster") || (currentFight == "Swindler")) { currentFight = "Machinery Bay 70"; } this.group_currentFight.Text = currentFight; log("--- Fight Name: " + currentFight, true); } } } #endregion } } //throw new NotImplementedException(); }
void oFormActMain_BeforeCombatAction(bool isImport, CombatActionEventArgs actionInfo) { // Riposte/kontert/ if (lastDamage != null && lastDamage.time == actionInfo.time) { if ((int)lastDamage.damage == (int)Dnum.Unknown && lastDamage.damage.DamageString.Contains("反撃")) { if (actionInfo.swingType == (int)SwingTypeEnum.Melee && actionInfo.victim == lastDamage.attacker) { actionInfo.special = "反撃"; lastDamage.damage.DamageString2 = String.Format("({0} returned)", actionInfo.damage.ToString()); } } if ((int)actionInfo.damage == (int)Dnum.Unknown && actionInfo.damage.DamageString.Contains("reflect")) { if (actionInfo.theAttackType == lastDamage.theAttackType && actionInfo.victim == lastDamage.attacker) { //lastDamage.special = "reflect"; // Too late to take effect actionInfo.damage.DamageString2 = String.Format(" ({0} returned)", lastDamage.damage.ToString()); } } } }
//Handle ACT events void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { throw new NotImplementedException(); }
void AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (PluginMain.Shared.EnabledSimulateFFLogsParses) { var targetId = (string)actionInfo.tags.GetValue(SwingTag.TargetID); var target = ActGlobalsExtension.CurrentActors.GetValue(targetId); if (target != null && !actionInfo.cancelAction) { // Damage Action if (actionInfo.swingType == SwingType.Attack || actionInfo.swingType == SwingType.DamageSkill || actionInfo.swingType == SwingType.Dot) { var damage = actionInfo.damage.Number; var overkill = Math.Min(damage, Math.Max(damage - target.Hp, 0)); if (overkill > 0) { actionInfo.combatAction.Tags[SwingTag.Overkill] = overkill.ToString(); } else { actionInfo.combatAction.Tags.Remove(SwingTag.Overkill); } target.Hp -= (damage - overkill); ActGlobalsExtension.CurrentActors[targetId] = target; } // Healing Action if (actionInfo.swingType == SwingType.HealSkill || actionInfo.swingType == SwingType.Hot) { var healing = actionInfo.damage.Number; var overheal = 0L; if (actionInfo.theDamageType != DamageType.DamageShield && actionInfo.theDamageType != DamageType.Absorb) { overheal = Math.Min(healing, Math.Max((target.Hp + healing) - target.MaxHp, 0)); } if (overheal > 0) { actionInfo.combatAction.Tags[SwingTag.Overheal] = overheal.ToString(); } else { actionInfo.combatAction.Tags.Remove(SwingTag.Overheal); } if (actionInfo.theDamageType != DamageType.DamageShield) { target.Hp += (healing - overheal); ActGlobalsExtension.CurrentActors[targetId] = target; } // support for Emergency Tactics if (emergencyTacticsNames.Contains(actionInfo.theAttackType)) { var emergencyTacticsBuff = ActGlobals.oFormActMain.ActiveZone.ActiveEncounter.GetAllies() .SelectMany(x => x.Items[DamageTypeData.OutgoingBuffDebuff].Items) .Where(x => emergencyTacticsNames.Contains(x.Key)) .SelectMany(x => x.Value.Items) .OrderByDescending(x => x.Time).FirstOrDefault(); if (emergencyTacticsBuff != null && actionInfo.theDamageType == DamageType.Absorb) { var origin = actionInfo.combatAction; // Add new swing var swing = new MasterSwing( origin.SwingType, origin.Critical, origin.Damage.Number, origin.Time, origin.TimeSorter, origin.AttackType, emergencyTacticsBuff.Attacker, "", origin.Victim); swing.Tags.Add(SwingTag.Job, emergencyTacticsBuff.Tags.GetValue(SwingTag.Job)); swing.Tags.Add(SwingTag.ActorID, emergencyTacticsBuff.Tags.GetValue(SwingTag.ActorID)); swing.Tags.Add(SwingTag.TargetID, origin.Tags.GetValue(SwingTag.TargetID)); swing.Tags.Add(SwingTag.Overheal, origin.Tags.GetValue(SwingTag.Overheal)); ActGlobals.oFormActMain.AddCombatAction(swing); origin.Damage.SetNum(0); origin.Tags[SwingTag.Overheal] = 0; } } } } } }
void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (actionInfo.swingType == (int)SwingTypeEnum.Melee || actionInfo.swingType == (int)SwingTypeEnum.NonMelee) lastDamage = actionInfo; }
public static bool JudgeFlankOrRearSkill(CombatActionEventArgs actionInfo) { Boolean isJudge = true; // スキルID取得 Object oSkillId = null; actionInfo.tags.TryGetValue("SkillID", out oSkillId); int numId = Convert.ToInt32(oSkillId); // ダメージ補正(コンボや方向指定の成功により加算されているようである) Object oDmgAdjust = null; actionInfo.tags.TryGetValue("DmgAdjust", out oDmgAdjust); String sDmgAdjust = oDmgAdjust == null ? "" : oDmgAdjust.ToString(); switch (numId) { // 忍者 case 2255: // 旋風刃 // isJudge = sDmgAdjust.Equals("0.7"); // patch 4.5 // isJudge = sDmgAdjust.Equals("0.76"); // patch 5.0 // isJudge = sDmgAdjust.Equals("0.78"); // patch 5.08 isJudge = sDmgAdjust.Equals("0.79"); // patch 5.1 break; case 3563: // 強甲破点突 // isJudge = sDmgAdjust.Equals("0.66"); // patch 4.5 // isJudge = sDmgAdjust.Equals("0.74"); // patch 5.0 // isJudge = sDmgAdjust.Equals("0.77"); // patch 5.08 isJudge = sDmgAdjust.Equals("0.78"); // patch 5.1 break; case 2258: // だまし isJudge = !sDmgAdjust.Equals(""); break; // 竜騎士 case 88: // 桜華 //isJudge = sDmgAdjust.Equals("0.64"); // コンボ失敗して背面攻撃したら 0.28(コンボ成功時のみ考慮で良いとは思うが一応追加した) // isJudge = sDmgAdjust.Equals("0.64") || sDmgAdjust.Equals("0.28"); // patch 4.5 isJudge = sDmgAdjust.Equals("0.69") || sDmgAdjust.Equals("0.28"); // patch 5.0 break; case 79: // ヘヴィスラスト case 3554: // 竜牙竜爪(側面) case 3556: // 竜尾大車輪(背面) isJudge = !sDmgAdjust.Equals(""); break; // モンク case 53: // 連撃 // 連撃はlogから判定する break; case 74: // 双竜脚 case 61: // 双掌打 case 56: // 崩拳 case 54: // 正拳突き case 66: // 破砕拳 isJudge = !sDmgAdjust.Equals(""); break; default: isJudge = true; break; } return(isJudge); }
private void OFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { //UpdateText(actionInfo.ToString()); //MainWindow.overlay.tbLog.Text += actionInfo.combatAction.ToString(); -- throw exception Debug.WriteLine(actionInfo.combatAction.ToString()); }
#pragma warning disable IDE1006 // Naming Styles void oFormActMain_AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) #pragma warning restore IDE1006 // Naming Styles { string player = actionInfo.attacker; Parse p = new Parse(player, "Excalibur", "NA"); }