Exemplo n.º 1
0
        private static string GetVariableModText(SetVariableCommand command, StringVariableMod mod)
        {
            var varvalue = "";

            switch (mod.ModType)
            {
            case Enums.VariableMods.Set:
                varvalue = Strings.EventCommandList.setvariable.ToString(mod.Value);

                break;

            case Enums.VariableMods.Replace:
                varvalue = Strings.EventCommandList.replace.ToString(mod.Value, mod.Replace);

                break;
            }

            if (command.VariableType == VariableTypes.PlayerVariable)
            {
                return(Strings.EventCommandList.playervariable.ToString(
                           PlayerVariableBase.GetName(command.VariableId), varvalue
                           ));
            }

            if (command.VariableType == VariableTypes.ServerVariable)
            {
                return(Strings.EventCommandList.globalvariable.ToString(
                           ServerVariableBase.GetName(command.VariableId), varvalue
                           ));
            }

            return(Strings.EventCommandList.invalid);
        }
Exemplo n.º 2
0
        private static string GetVariableModText(SetVariableCommand command, BooleanVariableMod mod)
        {
            var varvalue = "";

            if (mod.DuplicateVariableId != Guid.Empty)
            {
                if (mod.DupVariableType == VariableTypes.PlayerVariable)
                {
                    varvalue = Strings.EventCommandList.dupplayervariable.ToString(
                        PlayerVariableBase.GetName(mod.DuplicateVariableId)
                        );
                }

                else if (mod.DupVariableType == VariableTypes.ServerVariable)
                {
                    varvalue = Strings.EventCommandList.dupglobalvariable.ToString(
                        ServerVariableBase.GetName(mod.DuplicateVariableId)
                        );
                }
            }
            else
            {
                if (mod.Value == true)
                {
                    varvalue = Strings.EventCommandList.setvariable.ToString(Strings.EventCommandList.True);
                }
                else
                {
                    varvalue = Strings.EventCommandList.setvariable.ToString(Strings.EventCommandList.False);
                }
            }

            if (command.VariableType == VariableTypes.PlayerVariable)
            {
                return(Strings.EventCommandList.playervariable.ToString(
                           PlayerVariableBase.GetName(command.VariableId), varvalue
                           ));
            }

            if (command.VariableType == VariableTypes.ServerVariable)
            {
                return(Strings.EventCommandList.globalvariable.ToString(
                           ServerVariableBase.GetName(command.VariableId), varvalue
                           ));
            }

            return(Strings.EventCommandList.invalid);
        }
Exemplo n.º 3
0
        private static string GetVariableModText(SetVariableCommand command, IntegerVariableMod mod)
        {
            var varvalue = "";

            switch (mod.ModType)
            {
            case Enums.VariableMods.Set:
                varvalue = Strings.EventCommandList.setvariable.ToString(mod.Value);

                break;

            case Enums.VariableMods.Add:
                varvalue = Strings.EventCommandList.addvariable.ToString(mod.Value);

                break;

            case Enums.VariableMods.Subtract:
                varvalue = Strings.EventCommandList.subtractvariable.ToString(mod.Value);

                break;

            case Enums.VariableMods.Random:
                varvalue = Strings.EventCommandList.randvariable.ToString(mod.Value, mod.HighValue);

                break;

            case Enums.VariableMods.SystemTime:
                varvalue = Strings.EventCommandList.systemtimevariable;

                break;

            case Enums.VariableMods.DupPlayerVar:
                varvalue = Strings.EventCommandList.dupplayervariable.ToString(
                    PlayerVariableBase.GetName(mod.DuplicateVariableId)
                    );

                break;

            case Enums.VariableMods.DupGlobalVar:
                varvalue = Strings.EventCommandList.dupglobalvariable.ToString(
                    ServerVariableBase.GetName(mod.DuplicateVariableId)
                    );

                break;

            case Enums.VariableMods.AddPlayerVar:
                varvalue = Strings.EventCommandList.addplayervariable.ToString(
                    PlayerVariableBase.GetName(mod.DuplicateVariableId)
                    );

                break;

            case Enums.VariableMods.AddGlobalVar:
                varvalue = Strings.EventCommandList.addglobalvariable.ToString(
                    ServerVariableBase.GetName(mod.DuplicateVariableId)
                    );

                break;

            case Enums.VariableMods.SubtractPlayerVar:
                varvalue = Strings.EventCommandList.subtractplayervariable.ToString(
                    PlayerVariableBase.GetName(mod.DuplicateVariableId)
                    );

                break;

            case Enums.VariableMods.SubtractGlobalVar:
                varvalue = Strings.EventCommandList.subtractglobalvariable.ToString(
                    ServerVariableBase.GetName(mod.DuplicateVariableId)
                    );

                break;
            }

            if (command.VariableType == VariableTypes.PlayerVariable)
            {
                return(Strings.EventCommandList.playervariable.ToString(
                           PlayerVariableBase.GetName(command.VariableId), varvalue
                           ));
            }

            if (command.VariableType == VariableTypes.ServerVariable)
            {
                return(Strings.EventCommandList.globalvariable.ToString(
                           ServerVariableBase.GetName(command.VariableId), varvalue
                           ));
            }

            return(Strings.EventCommandList.invalid);
        }