Esempio n. 1
0
        public override void OnAfterDelete()
        {
            CleanUp();
            _Instance = null;

            base.OnAfterDelete();
        }
Esempio n. 2
0
        public PseudoSeerStone()
            : base(0xEDC)
        {
            MovePSeerToLastPossessed = true;
            Name         = "Pseudoseer Stone";
            Movable      = false;
            SeerDuration = TimeSpan.MaxValue;
            MessageStaff = true;

            if (_Instance != null)
            {
                // there can only be one PseudoSeerStone game stone in the world
                _Instance.Delete();

                CommandHandlers.BroadcastMessage(
                    CreaturePossession.FullAccessStaffLevel,
                    0x489,
                    "Old PseudoSeerStone gamestone has been deleted as new one was added.");
            }

            _Instance = this;
        }
Esempio n. 3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 21:
                _FastWalkPrevention = reader.ReadBool();
                goto case 20;

            case 20:
            {
                OnPlayerDeathUberScript     = reader.ReadString();
                CreaturesStealthLikePlayers = reader.ReadBool();
            }
                goto case 19;

            case 19:
                TreasureMapMobSpawnChance = reader.ReadDouble();
                goto case 18;

            case 18:
                OnLoginUberScript = reader.ReadString();
                goto case 17;

            case 17:
                AllowThirdDawnClient = reader.ReadBool();
                goto case 16;

            case 16:
            {
                MaxBODGoldRewardAllowed = reader.ReadInt();
                HoursBetweenBODs        = reader.ReadDouble();
                BondingAbandonDelay     = reader.ReadTimeSpan();
            }
                goto case 15;

            case 15:
            {
                TreasureChestDamageModifierChance = reader.ReadDouble();
                TreasureChestVanqChance           = reader.ReadDouble();
                TreasureChestPowerChance          = reader.ReadDouble();
                TreasureChestForceChance          = reader.ReadDouble();
                TreasureChestMightChance          = reader.ReadDouble();

                TreasureChestDurabilityModifierChance = reader.ReadDouble();
                TreasureChestIndestructibleChance     = reader.ReadDouble();
                TreasureChestFortifiedChance          = reader.ReadDouble();
                TreasureChestMassiveChance            = reader.ReadDouble();
                TreasureChestSubstantialChance        = reader.ReadDouble();

                TreasureChestAccuracyModifierChance = reader.ReadDouble();
                TreasureChestSupremelyChance        = reader.ReadDouble();
                TreasureChestExceedinglyChance      = reader.ReadDouble();
                TreasureChestEminentlyChance        = reader.ReadDouble();
                TreasureChestSurpassinglyChance     = reader.ReadDouble();
            }
                goto case 14;

            case 14:
            {
                AllowRedsInTown             = reader.ReadBool();
                CompanionMinutesBetweenHelp = reader.ReadDouble();
                ParagonRevertInHours        = reader.ReadDouble();
                AllowCriminalUseGate        = reader.ReadBool();
            }
                goto case 13;

            case 13:
            {
                AllowAllPossessedMobsSpeedBoost = reader.ReadBool();
                AllowPseudoseerMobsSpeedBoost   = reader.ReadBool();
            }
                goto case 12;

            case 12:
                JustMurderedMinutesTracked = reader.ReadDouble();
                goto case 11;

            case 11:
                SpeedHackSeriousThreshold = reader.ReadDouble();
                goto case 10;

            case 10:
            {
                ParagonChestPlatinumPerLevel = reader.ReadInt();
                MobStatueChance = reader.ReadDouble();
            }
                goto case 9;

            case 9:
            {
                ParagonChestChance           = reader.ReadDouble();
                PlatinumPerMissedDamageLevel = reader.ReadInt();
                ReplaceVanqWithSkillScrolls  = reader.ReadBool();
            }
                goto case 8;

            case 8:
            {
                ParagonMaxChance = reader.ReadDouble();
                ParagonMinChance = reader.ReadDouble();
            }
                goto case 7;

            case 7:
                HighestDamageLevelSpawn = reader.ReadInt();
                goto case 6;

            case 6:
                reader.ReadByte();
                goto case 5;

            case 5:
            {
                reader.ReadBool();
                _FastWalkThreshold = reader.ReadTimeSpan();
            }
                goto case 4;

            case 4:
                CreatureLootDropMultiplier = reader.ReadDouble();
                goto case 3;

            case 3:
                MovePSeerToLastPossessed = reader.ReadBool();
                goto case 2;

            case 2:
            {
                int numPseudoseers = reader.ReadInt();

                for (int i = 0; i < numPseudoseers; i++)
                {
                    PseudoseerUserNamesToReinstate.Add(reader.ReadString());
                    PseudoseerPermissionsToReinstate.Add(reader.ReadString());
                }
            }
                goto case 1;

            case 1:
            {
                CurrentPermissionsClipboard = reader.ReadString();
                SeerDuration = reader.ReadTimeSpan();
                MessageStaff = reader.ReadBool();
            }
            break;
            }

            _Instance = this;
        }
Esempio n. 4
0
		public override void OnAfterDelete()
		{
			CleanUp();
			_Instance = null;

			base.OnAfterDelete();
		}
Esempio n. 5
0
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			switch (version)
			{
				case 21:
					_FastWalkPrevention = reader.ReadBool();
					goto case 20;
				case 20:
					{
						OnPlayerDeathUberScript = reader.ReadString();
						CreaturesStealthLikePlayers = reader.ReadBool();
					}
					goto case 19;
				case 19:
					TreasureMapMobSpawnChance = reader.ReadDouble();
					goto case 18;
				case 18:
					OnLoginUberScript = reader.ReadString();
					goto case 17;
				case 17:
					AllowThirdDawnClient = reader.ReadBool();
					goto case 16;
				case 16:
					{
						MaxBODGoldRewardAllowed = reader.ReadInt();
						HoursBetweenBODs = reader.ReadDouble();
						BondingAbandonDelay = reader.ReadTimeSpan();
					}
					goto case 15;
				case 15:
					{
						TreasureChestDamageModifierChance = reader.ReadDouble();
						TreasureChestVanqChance = reader.ReadDouble();
						TreasureChestPowerChance = reader.ReadDouble();
						TreasureChestForceChance = reader.ReadDouble();
						TreasureChestMightChance = reader.ReadDouble();

						TreasureChestDurabilityModifierChance = reader.ReadDouble();
						TreasureChestIndestructibleChance = reader.ReadDouble();
						TreasureChestFortifiedChance = reader.ReadDouble();
						TreasureChestMassiveChance = reader.ReadDouble();
						TreasureChestSubstantialChance = reader.ReadDouble();

						TreasureChestAccuracyModifierChance = reader.ReadDouble();
						TreasureChestSupremelyChance = reader.ReadDouble();
						TreasureChestExceedinglyChance = reader.ReadDouble();
						TreasureChestEminentlyChance = reader.ReadDouble();
						TreasureChestSurpassinglyChance = reader.ReadDouble();
					}
					goto case 14;
				case 14:
					{
						AllowRedsInTown = reader.ReadBool();
						CompanionMinutesBetweenHelp = reader.ReadDouble();
						ParagonRevertInHours = reader.ReadDouble();
						AllowCriminalUseGate = reader.ReadBool();
					}
					goto case 13;
				case 13:
					{
						AllowAllPossessedMobsSpeedBoost = reader.ReadBool();
						AllowPseudoseerMobsSpeedBoost = reader.ReadBool();
					}
					goto case 12;
				case 12:
					JustMurderedMinutesTracked = reader.ReadDouble();
					goto case 11;
				case 11:
					SpeedHackSeriousThreshold = reader.ReadDouble();
					goto case 10;
				case 10:
					{
						ParagonChestPlatinumPerLevel = reader.ReadInt();
						MobStatueChance = reader.ReadDouble();
					}
					goto case 9;
				case 9:
					{
						ParagonChestChance = reader.ReadDouble();
						PlatinumPerMissedDamageLevel = reader.ReadInt();
						ReplaceVanqWithSkillScrolls = reader.ReadBool();
					}
					goto case 8;
				case 8:
					{
						ParagonMaxChance = reader.ReadDouble();
						ParagonMinChance = reader.ReadDouble();
					}
					goto case 7;
				case 7:
					HighestDamageLevelSpawn = reader.ReadInt();
					goto case 6;
				case 6:
					reader.ReadByte();
					goto case 5;
				case 5:
					{
						reader.ReadBool();
						_FastWalkThreshold = reader.ReadTimeSpan();
					}
					goto case 4;
				case 4:
					CreatureLootDropMultiplier = reader.ReadDouble();
					goto case 3;
				case 3:
					MovePSeerToLastPossessed = reader.ReadBool();
					goto case 2;
				case 2:
					{
						int numPseudoseers = reader.ReadInt();

						for (int i = 0; i < numPseudoseers; i++)
						{
							PseudoseerUserNamesToReinstate.Add(reader.ReadString());
							PseudoseerPermissionsToReinstate.Add(reader.ReadString());
						}
					}
					goto case 1;
				case 1:
					{
						CurrentPermissionsClipboard = reader.ReadString();
						SeerDuration = reader.ReadTimeSpan();
						MessageStaff = reader.ReadBool();
					}
					break;
			}

			_Instance = this;
		}
Esempio n. 6
0
		public PseudoSeerStone()
			: base(0xEDC)
		{
			MovePSeerToLastPossessed = true;
			Name = "Pseudoseer Stone";
			Movable = false;
			SeerDuration = TimeSpan.MaxValue;
			MessageStaff = true;

			if (_Instance != null)
			{
				// there can only be one PseudoSeerStone game stone in the world
				_Instance.Delete();

				CommandHandlers.BroadcastMessage(
					CreaturePossession.FullAccessStaffLevel,
					0x489,
					"Old PseudoSeerStone gamestone has been deleted as new one was added.");
			}

			_Instance = this;
		}