Ejemplo n.º 1
0
    public override bool OperatorSearch(KCharacter pCharacter)
    {
        int nRetCode = 0;

        //KTarget Target = new KTarget();

        if (nLeftCount == 0)
        {
            return(false);
        }

        if (!bTargetArea || dwTargetID != pCharacter.m_dwID)
        {
            nRetCode = CanApply(pCharacter);
            if (nRetCode == 0)
            {
                goto Exit0;
            }

            nLeftCount--;
            pCharacter.ApplyBullet(pBullet);
        }

Exit0:
        return(true);
    }
Ejemplo n.º 2
0
    public SKILL_RESULT_CODE ApplyOnSingle(KSKILL_BULLET pBullet)
    {
        SKILL_RESULT_CODE nResult = SKILL_RESULT_CODE.srcFailed;
        int         nRetCode      = 0;
        TARGET_TYPE eTargetType   = TARGET_TYPE.ttInvalid;

        KCharacter pCharacter = null;

        eTargetType = pBullet.pTarget.GetTargetType();

        switch (eTargetType)
        {
        case TARGET_TYPE.ttNoTarget:
            break;

        case TARGET_TYPE.ttCoordination:
            break;

        case TARGET_TYPE.ttNpc:
        case TARGET_TYPE.ttPlayer:
            nRetCode = pBullet.pTarget.GetTarget(ref pCharacter);
            if (nRetCode == 0 || pCharacter == null)
            {
                goto Exit0;
            }

            pCharacter.ApplyBullet(pBullet);

            break;

        default:
            goto Exit0;
            break;
        }

        nResult = SKILL_RESULT_CODE.srcSuccess;
Exit0:
        return(nResult);
    }