Esempio n. 1
0
    public bool CheckCondition()
    {
        switch (type)
        {
        case 0:
            return(IntCompare(parameter1.returnInt(null), parameter2.returnInt(null)));

        case 1:
            return(BoolCompare(parameter1.returnBool(null), parameter2.returnBool(null)));

        case 2:
            return(StringCompare(parameter1.returnString(null), parameter2.returnString(null)));

        case 3:
            return(FloatCompare(parameter1.returnFloat(null), parameter2.returnFloat(null)));

        case 4:
            return(PlayerCompare(parameter1.returnPlayer(null), parameter2.returnPlayer(null)));

        case 5:
            return(TitanCompare(parameter1.returnTitan(null), parameter2.returnTitan(null)));

        default:
            return(false);
        }
    }
Esempio n. 2
0
    public bool checkCondition()
    {
        switch (type)
        {
        case 0:
            return(intCompare(parameter1.returnInt(null), parameter2.returnInt(null)));

        case 1:
            return(boolCompare(parameter1.returnBool(null), parameter2.returnBool(null)));

        case 2:
            return(stringCompare(parameter1.returnString(null), parameter2.returnString(null)));

        case 3:
            return(floatCompare(parameter1.returnFloat(null), parameter2.returnFloat(null)));

        case 4:
            return(playerCompare(parameter1.returnPlayer(null), parameter2.returnPlayer(null)));

        case 5:
            return(titanCompare(parameter1.returnTitan(null), parameter2.returnTitan(null)));
        }

        return(false);
    }
Esempio n. 3
0
    public TITAN returnTitan(object objParameter)
    {
        object parameters = objParameter;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        int num = this.helperClass;

        if (num == 1)
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            return((TITAN)RCManager.titanVariables[helper.returnString(null)]);
        }
        return((TITAN)parameters);
    }
Esempio n. 4
0
    public PhotonPlayer returnPlayer(object objParameter)
    {
        object parameters = objParameter;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        int num = this.helperClass;

        if (num == 1)
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            return((PhotonPlayer)RCManager.playerVariables[helper.returnString(null)]);
        }
        return((PhotonPlayer)parameters);
    }
Esempio n. 5
0
    public TITAN returnTitan(object objParameter)
    {
        object parameters = objParameter;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        switch (this.helperClass)
        {
        case 1:
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            return((TITAN)FengGameManagerMKII.titanVariables[helper.returnString(null)]);
        }

        case 3:
            return((TITAN)parameters);
        }
        return((TITAN)parameters);
    }
Esempio n. 6
0
    public PhotonPlayer returnPlayer(object objParameter)
    {
        object parameters = objParameter;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        switch (this.helperClass)
        {
        case 1:
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            return((PhotonPlayer)FengGameManagerMKII.playerVariables[helper.returnString(null)]);
        }

        case 2:
            return((PhotonPlayer)parameters);
        }
        return((PhotonPlayer)parameters);
    }
Esempio n. 7
0
    public TITAN returnTitan(object objParameter)
    {
        object obj = objParameter;

        if (parameters != null)
        {
            obj = parameters;
        }
        switch (helperClass)
        {
        case 1:
        {
            RCActionHelper rCActionHelper = (RCActionHelper)obj;
            return((TITAN)FengGameManagerMKII.TitanVariables[rCActionHelper.returnString(null)]);
        }

        case 3:
            return((TITAN)obj);

        default:
            return((TITAN)obj);
        }
    }
Esempio n. 8
0
    public PhotonPlayer returnPlayer(object objParameter)
    {
        object obj = objParameter;

        if (parameters != null)
        {
            obj = parameters;
        }
        switch (helperClass)
        {
        case 1:
        {
            RCActionHelper rCActionHelper = (RCActionHelper)obj;
            return((PhotonPlayer)FengGameManagerMKII.PlayerVariables[rCActionHelper.returnString(null)]);
        }

        case 2:
            return((PhotonPlayer)obj);

        default:
            return((PhotonPlayer)obj);
        }
    }
Esempio n. 9
0
    public string returnString(object sentObject)
    {
        var parameters = sentObject;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }

        switch (helperClass)
        {
        case 0:
            return((string)parameters);

        case 1:
        {
            var helper = (RCActionHelper)parameters;
            switch (helperType)
            {
            case 0:
                return(nextHelper.returnString(FengGameManagerMKII.intVariables[helper.returnString(null)]));

            case 1:
                return(nextHelper.returnString(FengGameManagerMKII.boolVariables[helper.returnString(null)]));

            case 2:
                return((string)FengGameManagerMKII.stringVariables[helper.returnString(null)]);

            case 3:
                return(nextHelper.returnString(FengGameManagerMKII.floatVariables[helper.returnString(null)]));

            case 4:
                return(nextHelper.returnString(FengGameManagerMKII.playerVariables[helper.returnString(null)]));

            case 5:
                return(nextHelper.returnString(FengGameManagerMKII.titanVariables[helper.returnString(null)]));
            }

            return(string.Empty);
        }

        case 2:
        {
            var player = (PhotonPlayer)parameters;
            if (player != null)
            {
                HERO hero;
                switch (helperType)
                {
                case 0:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.team]));

                case 1:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.RCteam]));

                case 2:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.dead]));

                case 3:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.isTitan]));

                case 4:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.kills]));

                case 5:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.deaths]));

                case 6:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.max_dmg]));

                case 7:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.total_dmg]));

                case 8:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.customInt]));

                case 9:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.customBool]));

                case 10:
                    return((string)player.customProperties[PhotonPlayerProperty.customString]);

                case 11:
                    return(nextHelper.returnString(player.customProperties[PhotonPlayerProperty.customFloat]));

                case 12:
                    return((string)player.customProperties[PhotonPlayerProperty.name]);

                case 13:
                    return((string)player.customProperties[PhotonPlayerProperty.guildName]);

                case 14:
                {
                    var iD = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(iD))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[iD];
                        return(nextHelper.returnString(hero.transform.position.x));
                    }

                    return(string.Empty);
                }

                case 15:
                {
                    var key = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(key))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[key];
                        return(nextHelper.returnString(hero.transform.position.y));
                    }

                    return(string.Empty);
                }

                case 16:
                {
                    var num6 = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(num6))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[num6];
                        return(nextHelper.returnString(hero.transform.position.z));
                    }

                    return(string.Empty);
                }

                case 17:
                {
                    var num7 = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(num7))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[num7];
                        return(nextHelper.returnString(hero.rigidbody.velocity.magnitude));
                    }

                    return(string.Empty);
                }
                }
            }

            return(string.Empty);
        }

        case 3:
        {
            var titan = (TITAN)parameters;
            if (titan != null)
            {
                switch (helperType)
                {
                case 0:
                    return(nextHelper.returnString(titan.abnormalType));

                case 1:
                    return(nextHelper.returnString(titan.myLevel));

                case 2:
                    return(nextHelper.returnString(titan.currentHealth));

                case 3:
                    return(nextHelper.returnString(titan.transform.position.x));

                case 4:
                    return(nextHelper.returnString(titan.transform.position.y));

                case 5:
                    return(nextHelper.returnString(titan.transform.position.z));
                }
            }

            return(string.Empty);
        }

        case 4:
        {
            var helper2 = (RCActionHelper)parameters;
            var region  = (RCRegion)FengGameManagerMKII.RCRegions[helper2.returnString(null)];
            switch (helperType)
            {
            case 0:
                return(nextHelper.returnString(region.GetRandomX()));

            case 1:
                return(nextHelper.returnString(region.GetRandomY()));

            case 2:
                return(nextHelper.returnString(region.GetRandomZ()));
            }

            return(string.Empty);
        }

        case 5:
            switch (helperType)
            {
            case 0:
            {
                var num2 = (int)parameters;
                return(num2.ToString());
            }

            case 1:
            {
                var flag2 = (bool)parameters;
                return(flag2.ToString());
            }

            case 2:
                return((string)parameters);

            case 3:
            {
                var num3 = (float)parameters;
                return(num3.ToString());
            }
            }

            return(string.Empty);
        }

        return(string.Empty);
    }
Esempio n. 10
0
    public int returnInt(object sentObject)
    {
        object parameters = sentObject;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        switch (this.helperClass)
        {
        case 0:
            return((int)parameters);

        case 1:
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            switch (this.helperType)
            {
            case 0:
                return((int)FengGameManagerMKII.intVariables[helper.returnString(null)]);

            case 1:
                return(this.nextHelper.returnInt(FengGameManagerMKII.boolVariables[helper.returnString(null)]));

            case 2:
                return(this.nextHelper.returnInt(FengGameManagerMKII.stringVariables[helper.returnString(null)]));

            case 3:
                return(this.nextHelper.returnInt(FengGameManagerMKII.floatVariables[helper.returnString(null)]));

            case 4:
                return(this.nextHelper.returnInt(FengGameManagerMKII.playerVariables[helper.returnString(null)]));

            case 5:
                return(this.nextHelper.returnInt(FengGameManagerMKII.titanVariables[helper.returnString(null)]));
            }
            return(0);
        }

        case 2:
        {
            PhotonPlayer player = (PhotonPlayer)parameters;
            if (player != null)
            {
                Hero hero;
                switch (this.helperType)
                {
                case 0:
                    return((int)player.CustomProperties[PhotonPlayerProperty.team]);

                case 1:
                    return((int)player.CustomProperties[PhotonPlayerProperty.RCteam]);

                case 2:
                    return(this.nextHelper.returnInt(player.CustomProperties[PhotonPlayerProperty.dead]));

                case 3:
                    return((int)player.CustomProperties[PhotonPlayerProperty.isTitan]);

                case 4:
                    return((int)player.CustomProperties[PhotonPlayerProperty.kills]);

                case 5:
                    return((int)player.CustomProperties[PhotonPlayerProperty.deaths]);

                case 6:
                    return((int)player.CustomProperties[PhotonPlayerProperty.max_dmg]);

                case 7:
                    return((int)player.CustomProperties[PhotonPlayerProperty.total_dmg]);

                case 8:
                    return((int)player.CustomProperties[PhotonPlayerProperty.customInt]);

                case 9:
                    return(this.nextHelper.returnInt(player.CustomProperties[PhotonPlayerProperty.customBool]));

                case 10:
                    return(this.nextHelper.returnInt(player.CustomProperties[PhotonPlayerProperty.customString]));

                case 11:
                    return(this.nextHelper.returnInt(player.CustomProperties[PhotonPlayerProperty.customFloat]));

                case 12:
                    return(this.nextHelper.returnInt(player.CustomProperties[PhotonPlayerProperty.name]));

                case 13:
                    return(this.nextHelper.returnInt(player.CustomProperties[PhotonPlayerProperty.guildName]));

                case 14:
                {
                    int iD = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(iD))
                    {
                        hero = (Hero)FengGameManagerMKII.heroHash[iD];
                        return(this.nextHelper.returnInt(hero.transform.position.x));
                    }
                    return(0);
                }

                case 15:
                {
                    int key = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(key))
                    {
                        hero = (Hero)FengGameManagerMKII.heroHash[key];
                        return(this.nextHelper.returnInt(hero.transform.position.y));
                    }
                    return(0);
                }

                case 0x10:
                {
                    int num7 = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(num7))
                    {
                        hero = (Hero)FengGameManagerMKII.heroHash[num7];
                        return(this.nextHelper.returnInt(hero.transform.position.z));
                    }
                    return(0);
                }

                case 0x11:
                {
                    int num8 = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(num8))
                    {
                        hero = (Hero)FengGameManagerMKII.heroHash[num8];
                        return(this.nextHelper.returnInt(hero.GetComponent <UnityEngine.Rigidbody>().velocity.magnitude));
                    }
                    return(0);
                }
                }
            }
            return(0);
        }

        case 3:
        {
            TITAN titan = (TITAN)parameters;
            if (titan != null)
            {
                switch (this.helperType)
                {
                case 0:
                    return((int)titan.TitanType);

                case 1:
                    return(this.nextHelper.returnInt(titan.myLevel));

                case 2:
                    return(titan.currentHealth);

                case 3:
                    return(this.nextHelper.returnInt(titan.transform.position.x));

                case 4:
                    return(this.nextHelper.returnInt(titan.transform.position.y));

                case 5:
                    return(this.nextHelper.returnInt(titan.transform.position.z));
                }
            }
            return(0);
        }

        case 4:
        {
            RCActionHelper helper2 = (RCActionHelper)parameters;
            RCRegion       region  = (RCRegion)FengGameManagerMKII.RCRegions[helper2.returnString(null)];
            switch (this.helperType)
            {
            case 0:
                return(this.nextHelper.returnInt(region.GetRandomX()));

            case 1:
                return(this.nextHelper.returnInt(region.GetRandomY()));

            case 2:
                return(this.nextHelper.returnInt(region.GetRandomZ()));
            }
            return(0);
        }

        case 5:
            switch (this.helperType)
            {
            case 0:
                return((int)parameters);

            case 1:
                return(Convert.ToInt32((bool)parameters));

            case 2:
                int num4;
                if (int.TryParse((string)parameters, out num4))
                {
                    return(num4);
                }
                return(0);

            case 3:
            {
                float num3 = (float)parameters;
                return(Convert.ToInt32(num3));
            }
            }
            return((int)parameters);
        }
        return(0);
    }
Esempio n. 11
0
    public string returnString(object sentObject)
    {
        object parameters = sentObject;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        switch (this.helperClass)
        {
        case 0:
            return((string)parameters);

        case 1:
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            switch (this.helperType)
            {
            case 0:
                return(this.nextHelper.returnString(FengGameManagerMKII.intVariables[helper.returnString(null)]));

            case 1:
                return(this.nextHelper.returnString(FengGameManagerMKII.boolVariables[helper.returnString(null)]));

            case 2:
                return((string)FengGameManagerMKII.stringVariables[helper.returnString(null)]);

            case 3:
                return(this.nextHelper.returnString(FengGameManagerMKII.floatVariables[helper.returnString(null)]));

            case 4:
                return(this.nextHelper.returnString(FengGameManagerMKII.playerVariables[helper.returnString(null)]));

            case 5:
                return(this.nextHelper.returnString(FengGameManagerMKII.titanVariables[helper.returnString(null)]));
            }
            return(string.Empty);
        }

        case 2:
        {
            PhotonPlayer player = (PhotonPlayer)parameters;
            if (player != null)
            {
                HERO hero;
                switch (this.helperType)
                {
                case 0:
                    return(this.nextHelper.returnString(player.team));

                case 1:
                    return(this.nextHelper.returnString(player.RCteam));

                case 2:
                    return(this.nextHelper.returnString(player.dead));

                case 3:
                    return(this.nextHelper.returnString(player.isTitan));

                case 4:
                    return(this.nextHelper.returnString(player.kills));

                case 5:
                    return(this.nextHelper.returnString(player.deaths));

                case 6:
                    return(this.nextHelper.returnString(player.max_dmg));

                case 7:
                    return(this.nextHelper.returnString(player.total_dmg));

                case 8:
                    return(this.nextHelper.returnString(player.customInt));

                case 9:
                    return(this.nextHelper.returnString(player.customBool));

                case 10:
                    return((string)player.customString);

                case 11:
                    return(this.nextHelper.returnString(player.customFloat));

                case 12:
                    return((string)player.name2);

                case 13:
                    return((string)player.guildName);

                case 14:
                {
                    int iD = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(iD))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[iD];
                        return(this.nextHelper.returnString(hero.transform.position.x));
                    }
                    return(string.Empty);
                }

                case 15:
                {
                    int key = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(key))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[key];
                        return(this.nextHelper.returnString(hero.transform.position.y));
                    }
                    return(string.Empty);
                }

                case 0x10:
                {
                    int num3 = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(num3))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[num3];
                        return(this.nextHelper.returnString(hero.transform.position.z));
                    }
                    return(string.Empty);
                }

                case 0x11:
                {
                    int num4 = player.ID;
                    if (FengGameManagerMKII.heroHash.ContainsKey(num4))
                    {
                        hero = (HERO)FengGameManagerMKII.heroHash[num4];
                        return(this.nextHelper.returnString(hero.rigidbody.velocity.magnitude));
                    }
                    return(string.Empty);
                }
                }
            }
            return(string.Empty);
        }

        case 3:
        {
            TITAN titan = (TITAN)parameters;
            if (titan != null)
            {
                switch (this.helperType)
                {
                case 0:
                    return(this.nextHelper.returnString(titan.abnormalType));

                case 1:
                    return(this.nextHelper.returnString(titan.myLevel));

                case 2:
                    return(this.nextHelper.returnString(titan.currentHealth));

                case 3:
                    return(this.nextHelper.returnString(titan.transform.position.x));

                case 4:
                    return(this.nextHelper.returnString(titan.transform.position.y));

                case 5:
                    return(this.nextHelper.returnString(titan.transform.position.z));
                }
            }
            return(string.Empty);
        }

        case 4:
        {
            RCActionHelper helper2 = (RCActionHelper)parameters;
            RCRegion       region  = (RCRegion)FengGameManagerMKII.RCRegions[helper2.returnString(null)];
            switch (this.helperType)
            {
            case 0:
                return(this.nextHelper.returnString(region.GetRandomX()));

            case 1:
                return(this.nextHelper.returnString(region.GetRandomY()));

            case 2:
                return(this.nextHelper.returnString(region.GetRandomZ()));
            }
            return(string.Empty);
        }

        case 5:
            switch (this.helperType)
            {
            case 0:
            {
                int num5 = (int)parameters;
                return(num5.ToString());
            }

            case 1:
            {
                bool flag = (bool)parameters;
                return(flag.ToString());
            }

            case 2:
                return((string)parameters);

            case 3:
            {
                float num6 = (float)parameters;
                return(num6.ToString());
            }
            }
            return(string.Empty);
        }
        return(string.Empty);
    }
Esempio n. 12
0
    public string returnString(object sentObject)
    {
        object parameters = sentObject;

        if (this.parameters != null)
        {
            parameters = this.parameters;
        }
        switch (this.helperClass)
        {
        case 0:
            return((string)parameters);

        case 1:
        {
            RCActionHelper helper = (RCActionHelper)parameters;
            switch (this.helperType)
            {
            case 0:
                return(this.nextHelper.returnString(RCManager.intVariables[helper.returnString(null)]));

            case 1:
                return(this.nextHelper.returnString(RCManager.boolVariables[helper.returnString(null)]));

            case 2:
                return((string)RCManager.stringVariables[helper.returnString(null)]);

            case 3:
                return(this.nextHelper.returnString(RCManager.floatVariables[helper.returnString(null)]));

            case 4:
                return(this.nextHelper.returnString(RCManager.playerVariables[helper.returnString(null)]));

            case 5:
                return(this.nextHelper.returnString(RCManager.titanVariables[helper.returnString(null)]));

            default:
                return(string.Empty);
            }
        }

        case 2:
        {
            PhotonPlayer player = (PhotonPlayer)parameters;
            if (player != null)
            {
                switch (this.helperType)
                {
                case 0:
                    return(this.nextHelper.returnString(player.Properties["team"]));

                case 1:
                    return(this.nextHelper.returnString(player.Properties["RCteam"]));

                case 2:
                    return(this.nextHelper.returnString(player.Properties["dead"]));

                case 3:
                    return(this.nextHelper.returnString(player.Properties["isTitan"]));

                case 4:
                    return(this.nextHelper.returnString(player.Properties["kills"]));

                case 5:
                    return(this.nextHelper.returnString(player.Properties["deaths"]));

                case 6:
                    return(this.nextHelper.returnString(player.Properties["max_dmg"]));

                case 7:
                    return(this.nextHelper.returnString(player.Properties["total_dmg"]));

                case 8:
                    return(this.nextHelper.returnString(player.Properties["customInt"]));

                case 9:
                    return(this.nextHelper.returnString(player.Properties["customBool"]));

                case 10:
                    return((string)player.Properties["customString"]);

                case 11:
                    return(this.nextHelper.returnString(player.Properties["customFloat"]));

                case 12:
                    return((string)player.Properties["name"]);

                case 13:
                    return((string)player.Properties["guildName"]);

                case 14:
                {
                    int iD = player.ID;
                    if (RCManager.heroHash.ContainsKey(iD))
                    {
                        HERO hero = (HERO)RCManager.heroHash[iD];
                        return(this.nextHelper.returnString(hero.transform.position.x));
                    }
                    return(string.Empty);
                }

                case 15:
                {
                    int key = player.ID;
                    if (RCManager.heroHash.ContainsKey(key))
                    {
                        HERO hero2 = (HERO)RCManager.heroHash[key];
                        return(this.nextHelper.returnString(hero2.transform.position.y));
                    }
                    return(string.Empty);
                }

                case 16:
                {
                    int num6 = player.ID;
                    if (RCManager.heroHash.ContainsKey(num6))
                    {
                        HERO hero3 = (HERO)RCManager.heroHash[num6];
                        return(this.nextHelper.returnString(hero3.transform.position.z));
                    }
                    return(string.Empty);
                }

                case 17:
                {
                    int num7 = player.ID;
                    if (RCManager.heroHash.ContainsKey(num7))
                    {
                        HERO hero4 = (HERO)RCManager.heroHash[num7];
                        return(this.nextHelper.returnString(hero4.rigidbody.velocity.magnitude));
                    }
                    return(string.Empty);
                }
                }
            }
            return(string.Empty);
        }

        case 3:
        {
            TITAN titan = (TITAN)parameters;
            if (titan != null)
            {
                switch (this.helperType)
                {
                case 0:
                    return(this.nextHelper.returnString(titan.abnormalType));

                case 1:
                    return(this.nextHelper.returnString(titan.myLevel));

                case 2:
                    return(this.nextHelper.returnString(titan.currentHealth));

                case 3:
                    return(this.nextHelper.returnString(titan.transform.position.x));

                case 4:
                    return(this.nextHelper.returnString(titan.transform.position.y));

                case 5:
                    return(this.nextHelper.returnString(titan.transform.position.z));
                }
            }
            return(string.Empty);
        }

        case 4:
        {
            RCActionHelper helper2 = (RCActionHelper)parameters;
            RCRegion       region  = (RCRegion)RCManager.RCRegions[helper2.returnString(null)];
            switch (this.helperType)
            {
            case 0:
                return(this.nextHelper.returnString(region.GetRandomX()));

            case 1:
                return(this.nextHelper.returnString(region.GetRandomY()));

            case 2:
                return(this.nextHelper.returnString(region.GetRandomZ()));

            default:
                return(string.Empty);
            }
        }

        case 5:
            switch (this.helperType)
            {
            case 0:
                return(((int)parameters).ToString());

            case 1:
                return(((bool)parameters).ToString());

            case 2:
                return((string)parameters);

            case 3:
                return(((float)parameters).ToString());

            default:
                return(string.Empty);
            }

        default:
            return(string.Empty);
        }
    }
Esempio n. 13
0
    public int ReturnInt(object sentObject)
    {
        object obj = sentObject;

        if (parameters != null)
        {
            obj = parameters;
        }
        switch (helperClass)
        {
        case 0:
            return((int)obj);

        case 5:
            switch (helperType)
            {
            case 0:
                return((int)obj);

            case 1:
            {
                bool value = (bool)obj;
                return(Convert.ToInt32(value));
            }

            case 3:
            {
                float value2 = (float)obj;
                return(Convert.ToInt32(value2));
            }

            case 2:
            {
                string text = (string)obj;
                if (int.TryParse((string)obj, out int result))
                {
                    return(result);
                }
                return(0);
            }

            default:
                return((int)obj);
            }

        case 1:
        {
            RCActionHelper rCActionHelper2 = (RCActionHelper)obj;
            switch (helperType)
            {
            case 0:
                return((int)FengGameManagerMKII.IntVariables[rCActionHelper2.returnString(null)]);

            case 1:
                return(nextHelper.ReturnInt(FengGameManagerMKII.BoolVariables[rCActionHelper2.returnString(null)]));

            case 2:
                return(nextHelper.ReturnInt(FengGameManagerMKII.StringVariables[rCActionHelper2.returnString(null)]));

            case 3:
                return(nextHelper.ReturnInt(FengGameManagerMKII.FloatVariables[rCActionHelper2.returnString(null)]));

            case 4:
                return(nextHelper.ReturnInt(FengGameManagerMKII.PlayerVariables[rCActionHelper2.returnString(null)]));

            case 5:
                return(nextHelper.ReturnInt(FengGameManagerMKII.TitanVariables[rCActionHelper2.returnString(null)]));

            default:
                return(0);
            }
        }

        case 2:
        {
            PhotonPlayer photonPlayer = (PhotonPlayer)obj;
            if (photonPlayer != null)
            {
                switch (helperType)
                {
                case 0:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.Team]);

                case 1:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.RCTeam]);

                case 2:
                    return(nextHelper.ReturnInt(photonPlayer.customProperties[PhotonPlayerProperty.Dead]));

                case 3:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.IsTitan]);

                case 4:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.Kills]);

                case 5:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.Deaths]);

                case 6:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.MaxDamage]);

                case 7:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.TotalDamage]);

                case 8:
                    return((int)photonPlayer.customProperties[PhotonPlayerProperty.CustomInt]);

                case 9:
                    return(nextHelper.ReturnInt(photonPlayer.customProperties[PhotonPlayerProperty.CustomBool]));

                case 10:
                    return(nextHelper.ReturnInt(photonPlayer.customProperties[PhotonPlayerProperty.CustomString]));

                case 11:
                    return(nextHelper.ReturnInt(photonPlayer.customProperties[PhotonPlayerProperty.CustomFloat]));

                case 14:
                {
                    int iD4 = photonPlayer.Id;
                    if (FengGameManagerMKII.HeroHash.ContainsKey(iD4))
                    {
                        HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD4];
                        return(nextHelper.ReturnInt(hERO.transform.position.x));
                    }
                    return(0);
                }

                case 15:
                {
                    int iD3 = photonPlayer.Id;
                    if (FengGameManagerMKII.HeroHash.ContainsKey(iD3))
                    {
                        HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD3];
                        return(nextHelper.ReturnInt(hERO.transform.position.y));
                    }
                    return(0);
                }

                case 16:
                {
                    int iD2 = photonPlayer.Id;
                    if (FengGameManagerMKII.HeroHash.ContainsKey(iD2))
                    {
                        HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD2];
                        return(nextHelper.ReturnInt(hERO.transform.position.z));
                    }
                    return(0);
                }

                case 12:
                    return(nextHelper.ReturnInt(photonPlayer.customProperties[PhotonPlayerProperty.Name]));

                case 13:
                    return(nextHelper.ReturnInt(photonPlayer.customProperties[PhotonPlayerProperty.Guild]));

                case 17:
                {
                    int iD = photonPlayer.Id;
                    if (FengGameManagerMKII.HeroHash.ContainsKey(iD))
                    {
                        HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD];
                        return(nextHelper.ReturnInt(hERO.rigidbody.velocity.magnitude));
                    }
                    return(0);
                }
                }
            }
            return(0);
        }

        case 3:
        {
            TITAN tITAN = (TITAN)obj;
            if (tITAN != null)
            {
                switch (helperType)
                {
                case 0:
                    return((int)tITAN.abnormalType);

                case 1:
                    return(nextHelper.ReturnInt(tITAN.myLevel));

                case 2:
                    return(tITAN.currentHealth);

                case 3:
                    return(nextHelper.ReturnInt(tITAN.transform.position.x));

                case 4:
                    return(nextHelper.ReturnInt(tITAN.transform.position.y));

                case 5:
                    return(nextHelper.ReturnInt(tITAN.transform.position.z));
                }
            }
            return(0);
        }

        case 4:
        {
            RCActionHelper rCActionHelper = (RCActionHelper)obj;
            RCRegion       rCRegion       = (RCRegion)FengGameManagerMKII.RCRegions[rCActionHelper.returnString(null)];
            switch (helperType)
            {
            case 0:
                return(nextHelper.ReturnInt(rCRegion.GetRandomX()));

            case 1:
                return(nextHelper.ReturnInt(rCRegion.GetRandomY()));

            case 2:
                return(nextHelper.ReturnInt(rCRegion.GetRandomZ()));

            default:
                return(0);
            }
        }

        default:
            return(0);
        }
    }