コード例 #1
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);
    }
コード例 #2
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);
            }
        }
    }