Beispiel #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)));
        }

        return(false);
    }
Beispiel #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)));

        default:
            return(false);
        }
    }
    public int returnInt(object sentObject)
    {
        var parameters = sentObject;

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

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

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

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

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

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

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

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

            return(0);
        }

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

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

                case 2:
                    return(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(nextHelper.returnInt(player.customProperties[PhotonPlayerProperty.customBool]));

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

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

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

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

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

                    return(0);
                }

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

                    return(0);
                }

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

                    return(0);
                }

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

                    return(0);
                }
                }
            }

            return(0);
        }

        case 3:
        {
            var titan = (TITAN)parameters;
            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:
        {
            var helper2 = (RCActionHelper)parameters;
            var region  = (RCRegion)FengGameManagerMKII.RCRegions[helper2.returnString(null)];
            switch (helperType)
            {
            case 0:
                return(nextHelper.returnInt(region.GetRandomX()));

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

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

            return(0);
        }

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

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

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

                return(0);
            }

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

            return((int)parameters);
        }

        return(0);
    }
Beispiel #4
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);
        }
    }