Exemplo n.º 1
0
        public bool CanAccept(PlayerObject player)
        {
            if (RequiredMinLevel > player.Level || RequiredMaxLevel < player.Level)
            {
                return(false);
            }

            if (RequiredQuest > 0 && !player.CompletedQuests.Contains(RequiredQuest))
            {
                return(false);
            }

            if (HeroQuest && (!player.GainedHero || player.Hero == null || !player.Hero.isSpawn))
            {
                player.ReceiveChat("You need to have hero spawned!", ChatType.System);
                return(false);
            }

            switch (player.Class)
            {
            case MirClass.Warrior:
                if (!RequiredClass.HasFlag(RequiredClass.Warrior))
                {
                    return(false);
                }
                break;

            case MirClass.Wizard:
                if (!RequiredClass.HasFlag(RequiredClass.Wizard))
                {
                    return(false);
                }
                break;

            case MirClass.Taoist:
                if (!RequiredClass.HasFlag(RequiredClass.Taoist))
                {
                    return(false);
                }
                break;

            case MirClass.Assassin:
                if (!RequiredClass.HasFlag(RequiredClass.Assassin))
                {
                    return(false);
                }
                break;

            case MirClass.Archer:
                if (!RequiredClass.HasFlag(RequiredClass.Archer))
                {
                    return(false);
                }
                break;
            }

            return(true);
        }
Exemplo n.º 2
0
        public bool CanAccept(PlayerObject player)
        {
            if (RequiredMinLevel > player.Level || RequiredMaxLevel < player.Level)
            {
                return(false);
            }

            if (RequiredQuest > 0 && !player.CompletedQuests.Contains(RequiredQuest))
            {
                return(false);
            }

            switch (player.Class)
            {
            case MirClass.Warrior:
                if (!RequiredClass.HasFlag(RequiredClass.Warrior))
                {
                    return(false);
                }
                break;

            case MirClass.Wizard:
                if (!RequiredClass.HasFlag(RequiredClass.Wizard))
                {
                    return(false);
                }
                break;

            case MirClass.Taoist:
                if (!RequiredClass.HasFlag(RequiredClass.Taoist))
                {
                    return(false);
                }
                break;

            case MirClass.Assassin:
                if (!RequiredClass.HasFlag(RequiredClass.Assassin))
                {
                    return(false);
                }
                break;

            case MirClass.Archer:
                if (!RequiredClass.HasFlag(RequiredClass.Archer))
                {
                    return(false);
                }
                break;
            }

            return(true);
        }
Exemplo n.º 3
0
        public bool CanAccept(PlayerObject player)
        {
            if (RequiredMinLevel > player.Level || RequiredMaxLevel < player.Level)
            {
                return(false);
            }

            if (RequiredQuest > 0 && !player.CompletedQuests.Contains(RequiredQuest))
            {
                return(false);
            }

            switch (player.Class)
            {
            case MirClass.战士:
                if (!RequiredClass.HasFlag(RequiredClass.战士))
                {
                    return(false);
                }
                break;

            case MirClass.法师:
                if (!RequiredClass.HasFlag(RequiredClass.法师))
                {
                    return(false);
                }
                break;

            case MirClass.道士:
                if (!RequiredClass.HasFlag(RequiredClass.道士))
                {
                    return(false);
                }
                break;

            case MirClass.刺客:
                if (!RequiredClass.HasFlag(RequiredClass.刺客))
                {
                    return(false);
                }
                break;

            case MirClass.弓箭手:
                if (!RequiredClass.HasFlag(RequiredClass.弓箭手))
                {
                    return(false);
                }
                break;

            case MirClass.碧血战士:
                if (!RequiredClass.HasFlag(RequiredClass.碧血战士))
                {
                    return(false);
                }
                break;

            case MirClass.虹玄法师:
                if (!RequiredClass.HasFlag(RequiredClass.虹玄法师))
                {
                    return(false);
                }
                break;

            case MirClass.翊仙道士:
                if (!RequiredClass.HasFlag(RequiredClass.翊仙道士))
                {
                    return(false);
                }
                break;

            case MirClass.飞燕刺客:
                if (!RequiredClass.HasFlag(RequiredClass.飞燕刺客))
                {
                    return(false);
                }
                break;

            case MirClass.暗鬼弓手:
                if (!RequiredClass.HasFlag(RequiredClass.暗鬼弓手))
                {
                    return(false);
                }
                break;
            }

            return(true);
        }