示例#1
0
    public static Boolean PollCollisionIcon(Obj targetObject)
    {
        Boolean result = false;

        if (EventHUD.CurrentHUD == MinigameHUD.MogTutorial)
        {
            return(result);
        }
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;

        if (instance.gMode == 1)
        {
            Boolean flag  = instance.GetIP((Int32)targetObject.sid, 3, targetObject.ebData) != instance.nil && 1 < targetObject.level;
            Boolean flag2 = instance.GetIP((Int32)targetObject.sid, 8, targetObject.ebData) != instance.nil && 1 < targetObject.level;
            if (flag && flag2)
            {
                EIcon.PollFIcon(2);
                result = true;
            }
            else if (flag && instance.IsActuallyTalkable(targetObject))
            {
                EIcon.PollFIcon(1);
                result = true;
            }
        }
        else
        {
            Boolean flag = instance.GetIP((Int32)targetObject.sid, 2, targetObject.ebData) != instance.nil && 1 < targetObject.level;
            if (flag)
            {
                if (EMinigame.CheckBeachMinigame() && !EventCollision.IsWorldTrigger())
                {
                    EIcon.PollFIcon(4);
                }
                else
                {
                    EIcon.PollFIcon(1);
                }
                result = true;
            }
        }
        return(result);
    }
示例#2
0
文件: EIcon.cs 项目: uzoko1/Memoria
    public static bool PollCollisionIcon(Obj targetObject)
    {
        if (EventHUD.CurrentHUD == MinigameHUD.MogTutorial)
        {
            return(false);
        }

        bool flag1 = false;

        EventEngine instance = PersistenSingleton <EventEngine> .Instance;

        if (instance.gMode == 1)
        {
            bool flag2 = instance.GetIP(targetObject.sid, 3, targetObject.ebData) != instance.nil && 1 < targetObject.level;
            bool flag3 = instance.GetIP(targetObject.sid, 8, targetObject.ebData) != instance.nil && 1 < targetObject.level;
            if (flag2 && flag3)
            {
                PollFIcon(2);
                flag1 = true;
            }
            else if (flag2 && instance.IsActuallyTalkable(targetObject))
            {
                PollFIcon(1);
                flag1 = true;
            }
        }
        else if (instance.GetIP(targetObject.sid, 2, targetObject.ebData) != instance.nil && 1 < targetObject.level)
        {
            if (EMinigame.CheckBeachMinigame() && !EventCollision.IsWorldTrigger())
            {
                PollFIcon(4);
            }
            else
            {
                PollFIcon(1);
            }
            flag1 = true;
        }
        return(flag1);
    }
示例#3
0
    public static UInt32 ReadInput()
    {
        UInt32 num = 0u;

        if (!EventInput.isProcessingInput)
        {
            EventInput.ResetWorldTriggerButton();
            return(num);
        }
        Int32   fldMapNo = (Int32)FF9StateSystem.Common.FF9.fldMapNo;
        Int32   gMode    = PersistenSingleton <EventEngine> .Instance.gMode;
        Boolean isKeyboardOrJoystickInput = EventInput.IsKeyboardOrJoystickInput;

        if (Singleton <BubbleUI> .Instance.IsActive)
        {
            if (gMode == 1)
            {
                if (fldMapNo == 1420 && EventInput.CheckLadderFlag())
                {
                    num = EventInput.ProcessInput(false, false);
                }
                else
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
            else if (gMode == 3)
            {
                if (FF9StateSystem.MobilePlatform)
                {
                    num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput);
                    EventInput.GetWorldTriggerButton(ref num);
                }
                else
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
        }
        else if (EventHUD.CurrentHUD != MinigameHUD.None)
        {
            MinigameHUD currentHUD = EventHUD.CurrentHUD;
            if (currentHUD != MinigameHUD.Chanbara)
            {
                if (currentHUD != MinigameHUD.RacingHippaul)
                {
                    num = EventInput.ProcessInput(false, true);
                }
                else
                {
                    num = EventInput.ProcessInput(false, false);
                }
            }
            else
            {
                num  = EventInput.ProcessInput(true, true);
                num &= EventInput.ChanbaraMask;
                if (FF9StateSystem.MobilePlatform)
                {
                    if ((num & 8u) > 0u)
                    {
                        EventInput.IsNeedAddStartSignal = true;
                    }
                    else if (EventInput.addStartSignal > 0)
                    {
                        num |= 8u;
                        EventInput.addStartSignal--;
                        EventInput.InputLog("Extra Start");
                    }
                }
            }
        }
        else if (fldMapNo == 606)
        {
            if (EventHUD.CurrentHUD == MinigameHUD.Telescope)
            {
                num = EventInput.ProcessInput(false, true);
            }
        }
        else if (fldMapNo == 2204 && TimerUI.Enable)
        {
            num = EventInput.ProcessInput(false, false);
        }
        else if (fldMapNo == 1607)
        {
            num = EventInput.ProcessInput(false, false);
        }
        else if (fldMapNo == 1420)
        {
            num = EventInput.ProcessInput(false, true);
        }
        else if (fldMapNo == 1422)
        {
            num = EventInput.ProcessInput(false, true);
        }
        else
        {
            Dialog mognetDialog = Singleton <DialogManager> .Instance.GetMognetDialog();

            if (mognetDialog != (UnityEngine.Object)null)
            {
                if (mognetDialog.IsChoiceReady)
                {
                    num = EventInput.ProcessInput(false, true);
                }
            }
            else if (FF9StateSystem.MobilePlatform)
            {
                num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput);
                if (isKeyboardOrJoystickInput)
                {
                    UIManager.Input.ResetTriggerEvent();
                }
                EventInput.GetWorldTriggerButton(ref num);
            }
            else
            {
                num = EventInput.ProcessInput(false, true);
            }
        }
        num |= EventInput.eventButtonInput;
        if (EventInput.isDialogConfirm)
        {
            num |= EventInput.ConfirmMask;
            EventInput.isDialogConfirm = false;
        }
        if (HonoBehaviorSystem.Instance.IsFastForwardModeActive())
        {
            if (FF9StateSystem.MobilePlatform)
            {
                if (fldMapNo == 909 || fldMapNo == 1909)
                {
                    num = EventInput.FastForwardProcess(gMode, fldMapNo, num);
                }
            }
            else
            {
                num = EventInput.FastForwardProcess(gMode, fldMapNo, num);
            }
        }
        num &= ~EventInput.PSXCntlPadMask[0];
        if (FF9StateSystem.MobilePlatform && gMode == 3 && EventCollision.IsRidingChocobo())
        {
            if ((num & 524288u) > 0u || (num & 32768u) > 0u)
            {
                EventInput.isPressedDig = true;
            }
            else if ((num & 16777216u) > 0u || (num & 4096u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
            else if ((num & EventInput.Lx) > 0u || (num & 16384u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
            else if ((num & 1u) > 0u || (num & 1u) > 0u)
            {
                EventInput.isPressedDig = false;
            }
        }
        if (gMode == 3 && EventEngineUtils.IsMogCalled(PersistenSingleton <EventEngine> .Instance))
        {
            ff9.w_isMogActive = true;
        }
        if (gMode == 3 && EMinigame.CheckBeachMinigame() && EventCollision.IsWorldTrigger() && (num & CancelMask) > 0u)
        {
            num &= ~CancelMask;
            EventInput.InputLog("Remove cancel mask for <SQEX> #2893");
        }
        EventInput.eventButtonInput = 0u;
        EventInput.ResetWorldTriggerButton();
        return(num);
    }