Beispiel #1
0
 private void killPlayer(HERO hero)
 {
     if (hero != null)
     {
         Vector3 position = baseT.Find("Amarture/Core/Controller_Body/hip/spine/chest").position;
         if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
         {
             if (!hero.HasDied())
             {
                 hero.die((Vector3)(((hero.transform.position - position) * 15f) * 4f), false);
             }
         }
         else if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER)
         {
             if (FengGameManagerMKII.LAN)
             {
                 if (!hero.HasDied())
                 {
                     hero.markDie();
                 }
             }
             else if (!hero.HasDied())
             {
                 hero.markDie();
                 object[] parameters = new object[] { (Vector3)(((hero.transform.position - position) * 15f) * 4f), false, -1, "Colossal Titan", true };
                 hero.photonView.RPC("netDie", PhotonTargets.All, parameters);
             }
         }
     }
 }
Beispiel #2
0
    private void hitPlayer(GameObject go)
    {
        HERO hero = go.GetComponent <HERO>();

        if (hero != null && !hero.HasDied() && !hero.IsInvincible())
        {
            if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
            {
                if (!hero.isGrabbed)
                {
                    hero.die(this.v.normalized * 1000f + Vectors.up * 50f, false);
                }
            }
            else if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && !hero.HasDied() && !hero.isGrabbed)
            {
                hero.markDie();
                int    num  = -1;
                string text = string.Empty;
                if (baseT.root.gameObject.GetComponent <EnemyfxIDcontainer>() != null)
                {
                    num  = baseT.root.gameObject.GetComponent <EnemyfxIDcontainer>().myOwnerViewID;
                    text = baseT.root.gameObject.GetComponent <EnemyfxIDcontainer>().titanName;
                }
                hero.BasePV.RPC("netDie", PhotonTargets.All, new object[]
                {
                    this.v.normalized * 1000f + Vectors.up * 50f,
                    false,
                    num,
                    text,
                    true
                });
            }
        }
    }
Beispiel #3
0
 private void hitPlayer(HERO heros)
 {
     if ((!heros.HasDied()) && !heros.isInvincible())
     {
         if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
         {
             if (!heros.isGrabbed)
             {
                 heros.die((Vector3)((this.v.normalized * 1000f) + (Vector3.up * 50f)), false);
             }
         }
         else if (((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && !heros.HasDied()) && !heros.isGrabbed)
         {
             heros.markDie();
             int                myOwnerViewID = -1;
             string             titanName     = string.Empty;
             EnemyfxIDcontainer fx            = baseT.root.gameObject.GetComponent <EnemyfxIDcontainer>();
             if (fx != null)
             {
                 myOwnerViewID = fx.myOwnerViewID;
                 titanName     = fx.titanName;
             }
             Debug.Log("rock hit player " + titanName);
             object[] parameters = new object[] { (Vector3)((this.v.normalized * 1000f) + (Vector3.up * 50f)), false, myOwnerViewID, titanName, true };
             heros.photonView.RPC("netDie", PhotonTargets.All, parameters);
         }
     }
 }
Beispiel #4
0
 public static void InfectionOnSpawn(HERO hero)
 {
     if (InfectionMode.Enabled && PhotonNetwork.IsMasterClient && !FengGameManagerMKII.FGM.IsLosing && !FengGameManagerMKII.FGM.IsWinning && FengGameManagerMKII.FGM.Logic.RoundTime > 5f)
     {
         if (infection.ContainsKey(hero.BasePV.owner.ID))
         {
             hero.markDie();
             hero.BasePV.RPC("netDie2", PhotonTargets.All, new object[] { -1, "noswitchingfgt" });
         }
     }
 }
Beispiel #5
0
    private void OnTriggerEnter(Collider other)
    {
        HERO hero = other.gameObject.GetComponent <HERO>();

        if (hero != null && hero.IsLocal && !hero.IsDead)
        {
            hero.markDie();
            hero.BasePV.RPC("netDie2", PhotonTargets.All, new object[]
            {
                -1,
                Anarchy.User.RacingKillTrigger.PickRandomString() + " "
            });
        }
    }
Beispiel #6
0
    private void OnTriggerEnter(Collider other)
    {
        GameObject gameObject = other.gameObject;

        if (gameObject.layer == 8)
        {
            gameObject = gameObject.transform.root.gameObject;
            if (((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && (gameObject.GetPhotonView() != null)) && gameObject.GetPhotonView().isMine)
            {
                HERO component = gameObject.GetComponent <HERO>();
                if (component != null)
                {
                    component.markDie();
                    component.photonView.RPC("netDie2", PhotonTargets.All, new object[] { -1, "Server" });
                }
            }
        }
    }
Beispiel #7
0
 private void hitPlayer(GameObject hero, HERO component)
 {
     if (((hero != null) && !component.HasDied()) && !component.isInvincible())
     {
         if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
         {
             if (!component.isGrabbed)
             {
                 component.die((Vector3)((this.v.normalized * 1000f) + (Vector3.up * 50f)), false);
             }
         }
         else if (((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && !component.HasDied()) && !component.isGrabbed)
         {
             component.markDie();
             object[] parameters = new object[] { (Vector3)((this.v.normalized * 1000f) + (Vector3.up * 50f)), false, viewID, titanName, true };
             component.photonView.RPC("netDie", PhotonTargets.All, parameters);
         }
         if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER && this.basePV.isMine)
         {
             GameObject gameObject;
             gameObject = PhotonNetwork.Instantiate("FX/boom6", this.baseT.position, this.baseT.rotation, 0);
             gameObject.transform.localScale = this.baseT.localScale;
             EnemyfxIDcontainer component2 = gameObject.GetComponent <EnemyfxIDcontainer>();
             if (component2 != null)
             {
                 component2.myOwnerViewID = viewID;
                 component2.titanName     = titanName;
                 return;
             }
         }
         else
         {
             ((GameObject)UnityEngine.Object.Instantiate(CLEARSKIES.CacheResources.Load("FX/boom6"), this.baseT.position, this.baseT.rotation)).transform.localScale = this.baseT.localScale;
         }
     }
 }
Beispiel #8
0
    public void doAction()
    {
        switch (this.actionClass)
        {
        case 0:
            this.nextEvent.checkEvent();
            break;

        case 1:
        {
            string key  = this.parameters[0].returnString(null);
            int    num2 = this.parameters[1].returnInt(null);
            switch (this.actionType)
            {
            case 0:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    FengGameManagerMKII.intVariables.Add(key, num2);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = num2;
                }
                return;

            case 1:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) + num2;
                }
                return;

            case 2:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) - num2;
                }
                return;

            case 3:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) * num2;
                }
                return;

            case 4:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) / num2;
                }
                return;

            case 5:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) % num2;
                }
                return;

            case 6:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = (int)Math.Pow((double)((int)FengGameManagerMKII.intVariables[key]), (double)num2);
                }
                return;

            case 12:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    FengGameManagerMKII.intVariables.Add(key, UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null)));
                }
                else
                {
                    FengGameManagerMKII.intVariables[key] = UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null));
                }
                return;
            }
            break;
        }

        case 2:
        {
            string str2  = this.parameters[0].returnString(null);
            bool   flag2 = this.parameters[1].returnBool(null);
            switch (this.actionType)
            {
            case 11:
                if (!FengGameManagerMKII.boolVariables.ContainsKey(str2))
                {
                    this.callException("Variable not found: " + str2);
                }
                else
                {
                    FengGameManagerMKII.boolVariables[str2] = !((bool)FengGameManagerMKII.boolVariables[str2]);
                }
                return;

            case 12:
                if (!FengGameManagerMKII.boolVariables.ContainsKey(str2))
                {
                    FengGameManagerMKII.boolVariables.Add(str2, Convert.ToBoolean(UnityEngine.Random.Range(0, 2)));
                }
                else
                {
                    FengGameManagerMKII.boolVariables[str2] = Convert.ToBoolean(UnityEngine.Random.Range(0, 2));
                }
                return;

            case 0:
                if (!FengGameManagerMKII.boolVariables.ContainsKey(str2))
                {
                    FengGameManagerMKII.boolVariables.Add(str2, flag2);
                }
                else
                {
                    FengGameManagerMKII.boolVariables[str2] = flag2;
                }
                return;
            }
            break;
        }

        case 3:
        {
            string str3 = this.parameters[0].returnString(null);
            switch (this.actionType)
            {
            case 7:
            {
                string str5 = string.Empty;
                for (int i = 1; i < this.parameters.Length; i++)
                {
                    str5 = str5 + this.parameters[i].returnString(null);
                }
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    FengGameManagerMKII.stringVariables.Add(str3, str5);
                }
                else
                {
                    FengGameManagerMKII.stringVariables[str3] = str5;
                }
                return;
            }

            case 8:
            {
                string str6 = this.parameters[1].returnString(null);
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]) + str6;
                }
                return;
            }

            case 9:
            {
                string str7 = this.parameters[1].returnString(null);
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]).Replace(this.parameters[1].returnString(null), this.parameters[2].returnString(null));
                }
                return;
            }

            case 0:
            {
                string str4 = this.parameters[1].returnString(null);
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    FengGameManagerMKII.stringVariables.Add(str3, str4);
                }
                else
                {
                    FengGameManagerMKII.stringVariables[str3] = str4;
                }
                return;
            }
            }
            break;
        }

        case 4:
        {
            string str9 = this.parameters[0].returnString(null);
            float  num4 = this.parameters[1].returnFloat(null);
            switch (this.actionType)
            {
            case 0:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    FengGameManagerMKII.floatVariables.Add(str9, num4);
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = num4;
                }
                return;

            case 1:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) + num4;
                }
                return;

            case 2:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) - num4;
                }
                return;

            case 3:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) * num4;
                }
                return;

            case 4:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) / num4;
                }
                return;

            case 5:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = ((float)FengGameManagerMKII.floatVariables[str9]) % num4;
                }
                return;

            case 6:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    this.callException("No Variable");
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = (float)Math.Pow((double)((int)FengGameManagerMKII.floatVariables[str9]), (double)num4);
                }
                return;

            case 12:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str9))
                {
                    FengGameManagerMKII.floatVariables.Add(str9, UnityEngine.Random.Range(num4, this.parameters[2].returnFloat(null)));
                }
                else
                {
                    FengGameManagerMKII.floatVariables[str9] = UnityEngine.Random.Range(num4, this.parameters[2].returnFloat(null));
                }
                return;
            }
            break;
        }

        case 5:
        {
            string       str10  = this.parameters[0].returnString(null);
            PhotonPlayer player = this.parameters[1].returnPlayer(null);
            if (this.actionType == 0)
            {
                if (!FengGameManagerMKII.playerVariables.ContainsKey(str10))
                {
                    FengGameManagerMKII.playerVariables.Add(str10, player);
                }
                else
                {
                    FengGameManagerMKII.playerVariables[str10] = player;
                }
                break;
            }
            break;
        }

        case 6:
        {
            string str11 = this.parameters[0].returnString(null);
            TITAN  titan = this.parameters[1].returnTitan(null);
            if (this.actionType == 0)
            {
                if (!FengGameManagerMKII.titanVariables.ContainsKey(str11))
                {
                    FengGameManagerMKII.titanVariables.Add(str11, titan);
                }
                else
                {
                    FengGameManagerMKII.titanVariables[str11] = titan;
                }
                break;
            }
            break;
        }

        case 7:
        {
            PhotonPlayer targetPlayer = this.parameters[0].returnPlayer(null);
            switch (this.actionType)
            {
            case 0:
            {
                int iD = targetPlayer.ID;
                if (FengGameManagerMKII.heroHash.ContainsKey(iD))
                {
                    HERO hero = (HERO)FengGameManagerMKII.heroHash[iD];
                    hero.markDie();
                    hero.photonView.RPC("netDie2", PhotonTargets.All, new object[] { -1, this.parameters[1].returnString(null) + " " });
                }
                else
                {
                    this.callException("Player Not Alive");
                }
                return;
            }

            case 1:
                FengGameManagerMKII.instance.photonView.RPC("respawnHeroInNewRound", targetPlayer, new object[0]);
                return;

            case 2:
                FengGameManagerMKII.instance.photonView.RPC("spawnPlayerAtRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) });
                return;

            case 3:
            {
                int num6 = targetPlayer.ID;
                if (FengGameManagerMKII.heroHash.ContainsKey(num6))
                {
                    HERO hero2 = (HERO)FengGameManagerMKII.heroHash[num6];
                    hero2.photonView.RPC("moveToRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) });
                }
                else
                {
                    this.callException("Player Not Alive");
                }
                return;
            }

            case 4:
            {
                Hashtable propertiesToSet = new Hashtable();
                propertiesToSet.Add(PhotonPlayerProperty.kills, this.parameters[1].returnInt(null));
                targetPlayer.SetCustomProperties(propertiesToSet);
                return;
            }

            case 5:
            {
                Hashtable hashtable2 = new Hashtable();
                hashtable2.Add(PhotonPlayerProperty.deaths, this.parameters[1].returnInt(null));
                targetPlayer.SetCustomProperties(hashtable2);
                return;
            }

            case 6:
            {
                Hashtable hashtable3 = new Hashtable();
                hashtable3.Add(PhotonPlayerProperty.max_dmg, this.parameters[1].returnInt(null));
                targetPlayer.SetCustomProperties(hashtable3);
                return;
            }

            case 7:
            {
                Hashtable hashtable4 = new Hashtable();
                hashtable4.Add(PhotonPlayerProperty.total_dmg, this.parameters[1].returnInt(null));
                targetPlayer.SetCustomProperties(hashtable4);
                return;
            }

            case 8:
            {
                Hashtable hashtable5 = new Hashtable();
                hashtable5.Add(PhotonPlayerProperty.name, this.parameters[1].returnString(null));
                targetPlayer.SetCustomProperties(hashtable5);
                return;
            }

            case 9:
            {
                Hashtable hashtable6 = new Hashtable();
                hashtable6.Add(PhotonPlayerProperty.guildName, this.parameters[1].returnString(null));
                targetPlayer.SetCustomProperties(hashtable6);
                return;
            }

            case 10:
            {
                Hashtable hashtable7 = new Hashtable();
                hashtable7.Add(PhotonPlayerProperty.RCteam, this.parameters[1].returnInt(null));
                targetPlayer.SetCustomProperties(hashtable7);
                return;
            }

            case 11:
            {
                Hashtable hashtable8 = new Hashtable();
                hashtable8.Add(PhotonPlayerProperty.customInt, this.parameters[1].returnInt(null));
                targetPlayer.SetCustomProperties(hashtable8);
                return;
            }

            case 12:
            {
                Hashtable hashtable9 = new Hashtable();
                hashtable9.Add(PhotonPlayerProperty.customBool, this.parameters[1].returnBool(null));
                targetPlayer.SetCustomProperties(hashtable9);
                return;
            }

            case 13:
            {
                Hashtable hashtable10 = new Hashtable();
                hashtable10.Add(PhotonPlayerProperty.customString, this.parameters[1].returnString(null));
                targetPlayer.SetCustomProperties(hashtable10);
                return;
            }

            case 14:
            {
                Hashtable hashtable11 = new Hashtable();
                hashtable11.Add(PhotonPlayerProperty.RCteam, this.parameters[1].returnFloat(null));
                targetPlayer.SetCustomProperties(hashtable11);
                return;
            }
            }
            break;
        }

        case 8:
            switch (this.actionType)
            {
            case 0:
            {
                TITAN    titan2     = this.parameters[0].returnTitan(null);
                object[] parameters = new object[] { this.parameters[1].returnPlayer(null).ID, this.parameters[2].returnInt(null) };
                titan2.photonView.RPC("titanGetHit", titan2.photonView.owner, parameters);
                return;
            }

            case 1:
                FengGameManagerMKII.instance.spawnTitanAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null));
                return;

            case 2:
                FengGameManagerMKII.instance.spawnTitanAtAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null), this.parameters[4].returnFloat(null), this.parameters[5].returnFloat(null), this.parameters[6].returnFloat(null));
                return;

            case 3:
            {
                TITAN titan3 = this.parameters[0].returnTitan(null);
                int   num7   = this.parameters[1].returnInt(null);
                titan3.currentHealth = num7;
                if (titan3.maxHealth == 0)
                {
                    titan3.maxHealth = titan3.currentHealth;
                }
                titan3.photonView.RPC("labelRPC", PhotonTargets.AllBuffered, new object[] { titan3.currentHealth, titan3.maxHealth });
                return;
            }

            case 4:
            {
                TITAN titan4 = this.parameters[0].returnTitan(null);
                if (titan4.photonView.isMine)
                {
                    titan4.moveTo(this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null));
                }
                else
                {
                    titan4.photonView.RPC("moveToRPC", titan4.photonView.owner, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) });
                }
                return;
            }
            }
            break;

        case 9:
            switch (this.actionType)
            {
            case 0:
                FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { this.parameters[0].returnString(null), string.Empty });
                return;

            case 1:
                FengGameManagerMKII.instance.gameWin2();
                if (this.parameters[0].returnBool(null))
                {
                    FengGameManagerMKII.intVariables.Clear();
                    FengGameManagerMKII.boolVariables.Clear();
                    FengGameManagerMKII.stringVariables.Clear();
                    FengGameManagerMKII.floatVariables.Clear();
                    FengGameManagerMKII.playerVariables.Clear();
                    FengGameManagerMKII.titanVariables.Clear();
                }
                return;

            case 2:
                FengGameManagerMKII.instance.gameLose2();
                if (this.parameters[0].returnBool(null))
                {
                    FengGameManagerMKII.intVariables.Clear();
                    FengGameManagerMKII.boolVariables.Clear();
                    FengGameManagerMKII.stringVariables.Clear();
                    FengGameManagerMKII.floatVariables.Clear();
                    FengGameManagerMKII.playerVariables.Clear();
                    FengGameManagerMKII.titanVariables.Clear();
                }
                return;

            case 3:
                if (this.parameters[0].returnBool(null))
                {
                    FengGameManagerMKII.intVariables.Clear();
                    FengGameManagerMKII.boolVariables.Clear();
                    FengGameManagerMKII.stringVariables.Clear();
                    FengGameManagerMKII.floatVariables.Clear();
                    FengGameManagerMKII.playerVariables.Clear();
                    FengGameManagerMKII.titanVariables.Clear();
                }
                FengGameManagerMKII.instance.restartGame2(false);
                return;
            }
            break;
        }
    }
 private void OnTriggerStay(Collider other)
 {
     if (this.active_me)
     {
         if (!this.currentHitsII.Contains(other.gameObject))
         {
             this.currentHitsII.Add(other.gameObject);
             currentCameraT.startShake(0.1f, 0.1f, 0.95f);
             if (other.gameObject.transform.root.gameObject.tag == "titan")
             {
                 if ((int)FengGameManagerMKII.settings[330] == 0)
                 {
                     currentCameraT.main_objectH.slashHit.Play();
                 }
                 if ((int)FengGameManagerMKII.settings[287] == 0)
                 {
                     GameObject obj2;
                     if (IN_GAME_MAIN_CAMERA.gametype != GAMETYPE.SINGLE)
                     {
                         obj2 = PhotonNetwork.Instantiate("hitMeat", BaseT.position, Quaternion.Euler(270f, 0f, 0f), 0);
                     }
                     else
                     {
                         obj2 = (GameObject)UnityEngine.Object.Instantiate(Cach.hitMeat != null ? Cach.hitMeat : Cach.hitMeat = (GameObject)Resources.Load("hitMeat"));
                     }
                     obj2.transform.position = BaseT.position;
                 }
                 BaseTR.GetComponent <HERO>().useBlade(0);
             }
         }
         if (other.gameObject.tag == "playerHitbox")
         {
             if (FengGameManagerMKII.lvlInfo.pvp)
             {
                 float b = 1f - (Vector3.Distance(other.gameObject.transform.position, BaseT.position) * 0.05f);
                 b = Mathf.Min(1f, b);
                 HitBox component = other.gameObject.GetComponent <HitBox>();
                 HERO   hero      = null;
                 if ((((component != null) && (component.transform.root != null)) && ((hero = component.transform.root.GetComponent <HERO>()).myTeam != this.myTeam)) && !hero.isInvincible())
                 {
                     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                     {
                         if (!hero.isGrabbed)
                         {
                             Vector3 vector = component.transform.root.transform.position - BaseT.position;
                             hero.die((Vector3)(((vector.normalized * b) * 1000f) + (Vector3.up * 50f)), false);
                         }
                     }
                     else if (((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && !hero.HasDied()) && !hero.isGrabbed)
                     {
                         hero.markDie();
                         int      viewID     = BaseTR.gameObject.GetPhotonView().viewID;
                         string   plName     = PhotonView.Find(viewID).owner.name2;
                         object[] parameters = new object[5];
                         Vector3  vector2    = component.transform.root.position - BaseT.position;
                         parameters[0] = (Vector3)(((vector2.normalized * b) * 1000f) + (Vector3.up * 50f));
                         parameters[1] = false;
                         parameters[2] = viewID;
                         parameters[3] = plName;
                         parameters[4] = false;
                         hero.photonView.RPC("netDie", PhotonTargets.All, parameters);
                         AddStats(plName, 0);
                     }
                 }
             }
         }
         else if (other.gameObject.tag == "titanneck")
         {
             HitBox item = other.gameObject.GetComponent <HitBox>();
             if (((item != null) && this.checkIfBehind(item.transform.root.gameObject)) && !this.currentHits.Contains(item))
             {
                 item.hitPosition = (Vector3)((BaseT.position + item.transform.position) * 0.5f);
                 this.currentHits.Add(item);
                 if ((int)FengGameManagerMKII.settings[330] == 0)
                 {
                     this.meatDie.Play();
                 }
                 TITAN          titn = item.transform.root.GetComponent <TITAN>();
                 FEMALE_TITAN   ft   = null;
                 COLOSSAL_TITAN ct   = null;
                 if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                 {
                     if ((titn != null) && !titn.hasDie)
                     {
                         Vector3 vector3 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                         int     num2    = (int)((vector3.magnitude * 10f) * this.scoreMulti);
                         num2 = Mathf.Max(10, num2);
                         if ((int)FengGameManagerMKII.settings[320] == 1)
                         {
                             IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num2, item.transform.root.gameObject, 0.02f);
                         }
                         AddStats(titn.name, num2, titn.myLevel);
                         titn.die();
                         this.napeMeat(this.currentCameraT.main_objectR.velocity, item.transform.root);
                         FengGameManagerMKII.instance.netShowDamage(num2);
                         FengGameManagerMKII.instance.playerKillInfoSingleUpdate(num2);
                     }
                 }
                 else if (!PhotonNetwork.isMasterClient)
                 {
                     if (titn != null)
                     {
                         if (!titn.hasDie)
                         {
                             Vector3 vector4 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                             int     num3    = (int)((vector4.magnitude * 10f) * this.scoreMulti);
                             num3 = Mathf.Max(10, num3);
                             if ((int)FengGameManagerMKII.settings[320] == 1)
                             {
                                 IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num3, item.transform.root.gameObject, 0.02f);
                                 titn.asClientLookTarget = false;
                             }
                             AddStats(titn.name, num3, titn.myLevel);
                             object[] objArray2 = new object[] { BaseTR.gameObject.GetPhotonView().viewID, num3 };
                             titn.photonView.RPC("titanGetHit", titn.photonView.owner, objArray2);
                         }
                     }
                     else if ((ft = item.transform.root.GetComponent <FEMALE_TITAN>()) != null)
                     {
                         BaseTR.GetComponent <HERO>().useBlade(0x7fffffff);
                         Vector3 vector5 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                         int     num4    = (int)((vector5.magnitude * 10f) * this.scoreMulti);
                         num4 = Mathf.Max(10, num4);
                         if (!ft.hasDie)
                         {
                             AddStats(ft.name, num4, ft.size);
                             object[] objArray3 = new object[] { BaseTR.gameObject.GetPhotonView().viewID, num4 };
                             ft.photonView.RPC("titanGetHit", ft.photonView.owner, objArray3);
                         }
                     }
                     else if ((ct = item.transform.root.GetComponent <COLOSSAL_TITAN>()) != null)
                     {
                         BaseTR.GetComponent <HERO>().useBlade(0x7fffffff);
                         if (!ct.hasDie)
                         {
                             Vector3 vector6 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                             int     num5    = (int)((vector6.magnitude * 10f) * this.scoreMulti);
                             num5 = Mathf.Max(10, num5);
                             AddStats(ct.name, num5, ct.size);
                             object[] objArray4 = new object[] { BaseTR.gameObject.GetPhotonView().viewID, num5 };
                             ct.photonView.RPC("titanGetHit", ct.photonView.owner, objArray4);
                         }
                     }
                 }
                 else if (titn != null)
                 {
                     if (!titn.hasDie)
                     {
                         Vector3 vector7 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                         int     num6    = (int)((vector7.magnitude * 10f) * this.scoreMulti);
                         num6 = Mathf.Max(10, num6);
                         AddStats(titn.name, num6, titn.myLevel);
                         if ((int)FengGameManagerMKII.settings[320] == 1)
                         {
                             IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num6, item.transform.root.gameObject, 0.02f);
                         }
                         titn.titanGetHit(BaseTR.gameObject.GetPhotonView().viewID, num6);
                     }
                 }
                 else if ((ft = item.transform.root.GetComponent <FEMALE_TITAN>()) != null)
                 {
                     BaseTR.GetComponent <HERO>().useBlade(0x7fffffff);
                     if (!ft.hasDie)
                     {
                         Vector3 vector8 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                         int     num7    = (int)((vector8.magnitude * 10f) * this.scoreMulti);
                         num7 = Mathf.Max(10, num7);
                         AddStats(ft.name, num7, ft.size);
                         if ((int)FengGameManagerMKII.settings[320] == 1)
                         {
                             IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num7, null, 0.02f);
                         }
                         ft.titanGetHit(BaseTR.gameObject.GetPhotonView().viewID, num7);
                     }
                 }
                 else if ((ct = item.transform.root.GetComponent <COLOSSAL_TITAN>()) != null)
                 {
                     BaseTR.GetComponent <HERO>().useBlade(0x7fffffff);
                     if (!ct.hasDie)
                     {
                         Vector3 vector9 = this.currentCameraT.main_objectR.velocity - item.transform.root.rigidbody.velocity;
                         int     num8    = (int)((vector9.magnitude * 10f) * this.scoreMulti);
                         num8 = Mathf.Max(10, num8);
                         AddStats(ct.name, num8, ct.size);
                         if ((int)FengGameManagerMKII.settings[320] == 1)
                         {
                             IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num8, null, 0.02f);
                         }
                         ct.titanGetHit(BaseTR.gameObject.GetPhotonView().viewID, num8);
                     }
                 }
                 this.showCriticalHitFX();
             }
         }
         else if (other.gameObject.tag == "titaneye")
         {
             if (!this.currentHits.Contains(other.gameObject))
             {
                 this.currentHits.Add(other.gameObject);
                 GameObject   gameObject = other.gameObject.transform.root.gameObject;
                 TITAN        tit        = null;
                 FEMALE_TITAN ft         = gameObject.GetComponent <FEMALE_TITAN>();
                 if (ft != null)
                 {
                     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                     {
                         if (!ft.hasDie)
                         {
                             ft.hitEye();
                         }
                     }
                     else if (!PhotonNetwork.isMasterClient)
                     {
                         if (!ft.hasDie)
                         {
                             object[] objArray5 = new object[] { BaseTR.gameObject.GetPhotonView().viewID };
                             ft.photonView.RPC("hitEyeRPC", PhotonTargets.MasterClient, objArray5);
                         }
                     }
                     else if (!ft.hasDie)
                     {
                         ft.hitEyeRPC(BaseTR.gameObject.GetPhotonView().viewID);
                     }
                 }
                 else if ((tit = gameObject.GetComponent <TITAN>()).abnormalType != AbnormalType.TYPE_CRAWLER)
                 {
                     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                     {
                         if (!tit.hasDie)
                         {
                             tit.hitEye();
                         }
                     }
                     else if (!PhotonNetwork.isMasterClient)
                     {
                         if (!tit.hasDie)
                         {
                             object[] objArray6 = new object[] { BaseTR.gameObject.GetPhotonView().viewID };
                             tit.photonView.RPC("hitEyeRPC", PhotonTargets.MasterClient, objArray6);
                         }
                     }
                     else if (!tit.hasDie)
                     {
                         tit.hitEyeRPC(BaseTR.gameObject.GetPhotonView().viewID);
                     }
                     this.showCriticalHitFX();
                 }
             }
         }
         else if ((other.gameObject.tag == "titanankle") && !this.currentHits.Contains(other.gameObject))
         {
             this.currentHits.Add(other.gameObject);
             GameObject obj4     = other.gameObject.transform.root.gameObject;
             Vector3    vector10 = this.currentCameraT.main_objectR.velocity - obj4.rigidbody.velocity;
             int        num9     = (int)((vector10.magnitude * 10f) * this.scoreMulti);
             num9 = Mathf.Max(10, num9);
             TITAN        tit = obj4.GetComponent <TITAN>();
             FEMALE_TITAN ft  = null;
             if ((tit != null) && (tit.abnormalType != AbnormalType.TYPE_CRAWLER))
             {
                 if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                 {
                     if (!tit.hasDie)
                     {
                         tit.hitAnkle();
                     }
                 }
                 else
                 {
                     if (!PhotonNetwork.isMasterClient)
                     {
                         if (!tit.hasDie)
                         {
                             object[] objArray7 = new object[] { BaseTR.gameObject.GetPhotonView().viewID };
                             tit.photonView.RPC("hitAnkleRPC", PhotonTargets.MasterClient, objArray7);
                         }
                     }
                     else if (!tit.hasDie)
                     {
                         tit.hitAnkle();
                     }
                     this.showCriticalHitFX();
                 }
             }
             else if ((ft = obj4.GetComponent <FEMALE_TITAN>()) != null)
             {
                 if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                 {
                     if (other.gameObject.name == "ankleR")
                     {
                         if (!ft.hasDie)
                         {
                             ft.hitAnkleR(num9);
                         }
                     }
                     else if (!ft.hasDie)
                     {
                         ft.hitAnkleL(num9);
                     }
                 }
                 else if (other.gameObject.name == "ankleR")
                 {
                     if (!PhotonNetwork.isMasterClient)
                     {
                         if (!ft.hasDie)
                         {
                             object[] objArray8 = new object[] { BaseTR.gameObject.GetPhotonView().viewID, num9 };
                             ft.photonView.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, objArray8);
                         }
                     }
                     else if (!ft.hasDie)
                     {
                         ft.hitAnkleRRPC(BaseTR.gameObject.GetPhotonView().viewID, num9);
                     }
                 }
                 else if (!PhotonNetwork.isMasterClient)
                 {
                     if (!ft.hasDie)
                     {
                         object[] objArray9 = new object[] { BaseTR.gameObject.GetPhotonView().viewID, num9 };
                         ft.photonView.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, objArray9);
                     }
                 }
                 else if (!ft.hasDie)
                 {
                     ft.hitAnkleLRPC(BaseTR.gameObject.GetPhotonView().viewID, num9);
                 }
                 this.showCriticalHitFX();
             }
         }
     }
 }
 private void OnTriggerStay(Collider other)
 {
     if (((IN_GAME_MAIN_CAMERA.gametype != GAMETYPE.MULTIPLAYER) || baseG.GetPhotonView().isMine) && this.active_me)
     {
         GameObject otherG = other.gameObject;
         if (otherG.tag == "playerHitbox")
         {
             if (FengGameManagerMKII.lvlInfo.pvp)
             {
                 float b = 1f - (Vector3.Distance(otherG.transform.position, baseT.position) * 0.05f);
                 b = Mathf.Min(1f, b);
                 HitBox component = otherG.GetComponent <HitBox>();
                 HERO   hero      = component.transform.root.GetComponent <HERO>();
                 if ((((component != null) && (component.transform.root != null)) && (hero.myTeam != this.myTeam)) && !hero.isInvincible())
                 {
                     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                     {
                         if (!hero.isGrabbed)
                         {
                             Vector3 vector = component.transform.root.transform.position - baseT.position;
                             hero.die((Vector3)(((vector.normalized * b) * 1000f) + (Vector3.up * 50f)), false);
                         }
                     }
                     else if (((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && !hero.HasDied()) && !hero.isGrabbed)
                     {
                         hero.markDie();
                         object[] parameters = new object[5];
                         Vector3  vector2    = component.transform.root.position - baseT.position;
                         parameters[0] = (Vector3)(((vector2.normalized * b) * 1000f) + (Vector3.up * 50f));
                         parameters[1] = false;
                         parameters[2] = this.viewID;
                         parameters[3] = this.ownerName;
                         parameters[4] = false;
                         AddStats(ownerName, 0);
                         hero.photonView.RPC("netDie", PhotonTargets.All, parameters);
                     }
                 }
             }
         }
         else if (otherG.tag == "erenHitbox")
         {
             if ((this.dmg > 0) && !otherG.transform.root.gameObject.GetComponent <TITAN_EREN>().isHit)
             {
                 otherG.transform.root.gameObject.GetComponent <TITAN_EREN>().hitByTitan();
             }
         }
         else if (otherG.tag == "titanneck")
         {
             HitBox item = otherG.GetComponent <HitBox>();
             if (((item != null) && this.checkIfBehind(item.transform.root.gameObject)) && !this.currentHits.Contains(item))
             {
                 item.hitPosition = (Vector3)((baseT.position + item.transform.position) * 0.5f);
                 this.currentHits.Add(item);
                 TITAN          tit = item.transform.root.GetComponent <TITAN>();
                 FEMALE_TITAN   ft  = null;
                 COLOSSAL_TITAN ct  = null;
                 if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                 {
                     if ((tit != null) && !tit.hasDie)
                     {
                         Vector3 vector3 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                         int     num2    = (int)((vector3.magnitude * 10f) * this.scoreMulti);
                         num2 = Mathf.Max(10, num2);
                         FengGameManagerMKII.instance.netShowDamage(num2);
                         if (num2 > (tit.myLevel * 100f))
                         {
                             AddStats(tit.name, num2, tit.myLevel);
                             tit.die();
                             if ((int)FengGameManagerMKII.settings[320] == 1)
                             {
                                 IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num2, item.transform.root.gameObject, 0.02f);
                             }
                             FengGameManagerMKII.instance.playerKillInfoSingleUpdate(num2);
                         }
                     }
                 }
                 else if (!PhotonNetwork.isMasterClient)
                 {
                     if (tit != null)
                     {
                         if (!tit.hasDie)
                         {
                             Vector3 vector4 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                             int     num3    = (int)((vector4.magnitude * 10f) * this.scoreMulti);
                             num3 = Mathf.Max(10, num3);
                             if (num3 > (tit.myLevel * 100f))
                             {
                                 AddStats(tit.name, num3, tit.myLevel);
                                 if ((int)FengGameManagerMKII.settings[320] == 1)
                                 {
                                     IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num3, item.transform.root.gameObject, 0.02f);
                                     tit.asClientLookTarget = false;
                                 }
                                 object[] objArray2 = new object[] { baseG.GetPhotonView().viewID, num3 };
                                 tit.photonView.RPC("titanGetHit", tit.photonView.owner, objArray2);
                             }
                         }
                     }
                     else if ((ft = item.transform.root.GetComponent <FEMALE_TITAN>()) != null)
                     {
                         Vector3 vector5 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                         int     num4    = (int)((vector5.magnitude * 10f) * this.scoreMulti);
                         num4 = Mathf.Max(10, num4);
                         if (!ft.hasDie)
                         {
                             AddStats(ft.name, num4, ft.size);
                             object[] objArray3 = new object[] { baseG.GetPhotonView().viewID, num4 };
                             ft.photonView.RPC("titanGetHit", ft.photonView.owner, objArray3);
                         }
                     }
                     else if (((ct = item.transform.root.GetComponent <COLOSSAL_TITAN>()) != null) && !ct.hasDie)
                     {
                         Vector3 vector6 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                         int     num5    = (int)((vector6.magnitude * 10f) * this.scoreMulti);
                         num5 = Mathf.Max(10, num5);
                         AddStats(ct.name, num5, ct.size);
                         object[] objArray4 = new object[] { baseG.GetPhotonView().viewID, num5 };
                         ct.photonView.RPC("titanGetHit", ct.photonView.owner, objArray4);
                     }
                 }
                 else if (tit != null)
                 {
                     if (!tit.hasDie)
                     {
                         Vector3 vector7 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                         int     num6    = (int)((vector7.magnitude * 10f) * this.scoreMulti);
                         num6 = Mathf.Max(10, num6);
                         if (num6 > (tit.myLevel * 100f))
                         {
                             AddStats(tit.name, num6, tit.myLevel);
                             if ((int)FengGameManagerMKII.settings[320] == 1)
                             {
                                 IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num6, item.transform.root.gameObject, 0.02f);
                             }
                             tit.titanGetHit(baseG.GetPhotonView().viewID, num6);
                         }
                     }
                 }
                 else if ((ft = item.transform.root.GetComponent <FEMALE_TITAN>()) != null)
                 {
                     if (!ft.hasDie)
                     {
                         Vector3 vector8 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                         int     num7    = (int)((vector8.magnitude * 10f) * this.scoreMulti);
                         num7 = Mathf.Max(10, num7);
                         AddStats(ft.name, num7, ft.size);
                         if ((int)FengGameManagerMKII.settings[320] == 1)
                         {
                             IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num7, null, 0.02f);
                         }
                         ft.titanGetHit(baseG.GetPhotonView().viewID, num7);
                     }
                 }
                 else if (((ct = item.transform.root.GetComponent <COLOSSAL_TITAN>()) != null) && !ct.hasDie)
                 {
                     Vector3 vector9 = currentCameraT.main_object.rigidbody.velocity - item.transform.root.rigidbody.velocity;
                     int     num8    = (int)((vector9.magnitude * 10f) * this.scoreMulti);
                     num8 = Mathf.Max(10, num8);
                     AddStats(ct.name, num8, ct.size);
                     if ((int)FengGameManagerMKII.settings[320] == 1)
                     {
                         IN_GAME_MAIN_CAMERA.instance.startSnapShot(item.transform.position, num8, null, 0.02f);
                     }
                     ct.titanGetHit(baseG.GetPhotonView().viewID, num8);
                 }
                 this.showCriticalHitFX(otherG.transform.position);
             }
         }
         else if (otherG.tag == "titaneye")
         {
             if (!this.currentHits.Contains(otherG))
             {
                 this.currentHits.Add(otherG);
                 GameObject   gameObject = otherG.transform.root.gameObject;
                 FEMALE_TITAN ft         = gameObject.GetComponent <FEMALE_TITAN>();
                 TITAN        tit        = null;
                 if (ft != null)
                 {
                     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                     {
                         if (!ft.hasDie)
                         {
                             ft.hitEye();
                         }
                     }
                     else if (!PhotonNetwork.isMasterClient)
                     {
                         if (!ft.hasDie)
                         {
                             object[] objArray5 = new object[] { baseG.GetPhotonView().viewID };
                             ft.photonView.RPC("hitEyeRPC", PhotonTargets.MasterClient, objArray5);
                         }
                     }
                     else if (!ft.hasDie)
                     {
                         ft.hitEyeRPC(baseG.GetPhotonView().viewID);
                     }
                 }
                 else if ((tit = gameObject.GetComponent <TITAN>()).abnormalType != AbnormalType.TYPE_CRAWLER)
                 {
                     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                     {
                         if (!tit.hasDie)
                         {
                             tit.hitEye();
                         }
                     }
                     else if (!PhotonNetwork.isMasterClient)
                     {
                         if (!tit.hasDie)
                         {
                             object[] objArray6 = new object[] { baseG.GetPhotonView().viewID };
                             tit.photonView.RPC("hitEyeRPC", PhotonTargets.MasterClient, objArray6);
                         }
                     }
                     else if (!tit.hasDie)
                     {
                         tit.hitEyeRPC(baseG.GetPhotonView().viewID);
                     }
                     this.showCriticalHitFX(otherG.transform.position);
                 }
             }
         }
         else if ((otherG.tag == "titanankle") && !this.currentHits.Contains(otherG))
         {
             this.currentHits.Add(otherG);
             GameObject obj3     = otherG.transform.root.gameObject;
             Vector3    vector10 = currentCameraT.main_object.rigidbody.velocity - obj3.rigidbody.velocity;
             int        num9     = (int)((vector10.magnitude * 10f) * this.scoreMulti);
             num9 = Mathf.Max(10, num9);
             TITAN        tit = obj3.GetComponent <TITAN>();
             FEMALE_TITAN ft  = null;
             if ((tit != null) && (tit.abnormalType != AbnormalType.TYPE_CRAWLER))
             {
                 if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                 {
                     if (!tit.hasDie)
                     {
                         tit.hitAnkle();
                     }
                 }
                 else
                 {
                     if (!PhotonNetwork.isMasterClient)
                     {
                         if (!tit.hasDie)
                         {
                             object[] objArray7 = new object[] { baseG.GetPhotonView().viewID };
                             tit.photonView.RPC("hitAnkleRPC", PhotonTargets.MasterClient, objArray7);
                         }
                     }
                     else if (!tit.hasDie)
                     {
                         tit.hitAnkle();
                     }
                     this.showCriticalHitFX(otherG.transform.position);
                 }
             }
             else if ((ft = obj3.GetComponent <FEMALE_TITAN>()) != null)
             {
                 if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                 {
                     if (otherG.name == "ankleR")
                     {
                         if (!ft.hasDie)
                         {
                             ft.hitAnkleR(num9);
                         }
                     }
                     else if (!ft.hasDie)
                     {
                         ft.hitAnkleL(num9);
                     }
                 }
                 else if (otherG.name == "ankleR")
                 {
                     if (!PhotonNetwork.isMasterClient)
                     {
                         if (!ft.hasDie)
                         {
                             object[] objArray8 = new object[] { baseG.GetPhotonView().viewID, num9 };
                             ft.photonView.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, objArray8);
                         }
                     }
                     else if (!ft.hasDie)
                     {
                         ft.hitAnkleRRPC(baseG.GetPhotonView().viewID, num9);
                     }
                 }
                 else if (!PhotonNetwork.isMasterClient)
                 {
                     if (!ft.hasDie)
                     {
                         object[] objArray9 = new object[] { baseG.GetPhotonView().viewID, num9 };
                         ft.photonView.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, objArray9);
                     }
                 }
                 else if (!ft.hasDie)
                 {
                     ft.hitAnkleLRPC(baseG.GetPhotonView().viewID, num9);
                 }
                 this.showCriticalHitFX(otherG.transform.position);
             }
         }
     }
 }
    private void OnTriggerStay(Collider other)
    {
        if (this.active_me)
        {
            GameObject otherG = other.gameObject;
            Transform  otherT = other.transform;
            if (!this.currentHitsII.Contains(otherG))
            {
                this.currentHitsII.Add(otherG);
                mainCamera.startShake(0.1f, 0.1f, 0.95f);
                if (otherT.root.gameObject.CompareTag("titan"))
                {
                    this.hero.slashHit.Play();
                    if (IN_GAME_MAIN_CAMERA.gametype != GAMETYPE.SINGLE)
                    {
                        PhotonNetwork.Instantiate("hitMeat", this.baseT.position, Quaternion.Euler(270f, 0f, 0f), 0, null);
                    }
                    else
                    {
                        ((GameObject)UnityEngine.Object.Instantiate(CLEARSKIES.CacheResources.Load("hitMeat"))).transform.position = baseT.position;
                    }
                    this.hero.useBlade(0);
                }
            }
            string tag;
            if ((tag = otherG.tag) != null)
            {
                HitBox     component = otherG.GetComponent <HitBox>();
                Transform  componentT, componentTroot;
                GameObject componentGO;
                MONO       monosingletone;
                switch (tag)
                {
                case "playerHitbox":
                    if (LevelInfo.getInfo(FengGameManagerMKII.level).pvp)
                    {
                        float b = 1f - (Vector3.Distance(otherT.position, this.baseT.position) * 0.05f);
                        b = Mathf.Min(1f, b);
                        if ((componentTroot = (componentT = component.transform).root) != null)
                        {
                            HERO Hero = componentTroot.GetComponent <HERO>();
                            if (Hero != null && Hero.myTeam != this.myTeam && !Hero.isInvincible() && !Hero.isGrabbed)
                            {
                                if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                {
                                    Hero.die((componentTroot.position - this.baseT.position).normalized * b * 1000f + Vector3.up * 50f, false);
                                    return;
                                }
                                if (!Hero.HasDied())
                                {
                                    Hero.markDie();
                                    object[] parameters = new object[]
                                    {
                                        (componentTroot.position - baseT.position).normalized * b * 1000f + Vector3.up * 50f,
                                        false,
                                        basePV.viewID,
                                        basePV.owner.customProperties[PhotonPlayerProperty.name],
                                        false
                                    };
                                    Hero.photonView.RPC("netDie", PhotonTargets.All, parameters);
                                }
                            }
                        }
                    }
                    break;

                case "titanneck":
                    if ((componentGO = (componentTroot = (componentT = component.transform).root).gameObject) != null)
                    {
                        if (this.checkIfBehind(componentGO) && !this.currentHits.Contains(component))
                        {
                            component.hitPosition = (Vector3)((this.baseT.position + componentT.position) * 0.5f);
                            this.currentHits.Add(component);
                            this.meatDie.Play();
                            monosingletone = componentTroot.GetComponent <MONO>();
                            SPECIES specie = monosingletone.species;
                            switch (specie)
                            {
                            case SPECIES.Titan:
                                TITAN titan = monosingletone as TITAN;
                                if (titan != null && !titan.hasDie)
                                {
                                    int num2 = this.Damage(componentTroot);
                                    if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                    {
                                        if (PlayerPrefs.HasKey("EnableSS") && (PlayerPrefs.GetInt("EnableSS") == 1))
                                        {
                                            mainCamera.startSnapShot2(componentT.position, num2, componentGO, 0.02f);
                                        }
                                        titan.die();
                                        this.napeMeat(this.hero.rigidbody.velocity, componentTroot);
                                        FengGameManagerMKII.instance.netShowDamage(num2);
                                        FengGameManagerMKII.instance.playerKillInfoSingleUpdate(num2);
                                    }
                                    else
                                    {
                                        if (!PhotonNetwork.isMasterClient)
                                        {
                                            if (PlayerPrefs.HasKey("EnableSS") && (PlayerPrefs.GetInt("EnableSS") == 1))
                                            {
                                                mainCamera.startSnapShot2(componentT.position, num2, componentGO, 0.02f);
                                                titan.asClientLookTarget = false;
                                            }
                                            object[] objArray2 = new object[] { basePV.viewID, num2 };
                                            titan.photonView.RPC("titanGetHit", titan.photonView.owner, objArray2);
                                        }
                                        else
                                        {
                                            if (PlayerPrefs.HasKey("EnableSS") && (PlayerPrefs.GetInt("EnableSS") == 1))
                                            {
                                                mainCamera.startSnapShot2(componentT.position, num2, componentGO, 0.02f);
                                            }
                                            titan.titanGetHit(this.basePV.viewID, num2);
                                        }
                                    }
                                }
                                break;

                            case SPECIES.Hero | SPECIES.Titan:
                                break;

                            case SPECIES.FemaleTitan:
                                FEMALE_TITAN female_titan = monosingletone as FEMALE_TITAN;
                                this.hero.useBlade(0x7fffffff);
                                if (female_titan != null && !female_titan.hasDie)
                                {
                                    int num2 = this.Damage(componentTroot);
                                    if (!PhotonNetwork.isMasterClient)
                                    {
                                        object[] objArray3 = new object[] { this.basePV.viewID, num2 };
                                        female_titan.photonView.RPC("titanGetHit", female_titan.photonView.owner, objArray3);
                                    }
                                    else
                                    {
                                        if (PlayerPrefs.HasKey("EnableSS") && (PlayerPrefs.GetInt("EnableSS") == 1))
                                        {
                                            mainCamera.startSnapShot2(componentT.position, num2, null, 0.02f);
                                        }
                                        female_titan.titanGetHit(this.basePV.viewID, num2);
                                    }
                                }
                                break;

                            default:
                                if (monosingletone.species == SPECIES.ColossalTitan)
                                {
                                    COLOSSAL_TITAN colossal_titan = monosingletone as COLOSSAL_TITAN;
                                    this.hero.useBlade(0x7fffffff);
                                    if (!colossal_titan.hasDie)
                                    {
                                        int num2 = this.Damage(componentTroot);
                                        if (!PhotonNetwork.isMasterClient)
                                        {
                                            object[] objArray4 = new object[] { this.basePV.viewID, num2 };
                                            colossal_titan.photonView.RPC("titanGetHit", colossal_titan.photonView.owner, objArray4);
                                        }
                                        else

                                        if (PlayerPrefs.HasKey("EnableSS") && (PlayerPrefs.GetInt("EnableSS") == 1))
                                        {
                                            mainCamera.startSnapShot2(componentT.position, num2, null, 0.02f);
                                        }
                                        colossal_titan.titanGetHit(this.basePV.viewID, num2);
                                    }
                                }
                                break;
                            }
                            this.showCriticalHitFX();
                        }
                    }
                    break;

                case "titaneye":
                    if (!this.currentHits.Contains(otherG))
                    {
                        this.currentHits.Add(otherG);
                        componentT = otherG.transform;
                        if (componentT != null)
                        {
                            monosingletone = componentT.root.GetComponent <MONO>();
                            if (monosingletone != null)
                            {
                                switch (monosingletone.species)
                                {
                                case SPECIES.Titan:
                                    TITAN titan = monosingletone as TITAN;
                                    if (titan.abnormalType != AbnormalType.TYPE_CRAWLER && !titan.hasDie)
                                    {
                                        if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                        {
                                            titan.hitEye();
                                        }
                                        else if (!PhotonNetwork.isMasterClient)
                                        {
                                            object[] objArray6 = new object[] { this.basePV.viewID };
                                            titan.photonView.RPC("hitEyeRPC", PhotonTargets.MasterClient, objArray6);
                                        }
                                        else
                                        {
                                            titan.hitEyeRPC(this.baseT.root.gameObject.GetPhotonView().viewID);
                                        }
                                        this.showCriticalHitFX();
                                    }
                                    break;

                                case SPECIES.FemaleTitan:
                                    FEMALE_TITAN female_titan = monosingletone as FEMALE_TITAN;
                                    if (!female_titan.hasDie)
                                    {
                                        if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                        {
                                            female_titan.hitEye();
                                        }
                                        else if (!PhotonNetwork.isMasterClient)
                                        {
                                            object[] objArray5 = new object[] { this.basePV.viewID };
                                            female_titan.photonView.RPC("hitEyeRPC", PhotonTargets.MasterClient, objArray5);
                                        }
                                        else
                                        {
                                            female_titan.hitEyeRPC(this.basePV.viewID);
                                        }
                                        this.showCriticalHitFX();
                                    }
                                    break;
                                }
                            }
                        }
                    }
                    break;

                case "titanankle":
                    if (!this.currentHits.Contains(otherG))
                    {
                        this.currentHits.Add(otherG);
                        componentT = otherG.transform;
                        if (componentT != null)
                        {
                            monosingletone = componentT.root.GetComponent <MONO>();
                            switch (monosingletone.species)
                            {
                            case SPECIES.Titan:
                                TITAN titan = monosingletone as TITAN;
                                if (titan.abnormalType != AbnormalType.TYPE_CRAWLER && !titan.hasDie)
                                {
                                    if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                    {
                                        titan.hitAnkle();
                                    }
                                    else if (!PhotonNetwork.isMasterClient)
                                    {
                                        object[] objArray6 = new object[] { this.basePV.viewID };
                                        titan.GetComponent <TITAN>().photonView.RPC("hitAnkleRPC", PhotonTargets.MasterClient, objArray6);
                                    }
                                    else
                                    {
                                        titan.hitAnkle();
                                    }
                                    this.showCriticalHitFX();
                                }
                                break;

                            case SPECIES.FemaleTitan:
                                FEMALE_TITAN female_titan = monosingletone as FEMALE_TITAN;
                                if (!female_titan.hasDie)
                                {
                                    int num2 = this.Damage(female_titan);
                                    if (otherG.name == "ankleR")
                                    {
                                        if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                        {
                                            female_titan.hitAnkleR(num2);
                                            FengGameManagerMKII.instance.netShowDamage(num2);
                                        }
                                        else if (!PhotonNetwork.isMasterClient)
                                        {
                                            object[] objArray5 = new object[] { this.basePV.viewID };
                                            female_titan.photonView.RPC("hitAnkleRRPC", PhotonTargets.MasterClient, objArray5);
                                        }
                                        else
                                        {
                                            female_titan.hitAnkleRRPC(this.basePV.viewID, num2);
                                        }
                                    }
                                    else if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
                                    {
                                        female_titan.hitAnkleL(num2);
                                        FengGameManagerMKII.instance.netShowDamage(num2);
                                    }
                                    else if (!PhotonNetwork.isMasterClient)
                                    {
                                        object[] objArray5 = new object[] { this.basePV.viewID };
                                        female_titan.photonView.RPC("hitAnkleLRPC", PhotonTargets.MasterClient, objArray5);
                                    }
                                    else
                                    {
                                        female_titan.hitAnkleLRPC(this.basePV.viewID, num2);
                                    }
                                    this.showCriticalHitFX();
                                }
                                break;
                            }
                        }
                    }
                    break;

                default:
                    return;
                }
            }
        }
    }
Beispiel #12
0
    public void doAction()
    {
        switch (this.actionClass)
        {
        case 0:
            this.nextEvent.checkEvent();
            return;

        case 1:
        {
            string key = this.parameters[0].returnString(null);
            int    num = this.parameters[1].returnInt(null);
            switch (this.actionType)
            {
            case 0:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    FengGameManagerMKII.intVariables.Add(key, num);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = num;
                return;

            case 1:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) + num;
                return;

            case 2:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) - num;
                return;

            case 3:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) * num;
                return;

            case 4:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) / num;
                return;

            case 5:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = ((int)FengGameManagerMKII.intVariables[key]) % num;
                return;

            case 6:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                FengGameManagerMKII.intVariables[key] = (int)Math.Pow((double)((int)FengGameManagerMKII.intVariables[key]), (double)num);
                return;

            case 12:
                if (!FengGameManagerMKII.intVariables.ContainsKey(key))
                {
                    FengGameManagerMKII.intVariables.Add(key, UnityEngine.Random.Range(num, this.parameters[2].returnInt(null)));
                    return;
                }
                FengGameManagerMKII.intVariables[key] = UnityEngine.Random.Range(num, this.parameters[2].returnInt(null));
                return;
            }
            return;
        }

        case 2:
        {
            string str2 = this.parameters[0].returnString(null);
            bool   flag = this.parameters[1].returnBool(null);
            switch (this.actionType)
            {
            case 11:
                if (!FengGameManagerMKII.boolVariables.ContainsKey(str2))
                {
                    this.callException("Variable not found: " + str2);
                    return;
                }
                FengGameManagerMKII.boolVariables[str2] = !((bool)FengGameManagerMKII.boolVariables[str2]);
                return;

            case 12:
                if (!FengGameManagerMKII.boolVariables.ContainsKey(str2))
                {
                    FengGameManagerMKII.boolVariables.Add(str2, Convert.ToBoolean(UnityEngine.Random.Range(0, 2)));
                    return;
                }
                FengGameManagerMKII.boolVariables[str2] = Convert.ToBoolean(UnityEngine.Random.Range(0, 2));
                return;

            case 0:
                if (!FengGameManagerMKII.boolVariables.ContainsKey(str2))
                {
                    FengGameManagerMKII.boolVariables.Add(str2, flag);
                    return;
                }
                FengGameManagerMKII.boolVariables[str2] = flag;
                return;
            }
            return;
        }

        case 3:
        {
            string str3 = this.parameters[0].returnString(null);
            switch (this.actionType)
            {
            case 7:
            {
                string str4 = string.Empty;
                for (int i = 1; i < this.parameters.Length; i++)
                {
                    str4 = str4 + this.parameters[i].returnString(null);
                }
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    FengGameManagerMKII.stringVariables.Add(str3, str4);
                    return;
                }
                FengGameManagerMKII.stringVariables[str3] = str4;
                return;
            }

            case 8:
            {
                string str5 = this.parameters[1].returnString(null);
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]) + str5;
                return;
            }

            case 9:
                this.parameters[1].returnString(null);
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.stringVariables[str3] = ((string)FengGameManagerMKII.stringVariables[str3]).Replace(this.parameters[1].returnString(null), this.parameters[2].returnString(null));
                return;

            case 0:
            {
                string str6 = this.parameters[1].returnString(null);
                if (!FengGameManagerMKII.stringVariables.ContainsKey(str3))
                {
                    FengGameManagerMKII.stringVariables.Add(str3, str6);
                    return;
                }
                FengGameManagerMKII.stringVariables[str3] = str6;
                return;
            }
            }
            return;
        }

        case 4:
        {
            string str7 = this.parameters[0].returnString(null);
            float  num3 = this.parameters[1].returnFloat(null);
            switch (this.actionType)
            {
            case 0:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    FengGameManagerMKII.floatVariables.Add(str7, num3);
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = num3;
                return;

            case 1:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) + num3;
                return;

            case 2:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) - num3;
                return;

            case 3:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) * num3;
                return;

            case 4:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) / num3;
                return;

            case 5:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = ((float)FengGameManagerMKII.floatVariables[str7]) % num3;
                return;

            case 6:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = (float)Math.Pow((double)((int)FengGameManagerMKII.floatVariables[str7]), (double)num3);
                return;

            case 12:
                if (!FengGameManagerMKII.floatVariables.ContainsKey(str7))
                {
                    FengGameManagerMKII.floatVariables.Add(str7, UnityEngine.Random.Range(num3, this.parameters[2].returnFloat(null)));
                    return;
                }
                FengGameManagerMKII.floatVariables[str7] = UnityEngine.Random.Range(num3, this.parameters[2].returnFloat(null));
                return;
            }
            return;
        }

        case 5:
        {
            string       str8   = this.parameters[0].returnString(null);
            PhotonPlayer player = this.parameters[1].returnPlayer(null);
            if (this.actionType != 0)
            {
                break;
            }
            if (FengGameManagerMKII.playerVariables.ContainsKey(str8))
            {
                FengGameManagerMKII.playerVariables[str8] = player;
                return;
            }
            FengGameManagerMKII.playerVariables.Add(str8, player);
            return;
        }

        case 6:
        {
            string str9  = this.parameters[0].returnString(null);
            TITAN  titan = this.parameters[1].returnTitan(null);
            if (this.actionType != 0)
            {
                break;
            }
            if (FengGameManagerMKII.titanVariables.ContainsKey(str9))
            {
                FengGameManagerMKII.titanVariables[str9] = titan;
                return;
            }
            FengGameManagerMKII.titanVariables.Add(str9, titan);
            return;
        }

        case 7:
        {
            PhotonPlayer targetPlayer = this.parameters[0].returnPlayer(null);
            switch (this.actionType)
            {
            case 0:
            {
                int iD = targetPlayer.ID;
                if (FengGameManagerMKII.heroHash.ContainsKey(iD))
                {
                    HERO hero = (HERO)FengGameManagerMKII.heroHash[iD];
                    hero.markDie();
                    hero.photonView.RPC("netDie2", PhotonTargets.All, new object[] { -1, this.parameters[1].returnString(null) + " " });
                    return;
                }
                this.callException("Player Not Alive");
                return;
            }

            case 1:
                FengGameManagerMKII.instance.photonView.RPC("respawnHeroInNewRound", targetPlayer, new object[0]);
                return;

            case 2:
                FengGameManagerMKII.instance.photonView.RPC("spawnPlayerAtRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) });
                return;

            case 3:
            {
                int num5 = targetPlayer.ID;
                if (FengGameManagerMKII.heroHash.ContainsKey(num5))
                {
                    HERO hero2 = (HERO)FengGameManagerMKII.heroHash[num5];
                    hero2.photonView.RPC("moveToRPC", targetPlayer, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) });
                    return;
                }
                this.callException("Player Not Alive");
                return;
            }

            case 4:
            {
                targetPlayer.kills = this.parameters[1].returnInt(null);

                return;
            }

            case 5:
            {
                targetPlayer.deaths = this.parameters[1].returnInt(null);
                return;
            }

            case 6:
            {
                targetPlayer.max_dmg = this.parameters[1].returnInt(null);
                return;
            }

            case 7:
            {
                targetPlayer.total_dmg = this.parameters[1].returnInt(null);

                return;
            }

            case 8:
            {
                targetPlayer.name2 = this.parameters[1].returnString(null);
                return;
            }

            case 9:
            {
                targetPlayer.guildName = this.parameters[1].returnString(null);
                return;
            }

            case 10:
            {
                targetPlayer.RCteam = this.parameters[1].returnInt(null);

                return;
            }

            case 11:
            {
                targetPlayer.customInt = this.parameters[1].returnInt(null);
                return;
            }

            case 12:
            {
                targetPlayer.customBool = this.parameters[1].returnBool(null);
                return;
            }

            case 13:
            {
                targetPlayer.customString = this.parameters[1].returnString(null);
                return;
            }

            case 14:
            {
                targetPlayer.RCteam = (int)this.parameters[1].returnFloat(null);
                return;
            }
            }
            return;
        }

        case 8:
            switch (this.actionType)
            {
            case 0:
            {
                TITAN    titan2     = this.parameters[0].returnTitan(null);
                object[] parameters = new object[] { this.parameters[1].returnPlayer(null).ID, this.parameters[2].returnInt(null) };
                titan2.photonView.RPC("titanGetHit", titan2.photonView.owner, parameters);
                return;
            }

            case 1:
                FengGameManagerMKII.instance.spawnTitanAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null));
                return;

            case 2:
                FengGameManagerMKII.instance.spawnTitanAtAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null), this.parameters[4].returnFloat(null), this.parameters[5].returnFloat(null), this.parameters[6].returnFloat(null));
                return;

            case 3:
            {
                TITAN titan3 = this.parameters[0].returnTitan(null);
                int   num6   = this.parameters[1].returnInt(null);
                titan3.currentHealth = num6;
                if (titan3.maxHealth == 0)
                {
                    titan3.maxHealth = titan3.currentHealth;
                }
                titan3.photonView.RPC("labelRPC", PhotonTargets.AllBuffered, new object[] { titan3.currentHealth, titan3.maxHealth });
                return;
            }

            case 4:
            {
                TITAN titan4 = this.parameters[0].returnTitan(null);
                if (titan4.photonView.isMine)
                {
                    titan4.moveTo(this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null));
                    return;
                }
                titan4.photonView.RPC("moveToRPC", titan4.photonView.owner, new object[] { this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null) });
                return;
            }
            }
            return;

        case 9:
            switch (this.actionType)
            {
            case 0:
                FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { this.parameters[0].returnString(null), string.Empty });
                return;

            case 1:
                FengGameManagerMKII.instance.gameWin2();
                if (this.parameters[0].returnBool(null))
                {
                    FengGameManagerMKII.intVariables.Clear();
                    FengGameManagerMKII.boolVariables.Clear();
                    FengGameManagerMKII.stringVariables.Clear();
                    FengGameManagerMKII.floatVariables.Clear();
                    FengGameManagerMKII.playerVariables.Clear();
                    FengGameManagerMKII.titanVariables.Clear();
                }
                return;

            case 2:
                FengGameManagerMKII.instance.gameLose2();
                if (this.parameters[0].returnBool(null))
                {
                    FengGameManagerMKII.intVariables.Clear();
                    FengGameManagerMKII.boolVariables.Clear();
                    FengGameManagerMKII.stringVariables.Clear();
                    FengGameManagerMKII.floatVariables.Clear();
                    FengGameManagerMKII.playerVariables.Clear();
                    FengGameManagerMKII.titanVariables.Clear();
                }
                return;

            case 3:
                if (this.parameters[0].returnBool(null))
                {
                    FengGameManagerMKII.intVariables.Clear();
                    FengGameManagerMKII.boolVariables.Clear();
                    FengGameManagerMKII.stringVariables.Clear();
                    FengGameManagerMKII.floatVariables.Clear();
                    FengGameManagerMKII.playerVariables.Clear();
                    FengGameManagerMKII.titanVariables.Clear();
                }
                FengGameManagerMKII.instance.restartGame2(false);
                return;
            }
            return;

        default:
            return;
        }
    }
Beispiel #13
0
    private void commandSwitch(string[] args)
    {
        switch (args[0])
        {
        case "pos":
            FengGameManagerMKII.ShowPos();
            break;

        case "ban":
        {
            int num8 = Convert.ToInt32(args[1]);
            if (num8 == PhotonNetwork.player.ID)
            {
                this.AddLine("Error:can't kick yourself.");
            }
            else if (!(FengGameManagerMKII.OnPrivateServer || PhotonNetwork.isMasterClient))
            {
                FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { "/kick #" + Convert.ToString(num8), LoginFengKAI.player.name });
            }
            else
            {
                foreach (PhotonPlayer player3 in PhotonNetwork.playerList)
                {
                    if (num8 == player3.ID)
                    {
                        if (FengGameManagerMKII.OnPrivateServer)
                        {
                            FengGameManagerMKII.instance.kickPlayerRC(player3, true, "");
                        }
                        else if (PhotonNetwork.isMasterClient)
                        {
                            FengGameManagerMKII.instance.kickPlayerRC(player3, true, "");
                            FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine(RCextensions.returnStringFromObject(player3.customProperties[PhotonPlayerProperty.name]) + " has been banned from the server!"), string.Empty });
                        }
                    }
                }
                if (PhotonPlayer.Find(num8) == null)
                {
                    this.AddLine("error:no such player.");
                }
            }
        }
            return;

        case "cloth":
            AddLine(ClothFactory.GetDebugInfo());
            return;

        case "aso":
            if (!PhotonNetwork.isMasterClient)
            {
                AddLineRC("Error: not masterclient");
                return;
            }
            switch (args[1])
            {
            case "kdr":
                RCSettings.asoPreservekdr = RCSettings.asoPreservekdr == 0 ? 1 : 0;
                AddLineRC("KDRs will " + (RCSettings.asoPreservekdr == 1 ? " " : "not ") + "be preserved from disconnects.");
                break;

            case "racing":
                RCSettings.racingStatic = RCSettings.racingStatic == 0 ? 1 : 0;
                AddLineRC("Racing will " + (RCSettings.asoPreservekdr == 1 ? " " : "not ") + "end on finish.");
                break;
            }
            return;

        case "pause":
        case "unpause":
            if (!PhotonNetwork.isMasterClient)
            {
                AddLineRC("Error: not masterclient");
                return;
            }
            FengGameManagerMKII.instance.SetPause();
            return;

        case "checklevel":
            foreach (PhotonPlayer player in PhotonNetwork.playerList)
            {
                AddLine(RCextensions.returnStringFromObject(player.customProperties[PhotonPlayerProperty.currentLevel]));
            }
            return;

        case "isrc":
            AddLineRC((FengGameManagerMKII.masterRC ? "is" : "not") + " RC");
            return;

        case "ignorelist":
            foreach (int id in FengGameManagerMKII.ignoreList)
            {
                AddLine(id.ToString());
            }
            return;

        case "room":
            if (!PhotonNetwork.isMasterClient)
            {
                AddLineRC("Error: not masterclient");
                return;
            }
            int roomValue = Convert.ToInt32(args[2]);
            switch (args[1])
            {
            case "max":
                PhotonNetwork.room.maxPlayers = roomValue;
                FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine("Max players changed to " + roomValue + "!"), "" });
                break;

            case "time":
                FengGameManagerMKII.instance.addTime(roomValue);
                FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine(roomValue + " seconds added to the clock."), "" });
                break;
            }
            return;

        case "resetkd":
            PhotonNetwork.player.SetCustomProperties(new Hashtable()
            {
                { "kills", 0 }, { "deaths", 0 }, { "max_dmg", 0 }, { "total_dmg", 0 }
            });
            AddLineRC("Your stats have been reset.");
            return;

        case "resetkdall":
        {
            if (!PhotonNetwork.isMasterClient)
            {
                AddLine("Error: not masterclient");
                return;
            }
            Hashtable hash = new Hashtable()
            {
                { "kills", 0 }, { "deaths", 0 }, { "max_dmg", 0 }, { "total_dmg", 0 }
            };
            foreach (PhotonPlayer player in PhotonNetwork.playerList)
            {
                player.SetCustomProperties(hash);
            }
            FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine("All stats have been reset"), "" });
        }
            return;

        case "revive":
        {
            PhotonPlayer player = PhotonPlayer.Find(Convert.ToInt32(args[1]));
            FengGameManagerMKII.instance.photonView.RPC("respawnHeroInNewRound", player, new object[0]);
            AddLineRC("Player [" + player.ID + "] has been revived");
        }
            return;

        case "reviveall":
            FengGameManagerMKII.instance.photonView.RPC("respawnHeroInNewRound", PhotonTargets.All, new object[0]);
            FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine("All player have been revived"), "" });
            return;

        case "pm":
        {
            PhotonPlayer player = PhotonPlayer.Find(Convert.ToInt32(args[1]));
            string       msg    = "";
            for (int i = 2; i < args.Length; i++)
            {
                msg += args[i] + (i == args.Length - 1 ? "" : " ");
            }
            string myName   = RCextensions.returnStringFromObject(PhotonNetwork.player.customProperties["name"]).hexColor();
            string sendName = "";
            switch (RCextensions.returnIntFromObject(PhotonNetwork.player.customProperties["RCteam"]))
            {
            case 1:
                sendName = "<color=cyan>" + myName + "</color>";
                break;

            case 2:
                sendName = "<color=magenta>" + myName + "</color>";
                break;

            default:
                sendName = myName;
                break;
            }
            FengGameManagerMKII.instance.photonView.RPC("ChatPM", player, new object[] { sendName, msg });
            AddLine(RCLine("Sent PM [" + player.ID + "] " + msg));
        }
            return;

        case "team":
            if (RCSettings.teamMode != 1)
            {
                AddLineRC("Error: teams are locked or disabled");
                return;
            }
            int    teamValue   = 0;
            string newTeamName = "Individuals";
            switch (args[1])
            {
            case "0":
            case "individual":
                break;

            case "1":
            case "cyan":
                teamValue   = 1;
                newTeamName = "Cyan";
                break;

            case "2":
            case "magenta":
                teamValue   = 2;
                newTeamName = "Magenta";
                break;

            default:
                AddLineRC("Error: invalid team code/name.(use 0, 1, 2)");
                return;
            }
            FengGameManagerMKII.instance.photonView.RPC("setTeamRPC", PhotonNetwork.player, new object[] { teamValue });
            AddLineRC("You have joined to team " + newTeamName);
            foreach (object obj in FengGameManagerMKII.instance.getPlayers())
            {
                HERO her = (HERO)obj;
                if (her.photonView.isMine)
                {
                    her.markDie();
                    her.photonView.RPC("netDie2", PhotonTargets.All, new object[] { -1, "Team Switch" });
                    break;
                }
            }
            return;

        case "kick":
        {
            int num8 = Convert.ToInt32(args[1]);
            if (num8 == PhotonNetwork.player.ID)
            {
                this.AddLine("error:can't kick yourself.");
            }
            else if (!(FengGameManagerMKII.OnPrivateServer || PhotonNetwork.isMasterClient))
            {
                FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { "/kick #" + Convert.ToString(num8), LoginFengKAI.player.name });
            }
            else
            {
                foreach (PhotonPlayer player3 in PhotonNetwork.playerList)
                {
                    if (num8 == player3.ID)
                    {
                        if (FengGameManagerMKII.OnPrivateServer)
                        {
                            FengGameManagerMKII.instance.kickPlayerRC(player3, false, "");
                        }
                        else if (PhotonNetwork.isMasterClient)
                        {
                            FengGameManagerMKII.instance.kickPlayerRC(player3, false, "");
                            FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine(RCextensions.returnStringFromObject(player3.customProperties[PhotonPlayerProperty.name]) + " has been kicked from the server!"), string.Empty });
                        }
                    }
                }
                if (PhotonPlayer.Find(num8) == null)
                {
                    this.AddLine("error:no such player.");
                }
            }
        }
            return;

        case "restart":
            if (!PhotonNetwork.isMasterClient)
            {
                AddLineRC("Error: not masterclient");
                return;
            }
            FengGameManagerMKII.instance.restartGame(false);
            FengGameManagerMKII.instance.photonView.RPC("Chat", PhotonTargets.All, new object[] { RCLine("MasterClient has restarted the game."), "" });
            return;

        case "specmode":
            if (((int)FengGameManagerMKII.settings[0xf5]) == 0)
            {
                FengGameManagerMKII.settings[0xf5] = 1;
                FengGameManagerMKII.instance.EnterSpecMode(true);
                AddLineRC("You have entered spectator mode.");
            }
            else
            {
                FengGameManagerMKII.settings[0xf5] = 0;
                FengGameManagerMKII.instance.EnterSpecMode(false);
                AddLineRC("You have exited spectator mode.");
            }
            return;

        case "fov":
            int num6 = Convert.ToInt32(args[1]);
            Camera.main.fieldOfView = num6;
            AddLineRC("Field of vision set to " + num6.ToString() + ".");
            return;

        case "colliders":
            int num7 = 0;
            foreach (TITAN titan in FengGameManagerMKII.instance.getTitans())
            {
                if (titan.myTitanTrigger.isCollide)
                {
                    num7++;
                }
            }
            AddLine(num7.ToString());
            return;

        case "spectate":
        {
            int num8 = Convert.ToInt32(args[1]);
            foreach (GameObject obj5 in GameObject.FindGameObjectsWithTag("Player"))
            {
                if (obj5.GetPhotonView().owner.ID == num8)
                {
                    Camera.main.GetComponent <IN_GAME_MAIN_CAMERA>().setMainObject(obj5, true, false);
                    Camera.main.GetComponent <IN_GAME_MAIN_CAMERA>().setSpectorMode(false);
                }
            }
        }
            return;

        case "rules":
        {
            AddLineRC("Currently activated gamemodes:");
            if (RCSettings.bombMode > 0)
            {
                AddLineRC("Bomb mode is on.");
            }
            if (RCSettings.teamMode > 0)
            {
                if (RCSettings.teamMode == 1)
                {
                    AddLineRC("Team mode is on (no sort).");
                }
                else if (RCSettings.teamMode == 2)
                {
                    AddLineRC("Team mode is on (sort by size).");
                }
                else if (RCSettings.teamMode == 3)
                {
                    AddLineRC("Team mode is on (sort by skill).");
                }
            }
            if (RCSettings.pointMode > 0)
            {
                AddLineRC("Point mode is on (" + Convert.ToString(RCSettings.pointMode) + ").");
            }
            if (RCSettings.disableRock > 0)
            {
                AddLineRC("Punk Rock-Throwing is disabled.");
            }
            if (RCSettings.spawnMode > 0)
            {
                AddLineRC("Custom spawn rate is on (" + RCSettings.nRate.ToString("F2") + "% Normal, " + RCSettings.aRate.ToString("F2") + "% Abnormal, " + RCSettings.jRate.ToString("F2") + "% Jumper, " + RCSettings.cRate.ToString("F2") + "% Crawler, " + RCSettings.pRate.ToString("F2") + "% Punk");
            }
            if (RCSettings.explodeMode > 0)
            {
                AddLineRC("Titan explode mode is on (" + Convert.ToString(RCSettings.explodeMode) + ").");
            }
            if (RCSettings.healthMode > 0)
            {
                AddLineRC("Titan health mode is on (" + Convert.ToString(RCSettings.healthLower) + "-" + Convert.ToString(RCSettings.healthUpper) + ").");
            }
            if (RCSettings.infectionMode > 0)
            {
                AddLineRC("Infection mode is on (" + Convert.ToString(RCSettings.infectionMode) + ").");
            }
            if (RCSettings.damageMode > 0)
            {
                AddLineRC("Minimum nape damage is on (" + Convert.ToString(RCSettings.damageMode) + ").");
            }
            if (RCSettings.moreTitans > 0)
            {
                AddLineRC("Custom titan # is on (" + Convert.ToString(RCSettings.moreTitans) + ").");
            }
            if (RCSettings.sizeMode > 0)
            {
                AddLineRC("Custom titan size is on (" + RCSettings.sizeLower.ToString("F2") + "," + RCSettings.sizeUpper.ToString("F2") + ").");
            }
            if (RCSettings.banEren > 0)
            {
                AddLineRC("Anti-Eren is on. Using Titan eren will get you kicked.");
            }
            if (RCSettings.waveModeOn == 1)
            {
                AddLineRC("Custom wave mode is on (" + Convert.ToString(RCSettings.waveModeNum) + ").");
            }
            if (RCSettings.friendlyMode > 0)
            {
                AddLineRC("Friendly-Fire disabled. PVP is prohibited.");
            }
            if (RCSettings.pvpMode > 0)
            {
                if (RCSettings.pvpMode == 1)
                {
                    AddLineRC("AHSS/Blade PVP is on (team-based).");
                }
                else if (RCSettings.pvpMode == 2)
                {
                    AddLineRC("AHSS/Blade PVP is on (FFA).");
                }
            }
            if (RCSettings.maxWave > 0)
            {
                AddLineRC("Max Wave set to " + RCSettings.maxWave.ToString());
            }
            if (RCSettings.horseMode > 0)
            {
                AddLineRC("Horses are enabled.");
            }
            if (RCSettings.ahssReload > 0)
            {
                AddLineRC("AHSS Air-Reload disabled.");
            }
            if (RCSettings.punkWaves > 0)
            {
                AddLineRC("Punk override every 5 waves enabled.");
            }
            if (RCSettings.endlessMode > 0)
            {
                AddLineRC("Endless Respawn is enabled (" + RCSettings.endlessMode.ToString() + " seconds).");
            }
            if (RCSettings.globalDisableMinimap > 0)
            {
                AddLineRC("Minimap are disabled.");
            }
            if (RCSettings.motd != string.Empty)
            {
                AddLineRC("MOTD:" + RCSettings.motd);
            }
            if (RCSettings.deadlyCannons > 0)
            {
                AddLineRC("Cannons will kill humans.");
            }
        }
            return;

        default:
            return;
        }
    }
Beispiel #14
0
    public void doAction()
    {
        switch (this.actionClass)
        {
        case 0:
            this.nextEvent.checkEvent();
            return;

        case 1:
        {
            string key  = this.parameters[0].returnString(null);
            int    num2 = this.parameters[1].returnInt(null);
            switch (this.actionType)
            {
            case 0:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    RCManager.intVariables.Add(key, num2);
                    return;
                }
                RCManager.intVariables[key] = num2;
                return;

            case 1:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                RCManager.intVariables[key] = (int)RCManager.intVariables[key] + num2;
                return;

            case 2:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                RCManager.intVariables[key] = (int)RCManager.intVariables[key] - num2;
                return;

            case 3:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                RCManager.intVariables[key] = (int)RCManager.intVariables[key] * num2;
                return;

            case 4:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                RCManager.intVariables[key] = (int)RCManager.intVariables[key] / num2;
                return;

            case 5:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                RCManager.intVariables[key] = (int)RCManager.intVariables[key] % num2;
                return;

            case 6:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    this.callException("Variable not found: " + key);
                    return;
                }
                RCManager.intVariables[key] = (int)Math.Pow((double)((int)RCManager.intVariables[key]), (double)num2);
                return;

            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
                break;

            case 12:
                if (!RCManager.intVariables.ContainsKey(key))
                {
                    RCManager.intVariables.Add(key, UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null)));
                    return;
                }
                RCManager.intVariables[key] = UnityEngine.Random.Range(num2, this.parameters[2].returnInt(null));
                return;

            default:
                return;
            }
            break;
        }

        case 2:
        {
            string str2  = this.parameters[0].returnString(null);
            bool   flag2 = this.parameters[1].returnBool(null);
            int    num3  = this.actionType;
            if (num3 != 0)
            {
                if (num3 != 11)
                {
                    if (num3 != 12)
                    {
                        return;
                    }
                    if (!RCManager.boolVariables.ContainsKey(str2))
                    {
                        RCManager.boolVariables.Add(str2, Convert.ToBoolean(UnityEngine.Random.Range(0, 2)));
                        return;
                    }
                    RCManager.boolVariables[str2] = Convert.ToBoolean(UnityEngine.Random.Range(0, 2));
                    return;
                }
                else
                {
                    if (!RCManager.boolVariables.ContainsKey(str2))
                    {
                        this.callException("Variable not found: " + str2);
                        return;
                    }
                    RCManager.boolVariables[str2] = !(bool)RCManager.boolVariables[str2];
                    return;
                }
            }
            else
            {
                if (!RCManager.boolVariables.ContainsKey(str2))
                {
                    RCManager.boolVariables.Add(str2, flag2);
                    return;
                }
                RCManager.boolVariables[str2] = flag2;
                return;
            }
        }

        case 3:
        {
            string str3 = this.parameters[0].returnString(null);
            int    num4 = this.actionType;
            if (num4 != 0)
            {
                switch (num4)
                {
                case 7:
                {
                    string str4 = string.Empty;
                    for (int i = 1; i < this.parameters.Length; i++)
                    {
                        str4 += this.parameters[i].returnString(null);
                    }
                    if (!RCManager.stringVariables.ContainsKey(str3))
                    {
                        RCManager.stringVariables.Add(str3, str4);
                        return;
                    }
                    RCManager.stringVariables[str3] = str4;
                    return;
                }

                case 8:
                {
                    string str5 = this.parameters[1].returnString(null);
                    if (!RCManager.stringVariables.ContainsKey(str3))
                    {
                        this.callException("No Variable");
                        return;
                    }
                    RCManager.stringVariables[str3] = (string)RCManager.stringVariables[str3] + str5;
                    return;
                }

                case 9:
                    this.parameters[1].returnString(null);
                    if (!RCManager.stringVariables.ContainsKey(str3))
                    {
                        this.callException("No Variable");
                        return;
                    }
                    RCManager.stringVariables[str3] = ((string)RCManager.stringVariables[str3]).Replace(this.parameters[1].returnString(null), this.parameters[2].returnString(null));
                    return;

                default:
                    return;
                }
            }
            else
            {
                string str6 = this.parameters[1].returnString(null);
                if (!RCManager.stringVariables.ContainsKey(str3))
                {
                    RCManager.stringVariables.Add(str3, str6);
                    return;
                }
                RCManager.stringVariables[str3] = str6;
                return;
            }
        }

        case 4:
        {
            string str7 = this.parameters[0].returnString(null);
            float  num5 = this.parameters[1].returnFloat(null);
            switch (this.actionType)
            {
            case 0:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    RCManager.floatVariables.Add(str7, num5);
                    return;
                }
                RCManager.floatVariables[str7] = num5;
                return;

            case 1:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] + num5;
                return;

            case 2:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] - num5;
                return;

            case 3:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] * num5;
                return;

            case 4:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] / num5;
                return;

            case 5:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                RCManager.floatVariables[str7] = (float)RCManager.floatVariables[str7] % num5;
                return;

            case 6:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    this.callException("No Variable");
                    return;
                }
                RCManager.floatVariables[str7] = (float)Math.Pow((double)((int)RCManager.floatVariables[str7]), (double)num5);
                return;

            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
                break;

            case 12:
                if (!RCManager.floatVariables.ContainsKey(str7))
                {
                    RCManager.floatVariables.Add(str7, UnityEngine.Random.Range(num5, this.parameters[2].returnFloat(null)));
                    return;
                }
                RCManager.floatVariables[str7] = UnityEngine.Random.Range(num5, this.parameters[2].returnFloat(null));
                return;

            default:
                return;
            }
            break;
        }

        case 5:
        {
            string       str8   = this.parameters[0].returnString(null);
            PhotonPlayer player = this.parameters[1].returnPlayer(null);
            if (this.actionType == 0)
            {
                if (!RCManager.playerVariables.ContainsKey(str8))
                {
                    RCManager.playerVariables.Add(str8, player);
                    return;
                }
                RCManager.playerVariables[str8] = player;
                return;
            }
            break;
        }

        case 6:
        {
            string str9  = this.parameters[0].returnString(null);
            TITAN  titan = this.parameters[1].returnTitan(null);
            if (this.actionType == 0)
            {
                if (!RCManager.titanVariables.ContainsKey(str9))
                {
                    RCManager.titanVariables.Add(str9, titan);
                    return;
                }
                RCManager.titanVariables[str9] = titan;
                return;
            }
            break;
        }

        case 7:
        {
            PhotonPlayer targetPlayer = this.parameters[0].returnPlayer(null);
            switch (this.actionType)
            {
            case 0:
            {
                int iD = targetPlayer.ID;
                if (RCManager.heroHash.ContainsKey(iD))
                {
                    HERO hero = (HERO)RCManager.heroHash[iD];
                    hero.markDie();
                    hero.BasePV.RPC("netDie2", PhotonTargets.All, new object[]
                            {
                                -1,
                                this.parameters[1].returnString(null) + " "
                            });
                    return;
                }
                this.callException("Player Not Alive");
                return;
            }

            case 1:
                FengGameManagerMKII.FGM.BasePV.RPC("respawnHeroInNewRound", targetPlayer, new object[0]);
                return;

            case 2:
                FengGameManagerMKII.FGM.BasePV.RPC("spawnPlayerAtRPC", targetPlayer, new object[]
                    {
                        this.parameters[1].returnFloat(null),
                        this.parameters[2].returnFloat(null),
                        this.parameters[3].returnFloat(null)
                    });
                return;

            case 3:
            {
                int num6 = targetPlayer.ID;
                if (RCManager.heroHash.ContainsKey(num6))
                {
                    ((HERO)RCManager.heroHash[num6]).BasePV.RPC("moveToRPC", targetPlayer, new object[]
                            {
                                this.parameters[1].returnFloat(null),
                                this.parameters[2].returnFloat(null),
                                this.parameters[3].returnFloat(null)
                            });
                    return;
                }
                this.callException("Player Not Alive");
                return;
            }

            case 4:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "kills",
                            this.parameters[1].returnInt(null)
                        }
                    });
                return;

            case 5:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "deaths",
                            this.parameters[1].returnInt(null)
                        }
                    });
                return;

            case 6:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "max_dmg",
                            this.parameters[1].returnInt(null)
                        }
                    });
                return;

            case 7:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "total_dmg",
                            this.parameters[1].returnInt(null)
                        }
                    });
                return;

            case 8:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "name",
                            this.parameters[1].returnString(null)
                        }
                    });
                return;

            case 9:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "guildName",
                            this.parameters[1].returnString(null)
                        }
                    });
                return;

            case 10:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "RCteam",
                            this.parameters[1].returnInt(null)
                        }
                    });
                return;

            case 11:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "customInt",
                            this.parameters[1].returnInt(null)
                        }
                    });
                return;

            case 12:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "customBool",
                            this.parameters[1].returnBool(null)
                        }
                    });
                return;

            case 13:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "customString",
                            this.parameters[1].returnString(null)
                        }
                    });
                return;

            case 14:
                targetPlayer.SetCustomProperties(new Hashtable
                    {
                        {
                            "RCteam",
                            this.parameters[1].returnFloat(null)
                        }
                    });
                return;

            default:
                return;
            }
        }

        case 8:
            switch (this.actionType)
            {
            case 0:
            {
                TITAN    titan2     = this.parameters[0].returnTitan(null);
                object[] parameters = new object[]
                {
                    this.parameters[1].returnPlayer(null).ID,
                    this.parameters[2].returnInt(null)
                };
                titan2.BasePV.RPC("titanGetHit", titan2.BasePV.owner, parameters);
                return;
            }

            case 1:
                FengGameManagerMKII.FGM.SpawnTitanAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null));
                return;

            case 2:
                FengGameManagerMKII.FGM.SpawnTitanAtAction(this.parameters[0].returnInt(null), this.parameters[1].returnFloat(null), this.parameters[2].returnInt(null), this.parameters[3].returnInt(null), this.parameters[4].returnFloat(null), this.parameters[5].returnFloat(null), this.parameters[6].returnFloat(null));
                return;

            case 3:
            {
                TITAN titan3 = this.parameters[0].returnTitan(null);
                int   num7   = this.parameters[1].returnInt(null);
                titan3.currentHealth = num7;
                if (titan3.maxHealth == 0)
                {
                    titan3.maxHealth = titan3.currentHealth;
                }
                titan3.BasePV.RPC("labelRPC", PhotonTargets.AllBuffered, new object[]
                    {
                        titan3.currentHealth,
                        titan3.maxHealth
                    });
                return;
            }

            case 4:
            {
                TITAN titan4 = this.parameters[0].returnTitan(null);
                if (titan4.BasePV.IsMine)
                {
                    titan4.moveTo(this.parameters[1].returnFloat(null), this.parameters[2].returnFloat(null), this.parameters[3].returnFloat(null));
                    return;
                }
                titan4.BasePV.RPC("moveToRPC", titan4.BasePV.owner, new object[]
                    {
                        this.parameters[1].returnFloat(null),
                        this.parameters[2].returnFloat(null),
                        this.parameters[3].returnFloat(null)
                    });
                return;
            }

            default:
                return;
            }

        case 9:
            switch (this.actionType)
            {
            case 0:
                FengGameManagerMKII.FGM.BasePV.RPC("Chat", PhotonTargets.All, new object[]
                {
                    this.parameters[0].returnString(null),
                    string.Empty
                });
                return;

            case 1:
                FengGameManagerMKII.FGM.GameWin();
                if (this.parameters[0].returnBool(null))
                {
                    RCManager.intVariables.Clear();
                    RCManager.boolVariables.Clear();
                    RCManager.stringVariables.Clear();
                    RCManager.floatVariables.Clear();
                    RCManager.playerVariables.Clear();
                    RCManager.titanVariables.Clear();
                }
                return;

            case 2:
                FengGameManagerMKII.FGM.GameLose();
                if (this.parameters[0].returnBool(null))
                {
                    RCManager.intVariables.Clear();
                    RCManager.boolVariables.Clear();
                    RCManager.stringVariables.Clear();
                    RCManager.floatVariables.Clear();
                    RCManager.playerVariables.Clear();
                    RCManager.titanVariables.Clear();
                }
                return;

            case 3:
                if (this.parameters[0].returnBool(null))
                {
                    RCManager.intVariables.Clear();
                    RCManager.boolVariables.Clear();
                    RCManager.stringVariables.Clear();
                    RCManager.floatVariables.Clear();
                    RCManager.playerVariables.Clear();
                    RCManager.titanVariables.Clear();
                }
                FengGameManagerMKII.FGM.RestartGame(false, false);
                return;

            default:
                return;
            }

        default:
            return;
        }
    }