Ejemplo n.º 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);
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
    public static void CollisionRequest(PosObj po)
    {
        Boolean     flag     = false;
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;
        Int32       nil      = instance.nil;
        Single      nilFloat = instance.nilFloat;
        Obj         obj;

        if (EventCollision.CheckNPCInput(po))
        {
            if (instance.gMode != 3)
            {
                return;
            }
            obj = EventCollision.Collision(instance, po, 2, ref nilFloat);
        }
        else
        {
            obj = EventCollision.Collision(instance, po, 4, ref nilFloat);
            if (obj != null)
            {
                EventCollision.sSysAngle = EventCollision.CollisionAngle(po, obj);
                if (EventCollision.sSysAngle > -1024 && EventCollision.sSysAngle < 1024)
                {
                    if (EventCollision.IsNPCTalkable(obj))
                    {
                        flag = EIcon.PollCollisionIcon(obj);
                    }
                    if (!flag)
                    {
                        obj = EventCollision.Collision(instance, po, 2, ref nilFloat);
                    }
                }
                else
                {
                    obj = EventCollision.Collision(instance, po, 2, ref nilFloat);
                }
            }
            else
            {
                obj = EventCollision.Collision(instance, po, 2, ref nilFloat);
                if (instance.gMode == 3 && obj != null)
                {
                    WMActor wmActor = ((Actor)po).wmActor;
                    if (wmActor.ControlNo == 0)
                    {
                        flag = EIcon.PollCollisionIcon(obj);
                    }
                }
            }
        }
        if (obj != null && EventCollision.CheckNPCPush((PosObj)obj))
        {
            instance.Request(obj, 1, 2, false);
        }
        if (EventCollision.CheckQuadInput(po))
        {
            return;
        }
        obj = instance.TreadQuad(po, 2);
        if (obj != null)
        {
            Boolean flag2 = EventCollision.CheckQuadPush(po, obj) && instance.Request(obj, 1, 2, false);
            if (flag2)
            {
                if (instance.GetIP((Int32)obj.sid, 8, obj.ebData) != instance.nil)
                {
                    EIcon.PollFIcon(2);
                }
                else
                {
                    Int16 fldMapNo = FF9StateSystem.Common.FF9.fldMapNo;
                    if (fldMapNo == 2108)
                    {
                        if (EventCollision.CheckQuadTalk(po, obj))
                        {
                            EIcon.PollFIcon(1);
                        }
                    }
                }
            }
        }
        obj = instance.TreadQuad(po, 4);
        if (obj != null && EventCollision.CheckQuadTalk(po, obj) && EventCollision.IsQuadTalkable(po, obj))
        {
            EIcon.PollCollisionIcon(obj);
        }
        if (instance.gMode == 3 && obj == null)
        {
            if (EventCollision.IsChocoboWalkingOrFlyingInForestArea())
            {
                EIcon.PollFIcon(1);
            }
            else if (!flag && EMinigame.CheckBeachMinigame())
            {
                EIcon.PollFIcon(3);
            }
        }
    }
Ejemplo n.º 4
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);
    }