entity.MetaEditor2.Indices.Poke C# (CSharp) Method

Poke() public method

public Poke ( ) : void
return void
        public void Poke()
        {
            if (this.isNulledOutReflexive == true)
                return;
            string tempstring1 = this.comboBox1.Text;
            if (tempstring1.Contains(" Is Invalid. On Line ") || tempstring1.Contains("Something is wrong with this ") || tempstring1.Contains(" : Value is Too Small To Be An Index") || tempstring1.Contains(" : Value is Too Large To Be The Indexer"))
                return;
            if (tempstring1 == "nulled")
                this.Value = -1;
            if (tempstring1.Contains(" : "))
            {
                int counter;
                for (counter = 0; counter < tempstring1.Length; counter++)
                {
                    if (tempstring1[counter] == ' ')
                    {
                        break;
                    }
                }
                this.Value = Convert.ToInt32(tempstring1.Substring(0, counter));
            }
            uint Address = (uint)(this.offsetInMap + meta.magic);
            switch (_ValueType)
            {
                case IFPIO.ObjectEnum.Short:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)Convert.ToInt16(this.Value), 16);
                        break;
                    }
                case IFPIO.ObjectEnum.Int:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)Convert.ToInt32(this.Value), 32);
                        break;
                    }
                case IFPIO.ObjectEnum.UShort:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)Convert.ToUInt16(this.Value), 16);
                        break;
                    }
                case IFPIO.ObjectEnum.UInt:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)Convert.ToUInt32(this.Value), 32);
                        break;
                    }
                case IFPIO.ObjectEnum.Float:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)HaloMap.RealTimeHalo.RTH_Imports.ConvertFloat(Convert.ToSingle(this.Value)), 32);
                        break;
                    }
                case IFPIO.ObjectEnum.Unknown:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)HaloMap.RealTimeHalo.RTH_Imports.ConvertFloat(Convert.ToSingle(this.Value)), 32);
                        break;
                    }
                case IFPIO.ObjectEnum.Byte:
                    {
                        HaloMap.RealTimeHalo.RTH_Imports.Poke(Address, (uint)Convert.ToByte(this.Value), 8);
                        break;
                    }
            }
        }