Ejemplo n.º 1
0
    public new void onBullet(int id)
    {
        bool flag = this.m_linkProfessionRole.getShowSkillEff() == 3 || this.m_linkProfessionRole.getShowSkillEff() == 2;

        if (!flag)
        {
            bool flag2 = id == 1;
            if (flag2)
            {
                Vector3 position = base.transform.position + base.transform.forward * 1.5f;
                HitData hitData  = this.m_linkProfessionRole.Build_PRBullet(2001u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position, base.transform.rotation);
                hitData.m_nDamage    = 108;
                hitData.m_Color_Main = Color.gray;
                hitData.m_Color_Rim  = Color.white;
                hitData.m_nHurtFX    = 2;
            }
            bool flag3 = id == 2;
            if (flag3)
            {
                Vector3 position2 = base.transform.position + base.transform.forward * 1.5f;
                HitData hitData2  = this.m_linkProfessionRole.Build_PRBullet(2001u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position2, base.transform.rotation);
                hitData2.m_nDamage    = 128;
                hitData2.m_Color_Main = Color.gray;
                hitData2.m_Color_Rim  = Color.white;
                hitData2.m_nHurtFX    = 2;
            }
            bool flag4 = id == 3;
            if (flag4)
            {
                Vector3 position3 = base.transform.position + base.transform.forward * 2.5f;
                HitData hitData3  = this.m_linkProfessionRole.Build_PRBullet(2001u, 0.125f, SceneTFX.m_Bullet_Prefabs[4], position3, base.transform.rotation);
                hitData3.m_nDamage      = 188;
                hitData3.m_Color_Main   = Color.gray;
                hitData3.m_Color_Rim    = Color.white;
                hitData3.m_nHurtFX      = 2;
                hitData3.m_nHurtSP_type = 11;
                hitData3.m_nHurtSP_pow  = 3;
                hitData3.m_nLastHit     = 1;
            }
            bool flag5 = id == 4;
            if (flag5)
            {
                Vector3 position4 = base.transform.position;
                HitData hitData4  = this.m_linkProfessionRole.Build_PRBullet(2003u, 0.125f, SceneTFX.m_Bullet_Prefabs[4], position4, base.transform.rotation);
                hitData4.m_nDamage    = 88;
                hitData4.m_Color_Main = Color.red;
                hitData4.m_Color_Rim  = Color.red;
                hitData4.m_nHurtFX    = 3;
            }
            bool flag6 = id == 21;
            if (flag6)
            {
                Vector3 position5 = base.transform.position + base.transform.forward * 4f;
                HitData hitData5  = this.m_linkProfessionRole.Build_PRBullet(2004u, 0.2f, SceneTFX.m_Bullet_Prefabs[6], position5, base.transform.rotation);
                hitData5.m_nDamage      = 388;
                hitData5.m_Color_Main   = Color.red;
                hitData5.m_Color_Rim    = Color.red;
                hitData5.m_nHurtSP_type = 1;
                hitData5.m_nHurtSP_pow  = 4;
            }
            bool flag7 = 13 == id;
            if (flag7)
            {
                bool flag8 = this.m_linkProfessionRole.m_LockRole != null;
                if (flag8)
                {
                    Vector3 position6 = base.transform.position + base.transform.forward * 0.5f;
                    position6.y += 1.25f;
                    HitData bullet = this.m_linkProfessionRole.Build_PRBullet(2004u, 0f, P2Warrior_Event.WARRIOR_B1, position6, base.transform.rotation);
                    FollowBullet_Mgr.AddBullet(this.m_linkProfessionRole.m_LockRole, bullet, 0.8f);
                }
            }
            bool flag9 = 141 == id;
            if (flag9)
            {
                Vector3 position7 = base.transform.position + base.transform.forward * 3f;
                HitData hitData6  = this.m_linkProfessionRole.Build_PRBullet(2002u, 0.3f, SceneTFX.m_Bullet_Prefabs[4], position7, base.transform.rotation);
                hitData6.m_nDamage    = 108;
                hitData6.m_Color_Main = Color.gray;
                hitData6.m_Color_Rim  = Color.white;
                hitData6.m_nHurtFX    = 2;
            }
            bool flag10 = 142 == id;
            if (flag10)
            {
                Vector3 position8 = base.transform.position + base.transform.forward * 6f;
                HitData hitData7  = this.m_linkProfessionRole.Build_PRBullet(2002u, 0.3f, SceneTFX.m_Bullet_Prefabs[4], position8, base.transform.rotation);
                hitData7.m_nDamage    = 88;
                hitData7.m_Color_Main = Color.gray;
                hitData7.m_Color_Rim  = Color.white;
                hitData7.m_nHurtFX    = 2;
            }
            bool flag11 = 143 == id;
            if (flag11)
            {
                Vector3 position9 = base.transform.position + base.transform.forward * 4f;
                HitData hitData8  = this.m_linkProfessionRole.Build_PRBullet(2002u, 0.2f, SceneTFX.m_Bullet_Prefabs[6], position9, base.transform.rotation);
                hitData8.m_nDamage      = 188;
                hitData8.m_Color_Main   = Color.gray;
                hitData8.m_Color_Rim    = Color.white;
                hitData8.m_nHurtFX      = 2;
                hitData8.m_nHurtSP_type = 21;
                hitData8.m_nHurtSP_pow  = 4;
            }
            bool flag12 = 2009 == id;
            if (flag12)
            {
                Vector3 position10 = base.transform.position + base.transform.forward * 3f;
                HitData hitData9   = this.m_linkProfessionRole.Build_PRBullet(2009u, 0.2f, SceneTFX.m_Bullet_Prefabs[5], position10, base.transform.rotation);
                hitData9.m_nDamage      = 88;
                hitData9.m_Color_Main   = Color.red;
                hitData9.m_Color_Rim    = Color.red;
                hitData9.m_nHurtSP_type = 11;
                hitData9.m_nHurtSP_pow  = 4;
                hitData9.m_nHurtFX      = 6;
            }
            bool flag13 = 2006 == id;
            if (flag13)
            {
                Vector3 position11 = base.transform.position + base.transform.forward * 3f;
                HitData hitData10  = this.m_linkProfessionRole.Build_PRBullet(2006u, 0.2f, SceneTFX.m_Bullet_Prefabs[6], position11, base.transform.rotation);
                hitData10.m_nDamage      = 88;
                hitData10.m_Color_Main   = Color.red;
                hitData10.m_Color_Rim    = Color.red;
                hitData10.m_nHurtSP_type = 11;
                hitData10.m_nHurtSP_pow  = 4;
                hitData10.m_nHurtFX      = 6;
            }
            bool flag14 = 2007 == id;
            if (flag14)
            {
                Vector3 position12 = base.transform.position + base.transform.forward * 1f;
                HitData hitData11  = this.m_linkProfessionRole.Build_PRBullet(2007u, 0.3f, SceneTFX.m_Bullet_Prefabs[4], position12, base.transform.rotation);
                hitData11.m_nDamage      = 88;
                hitData11.m_Color_Main   = Color.red;
                hitData11.m_Color_Rim    = Color.red;
                hitData11.m_nHurtSP_type = 11;
                hitData11.m_nHurtSP_pow  = 10;
                hitData11.m_nHurtFX      = 3;
            }
        }
    }
Ejemplo n.º 2
0
    public void onBullet(int id)
    {
        bool flag = this.m_monRole is M000P3 || this.m_monRole is ohterP3Mage;

        if (flag)
        {
            bool flag2 = id == 1;
            if (flag2)
            {
                Vector3 position = base.transform.position + base.transform.forward * 0.5f;
                position.y += 1.25f;
                GameObject gameObject = UnityEngine.Object.Instantiate(M0x000_Role_Event.MAGE_B1, position, base.transform.rotation) as GameObject;
                gameObject.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                Transform transform = gameObject.transform.FindChild("t");
                bool      flag3     = transform != null;
                if (flag3)
                {
                    HitData hitData = this.m_monRole.Link_PRBullet(3001u, 2f, gameObject, transform);
                    hitData.m_Color_Main       = Color.gray;
                    hitData.m_Color_Rim        = Color.white;
                    hitData.m_nDamage          = 277;
                    hitData.m_aniTrack         = transform.GetComponent <Animator>();
                    transform.gameObject.layer = EnumLayer.LM_BT_FIGHT;
                    Transform transform2 = transform.FindChild("f");
                    bool      flag4      = transform2 != null;
                    if (flag4)
                    {
                        hitData.m_aniFx = transform2.GetComponent <Animator>();
                    }
                }
            }
            bool flag5 = id == 2;
            if (flag5)
            {
                Vector3 vector = base.transform.position;
                vector.y += 1f + UnityEngine.Random.Range(0f, 1f);
                bool flag6 = UnityEngine.Random.Range(0, 16) > 7;
                if (flag6)
                {
                    vector += base.transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
                }
                else
                {
                    vector -= base.transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
                }
                GameObject gameObject2 = UnityEngine.Object.Instantiate(M0x000_Role_Event.MAGE_B2, vector, base.transform.rotation) as GameObject;
                gameObject2.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                Transform transform3 = gameObject2.transform.FindChild("t");
                bool      flag7      = transform3 != null;
                if (flag7)
                {
                    HitData hitData2 = this.m_monRole.Link_PRBullet(3005u, 2f, gameObject2, transform3);
                    hitData2.m_nHurtSP_type     = 11;
                    hitData2.m_nHurtSP_pow      = 1;
                    hitData2.m_aniTrack         = transform3.GetComponent <Animator>();
                    transform3.gameObject.layer = EnumLayer.LM_BT_FIGHT;
                    Transform transform4 = transform3.FindChild("f");
                    bool      flag8      = transform4 != null;
                    if (flag8)
                    {
                        hitData2.m_aniFx = transform4.GetComponent <Animator>();
                    }
                }
            }
            bool flag9 = id == 101;
            if (flag9)
            {
                Vector3 position2 = base.transform.position;
                HitData hitData3  = this.m_monRole.Build_PRBullet(3004u, 0.125f, SceneTFX.m_Bullet_Prefabs[7], position2, base.transform.rotation);
                hitData3.m_nDamage      = 288;
                hitData3.m_Color_Main   = Color.blue;
                hitData3.m_Color_Rim    = Color.cyan;
                hitData3.m_nHurtFX      = 1;
                hitData3.m_nHurtSP_type = 11;
                hitData3.m_nHurtSP_pow  = 2;
            }
            bool flag10 = 3006 == id;
            if (flag10)
            {
                bool flag11 = this.m_monRole.m_LockRole == null;
                if (flag11)
                {
                    return;
                }
                Vector3 position3 = this.m_monRole.m_LockRole.m_curModel.position;
                position3.z += UnityEngine.Random.Range(-2f, 2f);
                position3.x += UnityEngine.Random.Range(-2f, 2f);
                position3.y += 8f;
                GameObject gameObject3 = UnityEngine.Object.Instantiate(P3Mage_Event.MAGE_B6, position3, base.transform.rotation) as GameObject;
                gameObject3.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                Transform transform5 = gameObject3.transform.FindChild("t");
                bool      flag12     = transform5 != null;
                if (flag12)
                {
                    HitData hitData4 = this.m_monRole.Link_PRBullet(3006u, 3f, gameObject3, transform5);
                    hitData4.m_nHurtSP_type     = 11;
                    hitData4.m_nHurtSP_pow      = 1;
                    hitData4.m_bOnlyHit         = false;
                    hitData4.m_Color_Main       = Color.blue;
                    hitData4.m_Color_Rim        = Color.white;
                    hitData4.m_aniTrack         = transform5.GetComponent <Animator>();
                    transform5.gameObject.layer = EnumLayer.LM_BT_FIGHT;
                    Transform transform6 = transform5.FindChild("f");
                    bool      flag13     = transform6 != null;
                    if (flag13)
                    {
                        hitData4.m_aniFx = transform6.GetComponent <Animator>();
                    }
                }
            }
            bool flag14 = 3002 == id;
            if (flag14)
            {
                this.cur_3002_num     = 0;
                this.cur_3002_forward = base.transform.forward;
                this.cur_3002_pos     = base.transform.position;
                base.CancelInvoke("skill_3002");
                base.InvokeRepeating("skill_3002", 0f, 0.2f);
            }
            bool flag15 = 3009 == id;
            if (flag15)
            {
                Vector3 position4 = base.transform.position + base.transform.forward * 3.5f;
                HitData hitData5  = this.m_monRole.Build_PRBullet(3009u, 0.125f, SceneTFX.m_Bullet_Prefabs[7], position4, base.transform.rotation);
                hitData5.m_nDamage      = 288;
                hitData5.m_Color_Main   = Color.white;
                hitData5.m_Color_Rim    = new Color(0.02f, 0.73f, 0.92f, 0.51f);
                hitData5.m_nHurtSP_type = 31;
                hitData5.m_nHurtSP_pow  = 2;
            }
            bool flag16 = 30071 == id;
            if (flag16)
            {
                Vector3 vector2  = base.transform.position + base.transform.forward * 7f;
                HitData hitData6 = this.m_monRole.Build_PRBullet(3007u, 3.5f, SceneTFX.m_Bullet_Prefabs[8], vector2, base.transform.rotation);
                hitData6.m_nDamage      = 0;
                hitData6.m_Color_Main   = Color.gray;
                hitData6.m_Color_Rim    = Color.white;
                vector2.y              += 1f;
                hitData6.m_nHurtSP_pos  = vector2;
                hitData6.m_nHurtSP_type = 14;
                hitData6.m_nHurtSP_pow  = 4;
                hitData6.m_hurtNum      = 0;
            }
            bool flag17 = 30072 == id;
            if (flag17)
            {
                this.cur_3007_1_time = 0;
                base.CancelInvoke("skill_3007_1");
                base.InvokeRepeating("skill_3007_1", 0f, 0.4f);
            }
            bool flag18 = 30073 == id;
            if (flag18)
            {
                this.cur_3007_2_time = 0;
                base.CancelInvoke("skill_3007_2");
                base.InvokeRepeating("skill_3007_2", 0f, 0.4f);
            }
            bool flag19 = 30111 == id;
            if (flag19)
            {
                this.m_cur_ball_30111.Clear();
                bool flag20 = this.m_monRole == null;
                if (flag20)
                {
                    return;
                }
                this.ball_30111_pos   = this.m_monRole.m_LockRole.m_curModel.position;
                this.ball_30111_hight = this.m_monRole.m_LockRole.headOffset.y / 2f;
                this.ball_3011_dis    = Vector3.Distance(base.transform.position, this.m_monRole.m_LockRole.m_curModel.position);
                GameObject gameObject4 = UnityEngine.Object.Instantiate(M0x000_Role_Event.MAGE_S3011, base.transform.position, base.transform.rotation) as GameObject;
                gameObject4.transform.SetParent(U3DAPI.FX_POOL_TF, false);
                for (int i = 1; i <= gameObject4.transform.FindChild("heiqiu").childCount; i++)
                {
                    this.m_cur_ball_30111.Add(gameObject4.transform.FindChild("heiqiu/0" + i));
                }
                UnityEngine.Object.Destroy(gameObject4, 6f);
            }
            bool flag21 = 30112 == id;
            if (flag21)
            {
                bool flag22 = this.m_monRole.m_LockRole != null;
                if (flag22)
                {
                    this.m_monRole.TurnToRole(this.m_monRole.m_LockRole, false);
                }
                bool flag23 = this.m_cur_ball_30111.Count == 0;
                if (!flag23)
                {
                    for (int j = 0; j < this.m_cur_ball_30111.Count; j++)
                    {
                        Transform one = this.m_cur_ball_30111[j];
                        one.GetComponent <Animator>().enabled = false;
                        Transform ball          = one.FindChild("top/heiqiu (1)");
                        Vector3   localPosition = ball.localPosition;
                        ball.transform.DOLocalMove(localPosition / 3f, 0.35f, false).SetDelay(0.1f * (float)(j + 1) / 2f);
                        Tweener t = one.transform.DOLocalMove(new Vector3(0f, this.ball_30111_hight, this.ball_3011_dis), 0.35f + this.ball_3011_dis * 0.01f, false).SetDelay(0.1f * (float)j);
                        t.SetUpdate(true);
                        switch (UnityEngine.Random.Range(0, 5))
                        {
                        case 1:
                            t.SetEase(Ease.OutQuad);
                            break;

                        case 2:
                            t.SetEase(Ease.OutCirc);
                            break;

                        case 3:
                            t.SetEase(Ease.OutCubic);
                            break;

                        case 4:
                            t.SetEase(Ease.OutExpo);
                            break;

                        case 5:
                            t.SetEase(Ease.OutElastic);
                            break;
                        }
                        t.OnComplete(delegate
                        {
                            ball.gameObject.SetActive(false);
                            GameObject gameObject5 = UnityEngine.Object.Instantiate <GameObject>(M0x000_Role_Event.MAGE_S3011_1);
                            gameObject5.transform.SetParent(one, false);
                            HitData hitData31   = this.m_monRole.Build_PRBullet(3004u, 0.125f, SceneTFX.m_Bullet_Prefabs[1], this.ball_30111_pos, this.transform.rotation);
                            hitData31.m_nDamage = 288;
                        });
                        bool flag24 = j == this.m_cur_ball_30111.Count - 1;
                        if (flag24)
                        {
                            this.m_cur_ball_30111.Clear();
                        }
                    }
                }
            }
        }
        else
        {
            bool flag25 = this.m_monRole is M000P2 || this.m_monRole is ohterP2Warrior;
            if (flag25)
            {
                bool flag26 = id == 1;
                if (flag26)
                {
                    Vector3 position5 = base.transform.position + base.transform.forward * 1.5f;
                    HitData hitData7  = this.m_monRole.Build_PRBullet(2001u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position5, base.transform.rotation);
                    hitData7.m_nDamage    = 108;
                    hitData7.m_Color_Main = Color.gray;
                    hitData7.m_Color_Rim  = Color.white;
                    hitData7.m_nHurtFX    = 2;
                }
                bool flag27 = id == 2;
                if (flag27)
                {
                    Vector3 position6 = base.transform.position + base.transform.forward * 1.5f;
                    HitData hitData8  = this.m_monRole.Build_PRBullet(2001u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position6, base.transform.rotation);
                    hitData8.m_nDamage    = 128;
                    hitData8.m_Color_Main = Color.gray;
                    hitData8.m_Color_Rim  = Color.white;
                    hitData8.m_nHurtFX    = 2;
                }
                bool flag28 = id == 3;
                if (flag28)
                {
                    Vector3 position7 = base.transform.position + base.transform.forward * 2.5f;
                    HitData hitData9  = this.m_monRole.Build_PRBullet(2001u, 0.125f, SceneTFX.m_Bullet_Prefabs[4], position7, base.transform.rotation);
                    hitData9.m_nDamage      = 188;
                    hitData9.m_Color_Main   = Color.gray;
                    hitData9.m_Color_Rim    = Color.white;
                    hitData9.m_nHurtFX      = 2;
                    hitData9.m_nHurtSP_type = 11;
                    hitData9.m_nHurtSP_pow  = 3;
                    hitData9.m_nLastHit     = 1;
                }
                bool flag29 = id == 4;
                if (flag29)
                {
                    Vector3 position8 = base.transform.position;
                    HitData hitData10 = this.m_monRole.Build_PRBullet(2003u, 0.125f, SceneTFX.m_Bullet_Prefabs[4], position8, base.transform.rotation);
                    hitData10.m_nDamage    = 88;
                    hitData10.m_Color_Main = Color.red;
                    hitData10.m_Color_Rim  = Color.red;
                    hitData10.m_nHurtFX    = 3;
                }
                bool flag30 = id == 21;
                if (flag30)
                {
                    Vector3 position9 = base.transform.position + base.transform.forward * 4f;
                    HitData hitData11 = this.m_monRole.Build_PRBullet(2004u, 0.2f, SceneTFX.m_Bullet_Prefabs[6], position9, base.transform.rotation);
                    hitData11.m_nDamage      = 388;
                    hitData11.m_Color_Main   = Color.red;
                    hitData11.m_Color_Rim    = Color.red;
                    hitData11.m_nHurtSP_type = 1;
                    hitData11.m_nHurtSP_pow  = 4;
                }
                bool flag31 = 13 == id;
                if (flag31)
                {
                    bool flag32 = this.m_monRole.m_LockRole != null;
                    if (flag32)
                    {
                        Vector3 position10 = base.transform.position + base.transform.forward * 0.5f;
                        position10.y += 1.25f;
                        HitData bullet = this.m_monRole.Build_PRBullet(2004u, 0f, M0x000_Role_Event.WARRIOR_B1, position10, base.transform.rotation);
                        FollowBullet_Mgr.AddBullet(this.m_monRole.m_LockRole, bullet, 0.8f);
                    }
                }
                bool flag33 = 141 == id;
                if (flag33)
                {
                    Vector3 position11 = base.transform.position + base.transform.forward * 3f;
                    HitData hitData12  = this.m_monRole.Build_PRBullet(2002u, 0.3f, SceneTFX.m_Bullet_Prefabs[4], position11, base.transform.rotation);
                    hitData12.m_nDamage    = 108;
                    hitData12.m_Color_Main = Color.gray;
                    hitData12.m_Color_Rim  = Color.white;
                    hitData12.m_nHurtFX    = 2;
                }
                bool flag34 = 142 == id;
                if (flag34)
                {
                    Vector3 position12 = base.transform.position + base.transform.forward * 6f;
                    HitData hitData13  = this.m_monRole.Build_PRBullet(2002u, 0.3f, SceneTFX.m_Bullet_Prefabs[4], position12, base.transform.rotation);
                    hitData13.m_nDamage    = 88;
                    hitData13.m_Color_Main = Color.gray;
                    hitData13.m_Color_Rim  = Color.white;
                    hitData13.m_nHurtFX    = 2;
                }
                bool flag35 = 143 == id;
                if (flag35)
                {
                    Vector3 position13 = base.transform.position + base.transform.forward * 4f;
                    HitData hitData14  = this.m_monRole.Build_PRBullet(2002u, 0.2f, SceneTFX.m_Bullet_Prefabs[6], position13, base.transform.rotation);
                    hitData14.m_nDamage      = 188;
                    hitData14.m_Color_Main   = Color.gray;
                    hitData14.m_Color_Rim    = Color.white;
                    hitData14.m_nHurtFX      = 2;
                    hitData14.m_nHurtSP_type = 21;
                    hitData14.m_nHurtSP_pow  = 4;
                }
                bool flag36 = 2009 == id;
                if (flag36)
                {
                    Vector3 position14 = base.transform.position + base.transform.forward * 3f;
                    HitData hitData15  = this.m_monRole.Build_PRBullet(2009u, 0.2f, SceneTFX.m_Bullet_Prefabs[5], position14, base.transform.rotation);
                    hitData15.m_nDamage      = 88;
                    hitData15.m_Color_Main   = Color.red;
                    hitData15.m_Color_Rim    = Color.red;
                    hitData15.m_nHurtSP_type = 11;
                    hitData15.m_nHurtSP_pow  = 4;
                    hitData15.m_nHurtFX      = 6;
                }
                bool flag37 = 2006 == id;
                if (flag37)
                {
                    Vector3 position15 = base.transform.position + base.transform.forward * 3f;
                    HitData hitData16  = this.m_monRole.Build_PRBullet(2006u, 0.2f, SceneTFX.m_Bullet_Prefabs[6], position15, base.transform.rotation);
                    hitData16.m_nDamage      = 88;
                    hitData16.m_Color_Main   = Color.red;
                    hitData16.m_Color_Rim    = Color.red;
                    hitData16.m_nHurtSP_type = 11;
                    hitData16.m_nHurtSP_pow  = 4;
                    hitData16.m_nHurtFX      = 6;
                }
                bool flag38 = 2007 == id;
                if (flag38)
                {
                    Vector3 position16 = base.transform.position + base.transform.forward * 1f;
                    HitData hitData17  = this.m_monRole.Build_PRBullet(2007u, 0.3f, SceneTFX.m_Bullet_Prefabs[4], position16, base.transform.rotation);
                    hitData17.m_nDamage      = 88;
                    hitData17.m_Color_Main   = Color.red;
                    hitData17.m_Color_Rim    = Color.red;
                    hitData17.m_nHurtSP_type = 11;
                    hitData17.m_nHurtSP_pow  = 10;
                    hitData17.m_nHurtFX      = 3;
                }
            }
            else
            {
                bool flag39 = this.m_monRole is M000P5 || this.m_monRole is ohterP5Assassin;
                if (flag39)
                {
                    bool flag40 = id == 1;
                    if (flag40)
                    {
                        Vector3 position17 = base.transform.position + base.transform.forward * 1.5f;
                        position17.y += 1f;
                        HitData hitData18 = this.m_monRole.Build_PRBullet(5001u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position17, base.transform.rotation);
                        hitData18.m_Color_Main = Color.gray;
                        hitData18.m_Color_Rim  = Color.white;
                        hitData18.m_nHurtFX    = 2;
                    }
                    bool flag41 = id == 2;
                    if (flag41)
                    {
                        Vector3 position18 = base.transform.position + base.transform.forward * 1.5f;
                        position18.y += 1f;
                        HitData hitData19 = this.m_monRole.Build_PRBullet(5001u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position18, base.transform.rotation);
                        hitData19.m_Color_Main   = Color.gray;
                        hitData19.m_Color_Rim    = Color.white;
                        hitData19.m_nHurtSP_type = 1;
                        hitData19.m_nHurtSP_pow  = 2;
                        hitData19.m_nHurtFX      = 2;
                    }
                    bool flag42 = id == 3;
                    if (flag42)
                    {
                        Vector3 position19 = base.transform.position + base.transform.forward * 2.5f;
                        position19.y += 1f;
                        HitData hitData20 = this.m_monRole.Build_PRBullet(5001u, 0.125f, SceneTFX.m_Bullet_Prefabs[4], position19, base.transform.rotation);
                        hitData20.m_Color_Main = Color.gray;
                        hitData20.m_Color_Rim  = Color.white;
                        hitData20.m_nHurtFX    = 2;
                        hitData20.m_nLastHit   = 1;
                    }
                    bool flag43 = id == 50021;
                    if (flag43)
                    {
                        Vector3 position20 = base.transform.position + base.transform.forward * 1.5f;
                        position20.y += 1f;
                        HitData hitData21 = this.m_monRole.Build_PRBullet(5002u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position20, base.transform.rotation);
                        hitData21.m_nDamage    = 58;
                        hitData21.m_Color_Main = Color.gray;
                        hitData21.m_Color_Rim  = Color.white;
                        hitData21.m_nHurtFX    = 4;
                    }
                    bool flag44 = id == 50022;
                    if (flag44)
                    {
                        Vector3 position21 = base.transform.position + base.transform.forward * 1.5f;
                        position21.y += 1f;
                        HitData hitData22 = this.m_monRole.Build_PRBullet(5002u, 0.125f, SceneTFX.m_Bullet_Prefabs[5], position21, base.transform.rotation);
                        hitData22.m_nDamage      = 138;
                        hitData22.m_Color_Main   = Color.gray;
                        hitData22.m_Color_Rim    = Color.white;
                        hitData22.m_nHurtFX      = 5;
                        hitData22.m_nHurtSP_type = 11;
                        hitData22.m_nHurtSP_pow  = 3;
                        hitData22.m_nLastHit     = 1;
                    }
                    bool flag45 = id == 5;
                    if (flag45)
                    {
                        Vector3 position22 = base.transform.position;
                        position22.y += 1f;
                        HitData hitData23 = this.m_monRole.Build_PRBullet(5003u, 0.125f, SceneTFX.m_Bullet_Prefabs[4], position22, base.transform.rotation);
                        hitData23.m_nDamage    = 57;
                        hitData23.m_Color_Main = Color.blue;
                        hitData23.m_Color_Rim  = Color.cyan;
                        hitData23.m_nHurtFX    = 5;
                    }
                    bool flag46 = id == 50041;
                    if (flag46)
                    {
                        Vector3 position23 = base.transform.position + base.transform.forward * 1.5f;
                        position23.y += 1f;
                        HitData hitData24 = this.m_monRole.Build_PRBullet(5004u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position23, base.transform.rotation);
                        hitData24.m_Color_Main = Color.gray;
                        hitData24.m_Color_Rim  = Color.white;
                        hitData24.m_nHurtFX    = 4;
                    }
                    bool flag47 = id == 50042;
                    if (flag47)
                    {
                        Vector3 position24 = base.transform.position + base.transform.forward * 1.5f;
                        position24.y += 1f;
                        HitData hitData25 = this.m_monRole.Build_PRBullet(5004u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position24, base.transform.rotation);
                        hitData25.m_Color_Main = Color.gray;
                        hitData25.m_Color_Rim  = Color.white;
                        hitData25.m_nLastHit   = 1;
                        hitData25.m_nHurtFX    = 5;
                    }
                    bool flag48 = 131 == id;
                    if (flag48)
                    {
                        bool flag49 = this.m_monRole.m_LockRole != null;
                        if (flag49)
                        {
                            bool flag50 = (this.m_monRole.m_curModel.position - this.m_monRole.m_LockRole.m_curModel.position).magnitude < 4f;
                            if (flag50)
                            {
                                this.m_monRole.m_curModel.position = this.m_monRole.m_LockRole.m_curModel.position - this.m_monRole.m_LockRole.m_curModel.forward * 4f;
                                this.m_monRole.m_curModel.forward  = this.m_monRole.m_LockRole.m_curModel.forward;
                            }
                        }
                    }
                    bool flag51 = 50071 == id;
                    if (flag51)
                    {
                        Vector3 position25 = base.transform.position;
                        HitData hitData26  = this.m_monRole.Build_PRBullet(5007u, 0.125f, SceneTFX.m_Bullet_Prefabs[3], position25, base.transform.rotation);
                        hitData26.m_Color_Main = Color.gray;
                        hitData26.m_Color_Rim  = Color.white;
                        hitData26.m_nHurtFX    = 5;
                    }
                    bool flag52 = 50072 == id;
                    if (flag52)
                    {
                        Vector3 position26 = base.transform.position;
                        HitData hitData27  = this.m_monRole.Build_PRBullet(5007u, 0.125f, SceneTFX.m_Bullet_Prefabs[7], position26, base.transform.rotation);
                        hitData27.m_Color_Main = Color.gray;
                        hitData27.m_Color_Rim  = Color.white;
                        hitData27.m_nHurtFX    = 1;
                    }
                    bool flag53 = 5006 == id;
                    if (flag53)
                    {
                        Vector3 position27 = base.transform.position;
                        HitData hitData28  = this.m_monRole.Build_PRBullet(5006u, 1f, SceneTFX.m_Bullet_Prefabs[3], position27, base.transform.rotation);
                        hitData28.m_Color_Main = Color.gray;
                        hitData28.m_Color_Rim  = Color.white;
                        hitData28.m_nHurtFX    = 2;
                    }
                    bool flag54 = 5009 == id;
                    if (flag54)
                    {
                        bool flag55 = this.m_monRole.m_LockRole != null;
                        if (flag55)
                        {
                            this.m_monRole.TurnToRole(this.m_monRole.m_LockRole, false);
                        }
                        Vector3 position28 = base.transform.position;
                        HitData hitData29  = this.m_monRole.Build_PRBullet(5009u, 1f, SceneTFX.m_Bullet_Prefabs[3], position28, base.transform.rotation);
                        hitData29.m_Color_Main = Color.gray;
                        hitData29.m_Color_Rim  = Color.white;
                        hitData29.m_nHurtFX    = 2;
                    }
                }
                else
                {
                    bool flag56 = 1 == id;
                    if (flag56)
                    {
                        Vector3 position29 = base.transform.position + base.transform.forward * 2f;
                        position29.y += 1f;
                        HitData hitData30 = this.m_monRole.BuildBullet(1u, 0.125f, SceneTFX.m_Bullet_Prefabs[1], position29, base.transform.rotation);
                        bool    flag57    = !this.m_monRole.isfake;
                        if (flag57)
                        {
                            hitData30.m_nDamage = 0;
                        }
                    }
                }
            }
        }
    }
    public void onBullet(int id)
    {
        if (m_monRole is M000P3 || m_monRole is ohterP3Mage)
        {
            if (id == 1)
            {
                Vector3 pos = transform.position + transform.forward * 0.5f;
                pos.y += 1.25f;

                GameObject bult = GameObject.Instantiate(MAGE_B1, pos, transform.rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    HitData hd = m_monRole.Link_PRBullet(3001, 2f, bult, real_track);

                    //hd.m_Color_Main = Color.gray;
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3001);
                    // hd.m_Color_Rim = Color.white;
                    hd.m_Color_Rim = SkillModel.getskill_rcolor(3001);
                    hd.m_nDamage   = 277;

                    hd.m_aniTrack = real_track.GetComponent <Animator>();
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    Transform real_fx = real_track.FindChild("f");
                    if (real_fx != null)
                    {
                        hd.m_aniFx = real_fx.GetComponent <Animator>();
                    }
                }
            }
            if (id == 2)
            {
                Vector3 pos = transform.position;
                pos.y += 1f + UnityEngine.Random.Range(0f, 1f);
                if (UnityEngine.Random.Range(0, 16) > 7)
                {
                    pos += transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
                }
                else
                {
                    pos -= transform.right * (0.5f + UnityEngine.Random.Range(0f, 1f));
                }

                GameObject bult = GameObject.Instantiate(MAGE_B2, pos, transform.rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    HitData hd = m_monRole.Link_PRBullet(3005, 2f, bult, real_track);
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3005);
                    hd.m_Color_Rim  = SkillModel.getskill_rcolor(3005);

                    hd.m_nHurtSP_type = 11;
                    hd.m_nHurtSP_pow  = 1;

                    hd.m_aniTrack = real_track.GetComponent <Animator>();
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    Transform real_fx = real_track.FindChild("f");
                    if (real_fx != null)
                    {
                        hd.m_aniFx = real_fx.GetComponent <Animator>();
                    }
                }
            }
            if (id == 101)
            {
                Vector3 pos = transform.position;

                HitData hd = m_monRole.Build_PRBullet(3004, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);
                hd.m_nDamage = 288;
                //hd.m_Color_Main = Color.blue;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3004);
                // hd.m_Color_Rim = Color.cyan;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(3004);
                hd.m_nHurtFX   = 1;

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 2;
            }
            if (3006 == id)
            {
                if (m_monRole.m_LockRole == null)
                {
                    return;
                }

                Vector3 pos = m_monRole.m_LockRole.m_curModel.position;
                pos.z += UnityEngine.Random.Range(-2f, 2f);
                pos.x += UnityEngine.Random.Range(-2f, 2f);
                pos.y  = pos.y + 8f;

                GameObject bult = GameObject.Instantiate(P3Mage_Event.MAGE_B6, pos, transform.rotation) as GameObject;
                bult.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                Transform real_track = bult.transform.FindChild("t");
                if (real_track != null)
                {
                    HitData hd = m_monRole.Link_PRBullet(3006, 3.0f, bult, real_track);

                    hd.m_nHurtSP_type = 11;
                    hd.m_nHurtSP_pow  = 1;

                    //陨石要穿过角色直到地面爆开
                    hd.m_bOnlyHit = false;

                    // hd.m_Color_Main = Color.blue;
                    hd.m_Color_Main = SkillModel.getskill_mcolor(3006);
                    // hd.m_Color_Rim = Color.white;
                    hd.m_Color_Rim = SkillModel.getskill_rcolor(3006);
                    hd.m_aniTrack  = real_track.GetComponent <Animator>();
                    real_track.gameObject.layer = EnumLayer.LM_BT_FIGHT;

                    Transform real_fx = real_track.FindChild("f");
                    if (real_fx != null)
                    {
                        hd.m_aniFx = real_fx.GetComponent <Animator>();
                    }
                }
            }
            if (3002 == id)
            {
                cur_3002_num     = 0;
                cur_3002_forward = transform.forward;
                cur_3002_pos     = transform.position;

                CancelInvoke("skill_3002");
                InvokeRepeating("skill_3002", 0, 0.2f);
            }
            if (3009 == id)
            {
                Vector3 pos = transform.position + transform.forward * 3.5f;

                HitData hd = m_monRole.Build_PRBullet(3009, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);
                hd.m_nDamage = 288;
                //hd.m_Color_Main = Color.white;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3009);
                // hd.m_Color_Rim = new Color(0.02f, 0.73f, 0.92f, 0.51f);
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(3009);
                hd.m_nHurtSP_type = 31;
                hd.m_nHurtSP_pow  = 2;
            }

            if (30071 == id)
            {
                Vector3 pos = transform.position + transform.forward * 7f;
                HitData hd  = m_monRole.Build_PRBullet(3007, 3.5f, SceneTFX.m_Bullet_Prefabs[8], pos, transform.rotation);
                hd.m_nDamage = 0;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(3007);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim   = SkillModel.getskill_rcolor(3007);
                pos.y           += 1f;
                hd.m_nHurtSP_pos = pos;

                hd.m_nHurtSP_type = 14;
                hd.m_nHurtSP_pow  = 4;
                hd.m_hurtNum      = 0;
            }
            if (30072 == id)
            {
                cur_3007_1_time = 0;
                CancelInvoke("skill_3007_1");
                InvokeRepeating("skill_3007_1", 0, 0.4f);
            }
            if (30073 == id)
            {
                cur_3007_2_time = 0;
                CancelInvoke("skill_3007_2");
                InvokeRepeating("skill_3007_2", 0, 0.4f);
            }
            if (30111 == id)
            {
                m_cur_ball_30111.Clear();

                if (m_monRole == null)
                {
                    return;
                }

                ball_30111_pos   = m_monRole.m_LockRole.m_curModel.position;
                ball_30111_hight = m_monRole.m_LockRole.headOffset.y / 2;
                ball_3011_dis    = Vector3.Distance(transform.position, m_monRole.m_LockRole.m_curModel.position);

                GameObject fx_inst = GameObject.Instantiate(MAGE_S3011, transform.position, transform.rotation) as GameObject;
                fx_inst.transform.SetParent(U3DAPI.FX_POOL_TF, false);

                for (int i = 1; i <= fx_inst.transform.FindChild("heiqiu").childCount; i++)
                {
                    m_cur_ball_30111.Add(fx_inst.transform.FindChild("heiqiu/0" + i));
                }

                GameObject.Destroy(fx_inst, 6);
            }
            if (30112 == id)
            {
                if (m_monRole.m_LockRole != null)
                {
                    m_monRole.TurnToRole(m_monRole.m_LockRole, false);
                    //m_cur_ball_30111.Clear();
                    //return;
                }

                if (m_cur_ball_30111.Count == 0)
                {
                    return;
                }

                //float dis = Vector3.Distance(transform.position, m_linkProfessionRole.m_LockRole.m_curModel.position);
                //float high = m_linkProfessionRole.m_LockRole.headOffset.y / 2;
                for (int i = 0; i < m_cur_ball_30111.Count; i++)
                {
                    Transform one = m_cur_ball_30111[i];
                    one.GetComponent <Animator>().enabled = false;
                    Transform ball     = one.FindChild("top/heiqiu (1)");
                    Vector3   pos_ball = ball.localPosition;
                    ball.transform.DOLocalMove(pos_ball / 3, 0.35f).SetDelay(0.1f * (int)(i + 1) / 2);
                    Tweener tween1 = one.transform.DOLocalMove(new Vector3(0, ball_30111_hight, ball_3011_dis), 0.35f + ball_3011_dis * 0.01f).SetDelay(0.1f * i);
                    tween1.SetUpdate(true);
                    int rang = UnityEngine.Random.Range(0, 5);
                    switch (rang)
                    {
                    case 1:
                        tween1.SetEase(Ease.OutQuad);
                        break;

                    case 2:
                        tween1.SetEase(Ease.OutCirc);
                        break;

                    case 3:
                        tween1.SetEase(Ease.OutCubic);
                        break;

                    case 4:
                        tween1.SetEase(Ease.OutExpo);
                        break;

                    case 5:
                        tween1.SetEase(Ease.OutElastic);
                        break;
                    }
                    tween1.OnComplete(delegate()
                    {
                        ball.gameObject.SetActive(false);
                        GameObject fx_inst = GameObject.Instantiate(MAGE_S3011_1) as GameObject;
                        fx_inst.transform.SetParent(one, false);

                        HitData hd = m_monRole.Build_PRBullet(3004, 0.125f, SceneTFX.m_Bullet_Prefabs[1],
                                                              ball_30111_pos, transform.rotation);
                        hd.m_nDamage = 288;
                    });
                    if (i == m_cur_ball_30111.Count - 1)
                    {
                        m_cur_ball_30111.Clear();
                    }
                }
            }
        }
        else if (m_monRole is M000P2 || m_monRole is ohterP2Warrior)
        {
            if (id == 1)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                HitData hd  = m_monRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                hd.m_nDamage = 108;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
                hd.m_nHurtFX   = 2;
            }

            if (id == 2)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                HitData hd  = m_monRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
                hd.m_nDamage = 128;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
                hd.m_nHurtFX   = 2;
            }

            if (id == 3)
            {
                Vector3 pos = transform.position + transform.forward * 2.5f;
                HitData hd  = m_monRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                hd.m_nDamage = 188;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
                //hd.m_nHurtSP_type = 1;
                //hd.m_nHurtSP_pow = 3;

                hd.m_nHurtFX = 2;

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 3;

                hd.m_nLastHit = 1;
            }
            if (id == 4)
            {
                Vector3 pos = transform.position;// +transform.forward * 1.5f;
                HitData hd  = m_monRole.Build_PRBullet(2003, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                hd.m_nDamage = 88;
                //hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2003);
                //hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2003);
                hd.m_nHurtFX   = 3;
            }
            if (id == 21)
            {
                Vector3 pos = transform.position + transform.forward * 4f;
                HitData hd  = m_monRole.Build_PRBullet(2004, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
                hd.m_nDamage = 388;
                //hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2004);
                // hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2004);
                hd.m_nHurtSP_type = 1;
                hd.m_nHurtSP_pow  = 4;
            }
            if (13 == id)
            {
                if (m_monRole.m_LockRole != null)
                {
                    Vector3 pos = transform.position + transform.forward * 0.5f;
                    pos.y += 1.25f;

                    HitData hd = m_monRole.Build_PRBullet(2004, 0f, WARRIOR_B1, pos, transform.rotation);

                    FollowBullet_Mgr.AddBullet(m_monRole.m_LockRole, hd, 0.8f);
                }
            }
            if (141 == id)
            {
                Vector3 pos = transform.position + transform.forward * 3.0f;
                HitData hd  = m_monRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

                hd.m_nDamage = 108;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
                hd.m_nHurtFX   = 2;
            }
            if (142 == id)
            {
                Vector3 pos = transform.position + transform.forward * 6.0f;
                HitData hd  = m_monRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

                hd.m_nDamage = 88;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
                hd.m_nHurtFX   = 2;
            }

            if (143 == id)
            {
                Vector3 pos = transform.position + transform.forward * 4.0f;
                HitData hd  = m_monRole.Build_PRBullet(2002, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);

                hd.m_nDamage = 188;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
                hd.m_nHurtFX   = 2;

                //有拉到Cast面前的效果
                hd.m_nHurtSP_type = 21;
                hd.m_nHurtSP_pow  = 4;
            }
            if (2009 == id)
            {
                Vector3 pos = transform.position + transform.forward * 3f;
                HitData hd  = m_monRole.Build_PRBullet(2009, 0.2f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);
                hd.m_nDamage = 88;
                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2009);
                // hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2009);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 4;

                hd.m_nHurtFX = 6;
            }
            if (2006 == id)
            {
                Vector3 pos = transform.position /* + transform.forward * 3f*/;
                HitData hd  = m_monRole.Build_PRBullet(2006, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
                hd.m_nDamage = 88;
                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2006);
                //hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2006);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 4;

                hd.m_nHurtFX = 6;
            }
            if (2007 == id)
            {
                Vector3 pos = transform.position + transform.forward * 1f;
                HitData hd  = m_monRole.Build_PRBullet(2007, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                hd.m_nDamage = 88;
                // hd.m_Color_Main = Color.red;
                hd.m_Color_Main = SkillModel.getskill_mcolor(2007);
                //hd.m_Color_Rim = Color.red;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(2007);
                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 10;

                hd.m_nHurtFX = 3;
            }
        }
        else if (m_monRole is M000P5 || m_monRole is ohterP5Assassin)
        {
            if (id == 1)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5001);
                hd.m_nHurtFX   = 2;
            }

            if (id == 2)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim    = SkillModel.getskill_rcolor(5001);
                hd.m_nHurtSP_type = 1;
                hd.m_nHurtSP_pow  = 2;

                hd.m_nHurtFX = 2;
            }

            if (id == 3)
            {
                Vector3 pos = transform.position + transform.forward * 2.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5001);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5001);
                hd.m_nHurtFX   = 2;

                hd.m_nLastHit = 1;
            }

            //刺客的疾风连刺
            if (id == 50021)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5002, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                hd.m_nDamage = 58;
                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5002);
                hd.m_nHurtFX   = 4;
            }

            //刺客的疾风连刺
            if (id == 50022)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5002, 0.125f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);

                hd.m_nDamage = 138;
                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5002);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5002);
                hd.m_nHurtFX   = 5;

                hd.m_nHurtSP_type = 11;
                hd.m_nHurtSP_pow  = 3;

                hd.m_nLastHit = 1;
            }

            //刺客的疾风乱舞
            if (id == 5)
            {
                Vector3 pos = transform.position;
                pos.y += 1f;

                HitData hd = m_monRole.Build_PRBullet(5003, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

                hd.m_nDamage = 57;
                // hd.m_Color_Main = Color.blue;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5003);
                // hd.m_Color_Rim = Color.cyan;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5003);
                hd.m_nHurtFX   = 5;
            }

            //(影袭)
            if (id == 50041)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5004, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5004);
                //hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5004);
                hd.m_nHurtFX   = 4;
            }

            //(影袭)
            if (id == 50042)
            {
                Vector3 pos = transform.position + transform.forward * 1.5f;
                pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5004, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5004);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5004);
                hd.m_nLastHit  = 1;
                hd.m_nHurtFX   = 5;
            }

            //特殊处理瞬移到敌人身后(影袭)
            if (131 == id)
            {
                if (m_monRole.m_LockRole != null)
                {
                    Vector3 dis_pos = m_monRole.m_curModel.position - m_monRole.m_LockRole.m_curModel.position;
                    if (dis_pos.magnitude < 4f)
                    {
                        m_monRole.m_curModel.position = m_monRole.m_LockRole.m_curModel.position - m_monRole.m_LockRole.m_curModel.forward * 4f;
                        m_monRole.m_curModel.forward  = m_monRole.m_LockRole.m_curModel.forward;
                    }
                }

                //m_monRole.m_curModel.position = hd.m_CastRole.m_curModel.position + hd.m_CastRole.m_curModel.forward * 2f;
            }

            //幻影杀阵
            if (50071 == id)
            {
                Vector3 pos = transform.position;
                //pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5007, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5007);
                //  hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5007);
                hd.m_nHurtFX   = 5;
            }
            if (50072 == id)
            {
                Vector3 pos = transform.position;
                //pos.y += 1f;
                HitData hd = m_monRole.Build_PRBullet(5007, 0.125f, SceneTFX.m_Bullet_Prefabs[7], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5007);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5007);
                hd.m_nHurtFX   = 1;
            }
            if (5006 == id)
            {
                Vector3 pos = transform.position;
                HitData hd  = m_monRole.Build_PRBullet(5006, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                //hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5006);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5006);
                hd.m_nHurtFX   = 2;
            }
            if (5009 == id)
            {
                if (m_monRole.m_LockRole != null)
                {//闪现过去后朝向目标
                    m_monRole.TurnToRole(m_monRole.m_LockRole, false);
                }

                Vector3 pos = transform.position;
                HitData hd  = m_monRole.Build_PRBullet(5009, 1.0f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

                // hd.m_Color_Main = Color.gray;
                hd.m_Color_Main = SkillModel.getskill_mcolor(5009);
                // hd.m_Color_Rim = Color.white;
                hd.m_Color_Rim = SkillModel.getskill_rcolor(5009);
                hd.m_nHurtFX   = 2;
            }
        }
        else
        {
            if (1 == id)
            {
                //普通攻击技能
                Vector3 pos = transform.position + transform.forward * 2f;
                pos.y += 1f;

                HitData hd = m_monRole.BuildBullet(1, 0.125f, SceneTFX.m_Bullet_Prefabs[1], pos, transform.rotation);
                if (!m_monRole.isfake)
                {
                    hd.m_nDamage = 0;
                }
            }
        }
    }
Ejemplo n.º 4
0
    public void onBullet(int id)
    {
        if (m_linkProfessionRole.getShowSkillEff() == 2)
        {
            return;
        }

        //战士普通三段攻击
        if (id == 1)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);

            hd.m_nDamage = 108;
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
            hd.m_nHurtFX   = 2;
        }

        if (id == 2)
        {
            Vector3 pos = transform.position + transform.forward * 1.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[3], pos, transform.rotation);
            hd.m_nDamage = 128;
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
            hd.m_nHurtFX   = 2;
        }

        if (id == 3)
        {
            Vector3 pos = transform.position + transform.forward * 2.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2001, 0.125f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
            hd.m_nDamage = 188;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2001);
            // hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2001);
            //hd.m_nHurtSP_type = 1;
            //hd.m_nHurtSP_pow = 3;

            hd.m_nHurtFX = 2;

            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 3;

            hd.m_nLastHit = 1;
        }

        //战士的旋风斩(飓风)
        if (id == 4)
        {
            Vector3 pos = transform.position;// +transform.forward * 1.5f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2003, 0.125f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);
            hd.m_nDamage = 88;
            //hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2003);
            // hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2003);
            hd.m_nHurtFX   = 3;
        }

        //战士的纵砍(力劈)
        if (id == 21)
        {
            Vector3 pos = transform.position + transform.forward * 4f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2004, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
            hd.m_nDamage = 388;
            // hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2004);
            //  hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2004);
            hd.m_nHurtSP_type = 1;
            hd.m_nHurtSP_pow  = 4;
        }


        //加入战士的丢斧头的技能(这是跟踪弹类的技能)
        if (13 == id)
        {
            if (m_linkProfessionRole.m_LockRole != null)
            {
                Vector3 pos = transform.position + transform.forward * 0.5f;
                pos.y += 1.25f;

                HitData hd = m_linkProfessionRole.Build_PRBullet(2004, 0f, WARRIOR_B1, pos, transform.rotation);

                FollowBullet_Mgr.AddBullet(m_linkProfessionRole.m_LockRole, hd, 0.8f);
            }
        }

        //战士的回锋技能,会将怪拉来
        if (141 == id)
        {
            Vector3 pos = transform.position + transform.forward * 3.0f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

            hd.m_nDamage = 108;
            // hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
            hd.m_nHurtFX   = 2;
        }

        if (142 == id)
        {
            Vector3 pos = transform.position + transform.forward * 6.0f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2002, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);

            hd.m_nDamage = 88;
            //  hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
            hd.m_nHurtFX   = 2;
        }

        if (143 == id)
        {
            Vector3 pos = transform.position + transform.forward * 4.0f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2002, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);

            hd.m_nDamage = 188;
            //hd.m_Color_Main = Color.gray;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2002);
            //hd.m_Color_Rim = Color.white;
            hd.m_Color_Rim = SkillModel.getskill_rcolor(2002);
            hd.m_nHurtFX   = 2;

            //有拉到Cast面前的效果
            hd.m_nHurtSP_type = 21;
            hd.m_nHurtSP_pow  = 4;
        }
        if (2009 == id)
        {
            Vector3 pos = transform.position + transform.forward * 3f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2009, 0.2f, SceneTFX.m_Bullet_Prefabs[5], pos, transform.rotation);
            hd.m_nDamage = 88;
            //hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2009);
            // hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2009);
            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 4;

            hd.m_nHurtFX = 6;
        }
        if (2006 == id)
        {
            Vector3 pos = transform.position /* + transform.forward * 3f*/;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2006, 0.2f, SceneTFX.m_Bullet_Prefabs[6], pos, transform.rotation);
            hd.m_nDamage = 88;
            // hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2006);
            //hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2006);
            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 4;

            hd.m_nHurtFX = 6;
        }
        if (2007 == id)
        {
            Vector3 pos = transform.position + transform.forward * 1f;
            HitData hd  = m_linkProfessionRole.Build_PRBullet(2007, 0.3f, SceneTFX.m_Bullet_Prefabs[4], pos, transform.rotation);
            hd.m_nDamage = 88;
            // hd.m_Color_Main = Color.red;
            hd.m_Color_Main = SkillModel.getskill_mcolor(2007);
            //hd.m_Color_Rim = Color.red;
            hd.m_Color_Rim    = SkillModel.getskill_rcolor(2007);
            hd.m_nHurtSP_type = 11;
            hd.m_nHurtSP_pow  = 10;

            hd.m_nHurtFX = 3;
        }
    }