コード例 #1
0
        private void processLine(string[] columns)
        {
            if (columns[0] == "02")
            {
                charName = columns[3];
                return;
            }

            string targetName = string.Empty;

            switch (columns[0])
            {
            case "21":
            case "22":
                targetName = columns[7];
                break;

            case "26":
            case "30":
                targetName = columns[8];
                break;
            }

            if (string.IsNullOrEmpty(targetName))
            {
                if (columns[0] != "25")
                {
                    return;
                }

                Combatant combatant = null;
                combatants.TryRemove(columns[3], out combatant);
                if (combatant == null)
                {
                    return;
                }

                combatant.Killed(ActGlobals.oFormActMain.ActiveZone?.ActiveEncounter?.Duration, columns[1]);
                deadCombatants.Add(combatant);

                yUDieHeader.SetDeadCombatants(deadCombatants, allies.Keys);
            }
            else
            {
                if (!combatants.ContainsKey(targetName))
                {
                    combatants.TryAdd(targetName, new Combatant(targetName, combatants));
                }

                Combatant combatant = null;
                combatants.TryGetValue(targetName, out combatant);
                if (combatant == null)
                {
                    return;
                }

                switch (columns[0])
                {
                case "21":
                case "22":
                    if (columns[3] == targetName)
                    {
                        return;
                    }
                    combatant.Update(new SkillInfo(
                                         /* Caster Name */ allies.ContainsKey(columns[3]), columns[3],
                                         /* Skill Name */ columns[5],
                                         ActGlobals.oFormActMain.ActiveZone?.ActiveEncounter?.Duration,
                                         /* Damage */ columns[9],
                                         /* Target HP */ columns[24]));
                    break;

                case "26":
                    combatant.Update(columns[2], columns[3]);
                    break;

                case "30":
                    combatant.End(columns[2], columns[1]);
                    break;
                }
            }
        }
コード例 #2
0
ファイル: YUDiePanel.cs プロジェクト: zaiha/porier-land
 public void SetCombatant(Combatant combatant)
 {
     this.combatant = combatant;
     refreshControls();
 }