public override void SetObject(NoxShared.Map.Object obj) { this.obj = obj; // теперь новый загрузчик гарантирует что ExtraData не будет null Xfer = obj.GetExtraData <MonsterGeneratorXfer>(); Text += string.Format(" - {0}", obj); // ставим значения scriptCollided.Text = Xfer.ScriptOnCollide; scriptDamaged.Text = Xfer.ScriptOnDamage; scriptDestroyed.Text = Xfer.ScriptOnDestroy; scriptMSpawned.Text = Xfer.ScriptOnSpawn; spawningAlgBox.SelectedIndex = Xfer.GenerationFlags; // имена монстров foreach (string name in Xfer.MonsterNames) { if (name == null) { monstersListBox.Items.Add(EMPTY_MONSTER_SLOT); } else { monstersListBox.Items.Add(name); } } }
public override void SetObject(NoxShared.Map.Object obj) { this.obj = obj; SentryXfer xfer = obj.GetExtraData <SentryXfer>(); sentryAngle.Text = xfer.BasePosRadian.ToString(floatFormat); sentrySpeed.Text = xfer.RotateSpeed.ToString(floatFormat); }
public override void SetObject(NoxShared.Map.Object obj) { base.SetObject(obj); ExitXfer xfer = obj.GetExtraData <ExitXfer>(); textBoxMapName.Text = xfer.MapName; textBoxSpawnX.Text = xfer.ExitX.ToString(floatFormatInfo); textBoxSpawnY.Text = xfer.ExitY.ToString(floatFormatInfo); }
public override void SetObject(NoxShared.Map.Object obj) { this.obj = obj; GoldXfer gold = obj.GetExtraData <GoldXfer>(); if (gold.Amount < 0) { gold.Amount = 0; } goldAmount.Value = gold.Amount; }
public override void SetObject(NoxShared.Map.Object obj) { this.obj = obj; manaStored.Value = obj.GetExtraData <ObeliskXfer>().ManaPool; //numericUpDown1.Value = obj.GetExtraData<ObeliskXfer>().Unused; }
public override void SetObject(NoxShared.Map.Object obj) { this.obj = obj; xfer = obj.GetExtraData <InvisibleLightXfer>(); numericUpDown1.Value = xfer.LightIntensity; numericUpDown2.Value = xfer.PulseSpeed; numericUpDown3.Value = xfer.ChangeIntensity; outterSize.Value = xfer.LightRadius; shadow.Checked = xfer.type == 1 ? true : false; sequenceOptions.Height = 60; numericUpDown2.Value = xfer.PulseSpeed; xxx.Value = xfer.Unknown10; ChangeIntensitySingleNum.Value = xfer.ChangeIntensitySingle; PulseSpeedSingleNum.Value = xfer.PulseSpeedSingle; unkwn11.Value = xfer.Unknown11; /* * if (xfer.PulseSpeed > 0) * { * StaticOptions.Enabled = false; * PulsingOptions.Enabled = true; * } */ Color newColor = Color.FromArgb(xfer.R, xfer.G, xfer.B); Color newColor2 = Color.FromArgb(xfer.R2, xfer.G2, xfer.B2); UnknownRcol = Color.FromArgb(xfer.UnknownR, xfer.UnknownG, xfer.UnknownB); /* * if (xfer.Color2.R == 0 && xfer.Color2.G == 0 && xfer.Color2.B == 0) * Color2Pulse = Color.White; * else * Color2Pulse = xfer.Color2; * * * if (xfer.UnknownR == 0 && xfer.UnknownG == 0 && xfer.UnknownB == 0) * UnknownRcol = Color.White; * */ Color Color1Pulse = xfer.Color1; Color Color2Pulse = xfer.Color2; Color Color3Pulse = xfer.Color3; Color Color4Pulse = xfer.Color4; Color Color5Pulse = xfer.Color5; Color Color6Pulse = xfer.Color6; Color Color7Pulse = xfer.Color7; Color Color8Pulse = xfer.Color8; Color Color9Pulse = xfer.Color9; Color Color10Pulse = xfer.Color10; newColor2 = Color.FromArgb((byte)~newColor2.R, (byte)~newColor2.G, (byte)~newColor2.B); if (shadow.Checked) { newColor = Color.FromArgb((byte)~newColor.R, (byte)~newColor.G, (byte)~newColor.B); Color1Pulse = Color.FromArgb((byte)~Color1Pulse.R, (byte)~Color1Pulse.G, (byte)~Color1Pulse.B); Color2Pulse = Color.FromArgb((byte)~Color2Pulse.R, (byte)~Color2Pulse.G, (byte)~Color2Pulse.B); Color3Pulse = Color.FromArgb((byte)~Color3Pulse.R, (byte)~Color3Pulse.G, (byte)~Color3Pulse.B); Color4Pulse = Color.FromArgb((byte)~Color4Pulse.R, (byte)~Color4Pulse.G, (byte)~Color4Pulse.B); Color5Pulse = Color.FromArgb((byte)~Color5Pulse.R, (byte)~Color5Pulse.G, (byte)~Color5Pulse.B); Color6Pulse = Color.FromArgb((byte)~Color6Pulse.R, (byte)~Color6Pulse.G, (byte)~Color6Pulse.B); Color7Pulse = Color.FromArgb((byte)~Color7Pulse.R, (byte)~Color7Pulse.G, (byte)~Color7Pulse.B); Color8Pulse = Color.FromArgb((byte)~Color8Pulse.R, (byte)~Color8Pulse.G, (byte)~Color8Pulse.B); Color9Pulse = Color.FromArgb((byte)~Color9Pulse.R, (byte)~Color9Pulse.G, (byte)~Color9Pulse.B); Color10Pulse = Color.FromArgb((byte)~Color10Pulse.R, (byte)~Color10Pulse.G, (byte)~Color10Pulse.B); } button3.BackColor = newColor; button2.BackColor = Color1Pulse; Colbutton2.BackColor = Color2Pulse; color3but.BackColor = Color3Pulse; button4.BackColor = Color4Pulse; button5.BackColor = Color5Pulse; button6.BackColor = Color6Pulse; button7.BackColor = Color7Pulse; button8.BackColor = Color8Pulse; button9.BackColor = Color9Pulse; button10.BackColor = Color10Pulse; staticClolor2.BackColor = newColor2; button2.Visible = false; Colbutton2.Visible = false; color3but.Visible = false; button4.Visible = false; button5.Visible = false; button6.Visible = false; button7.Visible = false; button8.Visible = false; button9.Visible = false; button10.Visible = false; //Colbutton2.BackColor = Color2Pulse; if (xfer.UnknownR > 0 || xfer.UnknownG > 0 || xfer.UnknownB > 0) { crazy.Checked = true; UnknownRBut.Enabled = true; UnknownRBut.BackColor = UnknownRcol; } else { crazy.Checked = false; UnknownRBut.Enabled = false; } if (xfer.Color1.R > 0 || xfer.Color1.G > 0 || xfer.Color1.B > 0) { button2.Visible = true; button2.BackColor = Color1Pulse; } else { button2.Visible = false; goto done; } if (xfer.Color2.R > 0 || xfer.Color2.G > 0 || xfer.Color2.B > 0) { Colbutton2.Visible = true; Colbutton2.BackColor = Color2Pulse; } else { button2.Visible = false; Colbutton2.Visible = false; goto done; } if (xfer.Color3.R > 0 || xfer.Color3.G > 0 || xfer.Color3.B > 0) { color3but.Visible = true; color3but.BackColor = Color3Pulse; } else { color3but.Visible = false; goto done; } if (xfer.Color4.R > 0 || xfer.Color4.G > 0 || xfer.Color4.B > 0) { button4.Visible = true; button4.BackColor = Color4Pulse; } else { button4.Visible = false; goto done; } if (xfer.Color5.R > 0 || xfer.Color5.G > 0 || xfer.Color5.B > 0) { button5.Visible = true; button5.BackColor = Color5Pulse; } else { button5.Visible = false; goto done; } if (xfer.Color6.R > 0 || xfer.Color6.G > 0 || xfer.Color6.B > 0) { button6.Visible = true; button6.BackColor = Color6Pulse; } else { button6.Visible = false; goto done; } if (xfer.Color7.R > 0 || xfer.Color7.G > 0 || xfer.Color7.B > 0) { button7.Visible = true; button7.BackColor = Color7Pulse; } else { button7.Visible = false; goto done; } if (xfer.Color8.R > 0 || xfer.Color8.G > 0 || xfer.Color8.B > 0) { button8.Visible = true; button8.BackColor = Color8Pulse; } else { button8.Visible = false; goto done; } if (xfer.Color9.R > 0 || xfer.Color9.G > 0 || xfer.Color9.B > 0) { button9.Visible = true; button9.BackColor = Color9Pulse; } else { button9.Visible = false; goto done; } if (xfer.Color10.R > 0 || xfer.Color10.G > 0 || xfer.Color10.B > 0) { button10.Visible = true; button10.BackColor = Color10Pulse; } else { button10.Visible = false; goto done; } done: max2.Value = xfer.MaxRadius2; max3.Value = xfer.MaxRadius3; max4.Value = xfer.MaxRadius4; max5.Value = xfer.MaxRadius5; max6.Value = xfer.MaxRadius6; max7.Value = xfer.MaxRadius7; max8.Value = xfer.MaxRadius8; max9.Value = xfer.MaxRadius9; max10.Value = xfer.MaxRadius10; min2.Value = xfer.MinRadius2; min3.Value = xfer.MinRadius3; min4.Value = xfer.MinRadius4; min5.Value = xfer.MinRadius5; min6.Value = xfer.MinRadius6; min7.Value = xfer.MinRadius7; min8.Value = xfer.MinRadius8; min9.Value = xfer.MinRadius9; min10.Value = xfer.MinRadius10; if (PulseSpeedSingleNum.Value > 0) { PulsingBox.Checked = true; PulsingOptions.Enabled = true; StaticOptions.Enabled = false; } else { PulsingBox.Checked = false; PulsingOptions.Enabled = false; } }