예제 #1
0
    public static void ProcessHereIcon(PosObj po)
    {
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;

        if (instance.GetUserControl() && (ETb.KeyOn() & 1U) > 0U)
        {
            sHereIconTimer = 60;
            sHereIconForce = true;
            hereIconShow   = false;
        }
        if (sHereIconTimer > 0)
        {
            --sHereIconTimer;
            if (sHereIconTimer <= 0)
            {
                sHereIconForce = false;
            }
            if (instance.gMode != 1 || hereIconShow || (lastPollType != PollType.NONE || sHereIconTimer <= 0) || sHereIconTimer >= 58)
            {
                return;
            }
            ShowHereIcon(po);
        }
        else
        {
            CloseHereIcon();
        }
    }
예제 #2
0
    public static Boolean CheckQuadInput(PosObj po)
    {
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;
        UInt32      num      = ETb.KeyOn() & (UInt32)((instance.gMode != 1) ? EventInput.Lcircle : (EventInput.Lcircle | 524288u));

        if (num > 0u)
        {
            Obj obj = instance.TreadQuad(po, 4);
            if (obj != null && EventCollision.IsQuadTalkable(po, obj))
            {
                if (num == 524288u && instance.Request(obj, 1, 8, false))
                {
                    EventCollision.ClearPathFinding(po);
                    EMinigame.SetQuadmistOpponentId(obj);
                    return(true);
                }
                if (instance.Request(obj, 1, 3, false))
                {
                    EventCollision.ClearPathFinding(po);
                    return(true);
                }
            }
        }
        return(false);
    }
예제 #3
0
    public static void ProcessHereIcon(PosObj po)
    {
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;

        if (instance.GetUserControl() && (ETb.KeyOn() & 1u) > 0u)
        {
            EIcon.sHereIconTimer = 60;
            EIcon.sHereIconForce = true;
            EIcon.hereIconShow   = false;
        }
        if (EIcon.sHereIconTimer > 0)
        {
            EIcon.sHereIconTimer--;
            if (EIcon.sHereIconTimer <= 0)
            {
                EIcon.sHereIconForce = false;
            }
            if (instance.gMode == 1 && !EIcon.hereIconShow && EIcon.lastPollType == EIcon.PollType.NONE && EIcon.sHereIconTimer > 0 && EIcon.sHereIconTimer < 58)
            {
                EIcon.ShowHereIcon(po);
            }
        }
        else
        {
            EIcon.CloseHereIcon();
        }
    }
예제 #4
0
    public static Boolean CheckNPCInput(PosObj po)
    {
        EventEngine instance = PersistenSingleton <EventEngine> .Instance;
        UInt32      num      = ETb.KeyOn() & (UInt32)((instance.gMode != 1) ? EventInput.Lcircle : (EventInput.Lcircle | 524288u));

        if (num > 0u)
        {
            Int32  nil      = instance.nil;
            Single nilFloat = instance.nilFloat;
            Obj    obj      = EventCollision.Collision(instance, po, 4, ref nilFloat);
            if (obj != null && EventCollision.IsNPCTalkable(obj))
            {
                EventCollision.sSysAngle = EventCollision.CollisionAngle(po, obj);
                if (EventCollision.sSysAngle > -1024 && EventCollision.sSysAngle < 1024)
                {
                    ((Actor)po).listener = obj.uid;
                    if (num == 524288u)
                    {
                        Boolean flag = instance.Request(obj, 1, 8, false);
                        if (flag)
                        {
                            EventCollision.ClearPathFinding(po);
                            EMinigame.SetQuadmistOpponentId(obj);
                            return(flag);
                        }
                    }
                    Boolean flag2 = instance.Request(obj, 1, 3, false);
                    if (flag2)
                    {
                        EventCollision.ClearPathFinding(po);
                        return(flag2);
                    }
                }
            }
        }
        return(false);
    }