public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 0: //_PoisonChancePenaltyPerFollower = reader.ReadDouble(); // _ItemsBlockPlacement = (HousePlacementItemBlocking)reader.ReadByte(); _SmallBodChanceForNone = reader.ReadDouble(); _SmallBodChanceForDullCopper = reader.ReadDouble(); _SmallBodChanceForShadowIron = reader.ReadDouble(); _SmallBodChanceForCopper = reader.ReadDouble(); _SmallBodChanceForBronze = reader.ReadDouble(); _SmallBodChanceForGold = reader.ReadDouble(); _SmallBodChanceForAgapite = reader.ReadDouble(); _SmallBodChanceForVerite = reader.ReadDouble(); _SmallBodChanceForValorite = reader.ReadDouble(); _LargeBodChanceForNone = reader.ReadDouble(); _LargeBodChanceForDullCopper = reader.ReadDouble(); _LargeBodChanceForShadowIron = reader.ReadDouble(); _LargeBodChanceForCopper = reader.ReadDouble(); _LargeBodChanceForBronze = reader.ReadDouble(); _LargeBodChanceForGold = reader.ReadDouble(); _LargeBodChanceForAgapite = reader.ReadDouble(); _LargeBodChanceForVerite = reader.ReadDouble(); _LargeBodChanceForValorite = reader.ReadDouble(); break; } m_Instance = this; UpdateChances(); }
public static void UpdateInstancePosition(BODSystemController attemptedConstruct) { if (attemptedConstruct == null) return; if (m_Instance == null) // should never happen, but if it does, make this the instance { m_Instance = attemptedConstruct; } else if (attemptedConstruct.Location != new Point3D(0,0,0)) // move the instance to it's location and delete it { m_Instance.Location = attemptedConstruct.Location; attemptedConstruct.Delete(); } }
public static void UpdateInstancePosition(BODSystemController attemptedConstruct) { if (attemptedConstruct == null) { return; } if (m_Instance == null) // should never happen, but if it does, make this the instance { m_Instance = attemptedConstruct; } else if (attemptedConstruct.Location != new Point3D(0, 0, 0)) // move the instance to it's location and delete it { m_Instance.Location = attemptedConstruct.Location; attemptedConstruct.Delete(); } }
public BODSystemController() : base(0xEDC) { this.Name = "Dynamic Settings Controller"; this.Movable = false; this.Visible = false; if (m_Instance != null) { // there can only be one BODSystemController game stone in the world m_Instance.Location = this.Location; Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489, "Existing BODSystemController has been moved to this location (DON'T DELETE IT!)."); Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback<BODSystemController>(UpdateInstancePosition), this); } else m_Instance = this; }
public BODSystemController() : base(0xEDC) { this.Name = "Dynamic Settings Controller"; this.Movable = false; this.Visible = false; if (m_Instance != null) { // there can only be one BODSystemController game stone in the world m_Instance.Location = this.Location; Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489, "Existing BODSystemController has been moved to this location (DON'T DELETE IT!)."); Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback <BODSystemController>(UpdateInstancePosition), this); } else { m_Instance = this; } }