Esempio n. 1
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);
    }
Esempio n. 2
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);
    }