Esempio n. 1
0
        public static void StartUpdate(DuelStone ds, Mobile lost)
        {
            DuelstoneLadderUpdate ladderUpdate = new DuelstoneLadderUpdate();

            ladderUpdate.stoneToUpdate = ds;
            ladderUpdate.personWhoLost = lost;

            Thread updateStoneThread = new Thread(ladderUpdate.UpdateLadder);

            updateStoneThread.Start();
        }
Esempio n. 2
0
        private static void OnPlayerDeath(PlayerDeathEventArgs e)
        {
            PlayerMobile pm = e.Mobile as PlayerMobile;

            if (pm == null || pm.DuelStone == null)
            {
                return;
            }

            #region DuelstoneCode
            DuelStone ds = pm.DuelStone;

            //Reset combatants
            if (pm.LastKiller != null)
            {
                //Taran: Had to add this to reward fame, since combatant is nulled below
                int fameAward = pm.Fame / 10;
                Titles.AwardFame(pm.LastKiller, fameAward, true);

                pm.LastKiller.Combatant = null;
                pm.Combatant            = null;
            }

            //Update duelstone
            if (ds.IsLadderStone)
            {
                DuelstoneLadderUpdate.StartUpdate(ds, pm);
            }

            if (ds.StoneType.ToString().Contains("Loot"))
            {
                if (pm.Corpse != null)
                {
                    ((Corpse)pm.Corpse).Carve(pm, null);
                }
            }
            else
            {
                GiveOpponentMoney(ds, pm);
            }

            pm.SendAsciiMessage("You will be teleported out in " + ds.StoneMaxIdleTime + " seconds.");

            if (ds.MoveTimer == null)
            {
                ds.MoveTimer = Timer.DelayCall(TimeSpan.FromSeconds(ds.StoneMaxIdleTime + 1), new TimerStateCallback(TeleOut), ds);
            }
            if (ds.CountTimer == null)
            {
                ds.CountTimer = Timer.DelayCall(TimeSpan.Zero, TimeSpan.FromSeconds(1.0), ds.StoneMaxIdleTime + 1, new TimerStateCallback(CountToEnd), new object[] { ds, ds.StoneMaxIdleTime });
            }
            #endregion
        }
Esempio n. 3
0
		public static void StartUpdate( DuelStone ds, Mobile lost )
		{
			DuelstoneLadderUpdate ladderUpdate = new DuelstoneLadderUpdate();
			ladderUpdate.stoneToUpdate = ds;
			ladderUpdate.personWhoLost = lost;

			Thread updateStoneThread = new Thread( ladderUpdate.UpdateLadder );
			updateStoneThread.Start();
		}