示例#1
0
        public static bool TSystem_AllowHarmful(Mobile from, Mobile target)
        {
            if (StaticRef != null)
            {
                if (StaticRef.Started)
                {
                    if (StaticRef.IsParticipant(from) || StaticRef.IsParticipant(target))
                    {
                        if (StaticRef.AreOpponents(from, target))
                        {
                            return(true);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }

            #region Dueling System
            if (DuelCore.Enabled && from != target)
            {
                Duel fDuel = DuelCore.FindActiveDuel(from);
                Duel tDuel = DuelCore.FindActiveDuel(target);

                if (fDuel != null || tDuel != null)
                {
                    return(fDuel == tDuel);
                }
            }
            #endregion

            return(NotorietyHandlers.Mobile_AllowHarmful(from, target));
        }
示例#2
0
        public static int TSystem_Notoriety(Mobile source, Mobile target)
        {
            if (StaticRef != null)
            {
                if (StaticRef.Started)
                {
                    if (StaticRef.IsParticipant(source) || StaticRef.IsParticipant(target))
                    {
                        if (StaticRef.AreOpponents(source, target))
                        {
                            return(Notoriety.Enemy);
                        }
                        else if (StaticRef.AreAllies(source, target))
                        {
                            return(Notoriety.Ally);
                        }
                        else
                        {
                            return(Notoriety.Invulnerable);
                        }
                    }
                }
            }

            #region Dueling System
            if (DuelCore.Enabled)
            {
                Duel fDuel = DuelCore.FindActiveDuel(source);
                Duel tDuel = DuelCore.FindActiveDuel(target);

                if (fDuel != null || tDuel != null)
                {
                    if (fDuel == tDuel)
                    {
                        return(source == target ? Notoriety.Ally : Notoriety.Enemy);
                    }
                    else
                    {
                        return(Notoriety.Invulnerable);
                    }
                }
            }
            #endregion

            return(NotorietyHandlers.MobileNotoriety(source, target));
        }