public static void UpdateInstancePosition(SpecialMovesController 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 override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 3: { _Allow2HanderExplosionPots = reader.ReadBool(); _MaceStaminaDrainModifier = reader.ReadDouble(); } goto case 2; case 2: _StealingRehideDelay = reader.ReadDouble(); goto case 1; case 1: _TrackingMinDistance = reader.ReadInt(); _TrackingDistancePerSkillPoint = reader.ReadDouble(); _TrackingSuccessSkillTest = reader.ReadDouble(); _AccuracyHitBonusMaxPercent = reader.ReadInt(); _HitChanceFormulaDenomScalar = reader.ReadDouble(); _DefensiveWrestlingMaxValue = reader.ReadDouble(); goto case 0; case 0: _StunPunchSeconds = reader.ReadDouble(); _StunStaminaRequired = reader.ReadInt(); _DisarmStaminaRequired = reader.ReadInt(); _SpecialMoveChanceAtGM_GM = reader.ReadDouble(); _SpearStunMaxChance = reader.ReadDouble(); _SpearStunDurationSeconds = reader.ReadDouble(); _CrushingBlowMaxChance = reader.ReadDouble(); _ConcussionPoleArmMaxChance = reader.ReadDouble(); _ConcussionAxeMaxChance = reader.ReadDouble(); _ConcussionDurationSeconds = reader.ReadDouble(); _PoisonChanceSwords = reader.ReadDouble(); _PoisonChanceSpears = reader.ReadDouble(); _PoisonChanceKnives = reader.ReadDouble(); _PoisonSkillChanceMaxBonus = reader.ReadDouble(); _PoisonChancePenaltyPerFollower = reader.ReadDouble(); break; } m_Instance = this; }
public static void UpdateInstancePosition(SpecialMovesController 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 SpecialMovesController() : base(0xEDC) { this.Name = "Special Moves Controller"; this.Movable = false; this.Visible = false; if (m_Instance != null) { // there can only be one SpecialMovesController game stone in the world m_Instance.Location = this.Location; Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489, "Existing SpecialMovesController has been moved to this location (DON'T DELETE IT!)."); Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback<SpecialMovesController>(UpdateInstancePosition), this); } else m_Instance = this; }
public SpecialMovesController() : base(0xEDC) { this.Name = "Special Moves Controller"; this.Movable = false; this.Visible = false; if (m_Instance != null) { // there can only be one SpecialMovesController game stone in the world m_Instance.Location = this.Location; Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489, "Existing SpecialMovesController has been moved to this location (DON'T DELETE IT!)."); Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback <SpecialMovesController>(UpdateInstancePosition), this); } else { m_Instance = this; } }