コード例 #1
0
ファイル: PvpCore.cs プロジェクト: FreeReign/imaginenation
        public static bool TryJoinDM(Mobile from, DMStone dmStone)
        {
            if (Factions.Sigil.ExistsOn(from))
                from.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            else if (IsInDeathmatch(from))
                from.SendMessage("You are already in a deathmatch. Say \"i wish to leave the deathmatch\" to leave.");
            else if (from.IsInEvent)
                from.SendMessage("You cannot join a tournament while in an event");
            else if (from.Spell != null)
                from.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
            else if (!from.Alive)
                from.SendMessage("You cannot join a deathmatch while dead.");
            else if (from.IsBodyMod && !from.Body.IsHuman)
                from.SendMessage("You cannot join a deathmatch while polymorphed.");
            else if (DMStones.Count < 1)
                from.SendMessage("No deathmatch system exists on the server.");
            else if (from.AccessLevel > AccessLevel.Player)
                from.SendMessage("You cannot join a deathmatch as staff");
            else
                return AllowDMJoin(from, dmStone);

            return false;
        }
コード例 #2
0
ファイル: DMStone.cs プロジェクト: FreeReign/imaginenation
 public ResurrectTimer(Mobile m, DMStone stone) : base(TimeSpan.FromSeconds(60.0))
 {
     m_From = m;
     m_DMStone = stone;
 }
コード例 #3
0
ファイル: DMStone.cs プロジェクト: FreeReign/imaginenation
 public MatchTimer(DMStone stone, int mincount)
     : base(TimeSpan.FromMinutes(0), TimeSpan.FromSeconds(1.0))
 {
     m_DMStone = stone;
     count = mincount*60;
 }
コード例 #4
0
ファイル: PvpCore.cs プロジェクト: FreeReign/imaginenation
        private static bool AllowDMJoin(Mobile from, DMStone dmStone)
        {
            if (dmStone != null)
            {
                if (dmStone.UseSphereRules)
                {
                    if (dmStone.EventSupplier != null)
                    {
                        dmStone.AddPlayer(from);
                        return true;
                    }
                    
                    from.SendAsciiMessage("There is no event supplier connected to the death match");
                }
                else
                {
                    from.SendGump(new PvpAcceptGump(dmStone));
                    return true;
                }
            }
            else
                from.SendMessage("Either a deathmatch has not been started or is full and not accepting players.");

            return false;
        }