示例#1
0
    public static void Btl2dMain()
    {
        FF9StateBattleSystem ff9Battle      = FF9StateSystem.Battle.FF9Battle;
        BTL2D_WORK           btl2d_work_set = ff9Battle.btl2d_work_set;
        Int16 num = btl2d_work_set.NewID;

        for (Int16 num2 = 0; num2 < 16; num2 = (Int16)(num2 + 1))
        {
            BTL2D_ENT btl2D_ENT = btl2d_work_set.Entry[num];
            if (btl2D_ENT.BtlPtr != null)
            {
                if (btl2D_ENT.Type > 2)
                {
                    btl2D_ENT.BtlPtr = null;
                }
                else if (btl2D_ENT.Delay != 0)
                {
                    BTL2D_ENT btl2D_ENT2 = btl2D_ENT;
                    btl2D_ENT2.Delay = (Byte)(btl2D_ENT2.Delay - 1);
                }
                else
                {
                    String text = String.Empty;
                    HUDMessage.MessageStyle style = HUDMessage.MessageStyle.DAMAGE;
                    if (btl2D_ENT.Type == 0)
                    {
                        if (btl2D_ENT.Work.Num.Color == 0)
                        {
                            style = HUDMessage.MessageStyle.DAMAGE;
                        }
                        else
                        {
                            style = HUDMessage.MessageStyle.RESTORE_HP;
                        }
                        text = btl2D_ENT.Work.Num.Value.ToString();
                    }
                    else if (btl2D_ENT.Type == 1)
                    {
                        if (btl2D_ENT.Work.Num.Color == 0)
                        {
                            style = HUDMessage.MessageStyle.DAMAGE;
                        }
                        else
                        {
                            style = HUDMessage.MessageStyle.RESTORE_MP;
                        }
                        text = btl2D_ENT.Work.Num.Value.ToString() + " " + Localization.Get("MPCaption");
                    }
                    else if (btl2D_ENT.Type == 2)
                    {
                        if (btl2D_ENT.Work.Num.Value == 0u)
                        {
                            text  = Localization.Get("Miss");
                            style = HUDMessage.MessageStyle.MISS;
                        }
                        else if (btl2D_ENT.Work.Num.Value == 1u)
                        {
                            text  = Localization.Get("Death");
                            style = HUDMessage.MessageStyle.DEATH;
                        }
                        else if (btl2D_ENT.Work.Num.Value == 2u)
                        {
                            text  = Localization.Get("Guard");
                            style = HUDMessage.MessageStyle.GUARD;
                        }
                        else if (btl2D_ENT.Work.Num.Value == 3u)
                        {
                            text  = NGUIText.FF9YellowColor + Localization.Get("Critical") + "[-] \n " + text;
                            style = HUDMessage.MessageStyle.CRITICAL;
                        }
                    }
                    Singleton <HUDMessage> .Instance.Show(btl2D_ENT.trans, text, style, new Vector3(0f, btl2D_ENT.Yofs, 0f), 0);

                    UIManager.Battle.DisplayParty();
                    btl2D_ENT.BtlPtr = null;
                }
            }
            num = (Int16)(num + 1);
            if (num >= 16)
            {
                num = 0;
            }
        }
        btl2d.Btl2dStatCount();
        if (SFX.GetEffectJTexUsed() == 0)
        {
            btl2d.Btl2dStatIcon();
        }
        BTL2D_WORK btl2D_WORK = btl2d_work_set;

        btl2D_WORK.Timer = (UInt16)(btl2D_WORK.Timer + 1);
        Byte b = Byte.MaxValue;

        for (BTL_DATA next = ff9Battle.btl_list.next; next != null; next = next.next)
        {
            if (next.bi.disappear == 0)
            {
                b = (Byte)(b & (Byte)(~(Byte)next.btl_id));
            }
        }
        btl2d_work_set.OldDisappear = b;
    }