예제 #1
0
        /// <summary>
        /// When someone interacts with this scholar
        /// </summary>
        /// <param name="player"></param>
        /// <returns></returns>
        public override bool Interact(GamePlayer player)
        {
            if (player != null)
            {
                lock (QuestListToGive.SyncRoot)
                {
                    // See if they player has the quest first
                    foreach (AbstractQuest quest in player.QuestList)
                    {
                        if (quest is ArtifactTurnInQuest && HasQuest(quest.GetType()) != null)
                        {
                            if ((quest as ArtifactTurnInQuest).Interact(player, this))
                            {
                                return(true);
                            }
                        }
                    }

                    // Give the intro text
                    foreach (ArtifactTurnInQuest quest in QuestListToGive)
                    {
                        List <string> arts = ArtifactMgr.GetArtifacts(player);
                        foreach (string art in arts)
                        {
                            Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(
                                art,
                                (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);
                            if (versions.Count > 1)
                            {
                                SayTo(player, string.Format("{0}, I see that you carry {1}. If you are interested, I will exchange yours for you but there is a price to pay for the change. Any experience or levels your artifact has gained will be lost when the change occurs. Are you still [interested]?", player.CharacterClass.Name, art));
                            }
                        }

                        return(true);
                    }
                }
            }

            return(base.Interact(player));
        }
예제 #2
0
        public override LootList GenerateLoot(GameNPC mob, GameObject killer)
        {
            LootList lootList = new LootList();

            // check to see if we are in ToA
            if (mob.CurrentRegion.Expansion == (int)eClientExpansion.TrialsOfAtlantis && killer.CurrentRegion.Expansion == (int)eClientExpansion.TrialsOfAtlantis)
            {
                if (mob.Level >= 45 && Util.Chance(ServerProperties.Properties.SCROLL_DROP_RATE))
                {
                    List <Artifact> artifacts = new List <Artifact>();

                    if (mob.CurrentRegion.IsDungeon && Util.Chance((int)(ServerProperties.Properties.SCROLL_DROP_RATE * 1.5)))
                    {
                        artifacts = ArtifactMgr.GetArtifacts();
                    }
                    else
                    {
                        switch (mob.CurrentZone.Description)
                        {
                        case "Oceanus Hesperos":
                        case "Mesothalassa":
                        case "Oceanus Notos":
                        case "Oceanus Boreal":
                        case "Oceanus Anatole":
                            artifacts = ArtifactMgr.GetArtifacts("Oceanus");
                            break;

                        case "Stygian Delta":
                        case "Land of Atum":
                            artifacts = ArtifactMgr.GetArtifacts("Stygia");
                            break;

                        case "Arbor Glen":
                        case "Green Glades":
                            artifacts = ArtifactMgr.GetArtifacts("Aerus");
                            break;

                        case "Typhon's Reach":
                        case "Ashen Isles":
                            artifacts = ArtifactMgr.GetArtifacts("Volcanus");
                            break;
                        }
                    }

                    if (artifacts.Count > 0)
                    {
                        string artifactID = artifacts[Util.Random(artifacts.Count - 1)].ArtifactID;
                        int    pageNumber;

                        ItemTemplate loot = new ItemTemplate();
                        loot.AllowAdd = false;

                        if (mob.Level > 55)
                        {
                            pageNumber = 3;
                        }
                        else if (mob.Level >= 51)
                        {
                            pageNumber = 2;
                        }
                        else
                        {
                            pageNumber = 1;
                        }

                        loot.Model = 488;
                        loot.Name  = "scroll|" + artifactID + "|" + pageNumber;
                        loot.Level = 35;

                        lootList.AddFixed(loot, 1);
                    }
                }
            }

            return(lootList);
        }