Exemplo n.º 1
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Tell me, {0}, do you have any versions of the Love Story {1} {2} {3} {4}",
                                             player.CharacterClass.Name,
                                             "to go with the Guard of Valor? I have found a few copies, but I am always looking",
                                             "for more. Each one has different information in them that helps me with",
                                             "my research. Please give me the Love Story now while I finish up with",
                                             "the Guard of Valor.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Tartaros' Gift is an interesting staff. The story of its {0} {1}",
                                             "making rather unique, don't you think? If you give me the scroll, I'll give you the",
                                             "staff, with all its ancient powers back.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Vara was a very skilled healer and she put her skills {0} {1} {2}",
                                             "into the Healer's Embrace cloak. It would help me to unlock them if I was to read",
                                             "her Medical Log. Please give me Vara's Medical Log now so that I may awaken the",
                                             "magic within the Cloak for you.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("The magic contained in the Alvarus' Letter has {0} {1} {2} {3}",
                                             "already begun to work on the Leggings while they were in your possession. All I",
                                             "need now are the letters you have bundled up so that the spell will be complete.",
                                             "If you have accidentally lost those letters, you must go and find them before",
                                             "the spell can be completed.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("The Arms of the Winds! If I only had Anthos' {0} {1} {2}",
                                             "Fish Skin. It is important that I have the scales, since Anthos trapped the magic of",
                                             "the Arms of the Winds in the Skin. If you have lost the skin, and I hope you haven't,",
                                             "you will have to go find the scales again and bring them to me.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Do you have the story that goes along with that? {0} {1}",
                                             "If you do, hand it in to me, and I will unlock the power that these boots had",
                                             "been vested with. If not, go get the story!");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Some of the other scholars have been {0} {1} {2} {3} {4}",
                                             "studying this shield. It belonged to someone named Remus, supposedly a great champion.",
                                             "Do you happen to have the story of the Aten Shield? Perhaps it will tell us more of",
                                             "Remus. I'm curious what the Atlanteans considered a great champion. Also, with the story,",
                                             "I should be able to unlock the power of this shield. If you don't have the story, go seek",
                                             "it out amongst the creatures of Oceanus.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = "Oh, the mysterious Belt of the Moon. Do you have the scrolls on it? I've found a few that allude to its true nature, but haven't found anything with any detail.";
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("This bracelet was quite beautiful and powerful. {0} {1} {2}",
                                             "Let's get that power flowing again! Give me the King's Vase and I shall examine it.",
                                             "Once I have uncovered the secrets in the Vase, I shall make the Band of Stars",
                                             "available to you.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Ah, the Shield of Khaos! What do you know of {0} {1}",
                                             "it? Probably as much as we do! Well, do you have the book on it? Come on then, hand it",
                                             "over. I'll unlock this shield's abilities for you once you hand me the book.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            return(false);
        }
Exemplo n.º 11
0
        private void RetrieveDocuments()
        {
            string sql = null;

            try
            {
                sql = string.Format(Database.Resources.RetrieveDocuments, ArtifactID.ToString(), JobArtifactID.ToString());

                // Check for save search
                if (ValidateSavedSearh(JobArtifactID))
                {
                    var ssArtifactId = GetSavedSearchArtifactID(JobArtifactID);
                    FilterBySavedSearch(ssArtifactId);

                    sql = string.Concat(sql, " ", Database.Resources.SavedSearchFilter);
                }

                // Check for File type selection
                if (ValidateFileType(JobArtifactID))
                {
                    var fileTypeCode = GetFileTypeCode();
                    sql = string.Concat(sql, " ", string.Format(Database.Resources.FileTypeFilter, fileTypeCode, JobArtifactID));
                }

                DocumentResult = WorkspaceDBConnection.ExecuteSqlStatementAsDataTable(sql, 300);
                //Reader = WorkspaceDBConnection.ExecuteSQLStatementAsReader(sql, 300);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemplo n.º 12
0
        public static string GetLibraryFullPath(string guid)
        {
            if (String.IsNullOrEmpty(guid))
            {
                return(null);
            }

            string path = AssetDatabase.GUIDToAssetPath(guid);

            if (Path.GetExtension(path).Equals(".asset"))
            {
                return(path);
            }

#if UNITY_2019_2_OR_NEWER
            if (EditorSettings.assetPipelineMode == AssetPipelineMode.Version1)
            {
                return(GetAssetDatabaseVersion1LibraryDataPath(guid));
            }
            else
            {
#if UNITY_2020_2_OR_NEWER
                Hash128 artifactHash = AssetDatabaseExperimental.LookupArtifact(new ArtifactKey(new GUID(guid))).value;
#else
                Hash128 artifactHash = AssetDatabaseExperimental.GetArtifactHash(guid);
#endif

                if (!artifactHash.isValid)
                {
                    return(null);
                }

#if UNITY_2020_2_OR_NEWER
                ArtifactID artifactID = new ArtifactID();
                artifactID.value = artifactHash;
                AssetDatabaseExperimental.GetArtifactPaths(artifactID, out string[] paths);
#else
                AssetDatabaseExperimental.GetArtifactPaths(artifactHash, out string[] paths);
#endif

                foreach (string artifactPath in paths)
                {
                    if (artifactPath.EndsWith(".info"))
                    {
                        continue;
                    }

                    return(Path.GetFullPath(artifactPath));
                }
            }
#else // For older unity versions that dont have asset database V2 yet
            return(return GetAssetDatabaseVersion1LibraryDataPath(guid));
#endif

            return(null);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("There is powerful magic flowing through that artifact, {0}, {1} {2}",
                                             player.CharacterClass.Name,
                                             "but I cannot release it without the spell hidden in the Journal. Please give me Eirene's",
                                             "Journal now. If you no longer have it, go and find the pages again. I will wait for you.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }

            if (Step == 3)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID, (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);
                string version = text + ";;";

                if (versions.ContainsKey(version))
                {
                    if (GiveItem(scholar, player, ArtifactID, versions[version]))
                    {
                        String reply = String.Format("The magic of Eirene's Chestpiece is unlocked {0} {1}. {2} {3} {4} {5}, {1}!",
                                                     "and linked now to you,", player.CharacterClass.Name,
                                                     "Please know that if you lose or destroy this Chestpiece, it will be gone",
                                                     "from you forever. I hope it will help you succeed in the trials.",
                                                     "Bring glory to ", GlobalConstants.RealmToName(player.Realm));
                        scholar.TurnTo(player);
                        scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                        FinishQuest();
                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 14
0
        private void RemoveFromQueue()
        {
            string sql = null;

            try
            {
                sql = string.Format(Database.Resources.RemoveFromCasesQueue, ArtifactID.ToString(), JobArtifactID.ToString());
                EDDSDBConnection.ExecuteNonQuerySQLStatement(sql);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemplo n.º 15
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1)
            {
                if (text.ToLower() == ArtifactID.ToLower())
                {
                    String reply = String.Format("Do you have the story that goes with Cloudsong? {0} {1} {2}",
                                                 "I'd very much like to read it. If you don't, go, get the scrolls and use them.",
                                                 "Then, when you've translated them into a book, return the book to me, and I will",
                                                 "give you the artifact. Do you have the [story]?");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 2;
                    return(true);
                }
            }

            if (text.ToLower() == "story" && Step > 1)
            {
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow,
                              "Well, hand me the story. If you don't have it, go out and get it!");
                return(true);
            }

            return(false);
        }
Exemplo n.º 16
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = "Battler, eh? Careful, when I unlock this sword's abilities, for it has a thirst for blood, from what we've learned of it. Do you have the scrolls that talk about Battler?";
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }
            else if (Step == 3)
            {
                switch (text.ToLower())
                {
                case "slashing":
                case "crushing":
                {
                    SetCustomProperty("DamageType", text.ToLower());
                    String reply = String.Format("Now, would you like your Battler{0} to be {1}",
                                                 (text.ToLower() == "slashing") ? "" : " Mace",
                                                 "[one handed] or [two handed]?");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 4;
                    return(true);
                }
                }
                return(false);
            }
            else if (Step == 4)
            {
                switch (text.ToLower())
                {
                case "one handed":
                case "two handed":
                {
                    String versionID = String.Format("{0};{1};",
                                                     GetCustomProperty("DamageType"), text.ToLower());
                    Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                                 (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);
                    ItemTemplate template = versions[versionID];
                    if (template == null)
                    {
                        log.Warn(String.Format("Artifact version {0} not found", versionID));
                        return(false);
                    }
                    if (GiveItem(scholar, player, ArtifactID, template))
                    {
                        String reply = String.Format("Here you are. Do not lose {0}, for it is irreplaceable.", template.Name);
                        scholar.TurnTo(player);
                        scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                        FinishQuest();
                        return(true);
                    }
                    return(false);
                }
                }
                return(false);
            }

            return(false);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = "Ah, yes, the axe of Malice. It has an interesting tale, but I'm not sure I believe it. Did you find the story of the axe? If you have, please give it to me now.";
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }
            else if (Step == 3)
            {
                switch (text.ToLower())
                {
                case "slashing":
                case "crushing":
                {
                    SetCustomProperty("DamageType", text.ToLower());
                    String reply = String.Format("Would you like your {0} Malice's Axe to be {1}",
                                                 text.ToLower(),
                                                 "[one handed] or [two handed]?");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 4;
                    return(true);
                }
                }
                return(false);
            }
            else if (Step == 4)
            {
                switch (text.ToLower())
                {
                case "one handed":
                case "two handed":
                {
                    String versionID = String.Format("{0};{1};",
                                                     GetCustomProperty("DamageType"), text.ToLower());
                    Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                                 (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);
                    ItemTemplate template = versions[versionID];
                    if (template == null)
                    {
                        log.Warn(String.Format("Artifact version {0} not found", versionID));
                        return(false);
                    }
                    if (GiveItem(scholar, player, ArtifactID, template))
                    {
                        String reply = String.Format("Here's your {0}. May it serve you well. {1}",
                                                     template.Name,
                                                     "Just don't lose it. You can't ever replace it.");
                        scholar.TurnTo(player);
                        scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                        FinishQuest();
                        return(true);
                    }
                    return(false);
                }
                }
                return(false);
            }

            return(false);
        }
Exemplo n.º 18
0
        private void UpdateStatusInQueue(int status)
        {
            string sql = null;

            try
            {
                sql = string.Format(Database.Resources.UpdateCasesQueue, status.ToString(), ArtifactID.ToString(), JobArtifactID.ToString());
                EDDSDBConnection.ExecuteNonQuerySQLStatement(sql);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("Ah, Bruiser! Many smiths would love a hammer {0} {1} {2} {3}",
                                             "such as that! Well, for ",
                                             player.GetName(1, false),
                                             "like you, I am not sure what purpose it will serve! I hope you have better luck than",
                                             "its previous owner! Do you have any scrolls with it?");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }
            else if (Step == 3)
            {
                switch (text.ToLower())
                {
                case "single":
                case "double":
                case "polearm":
                {
                    if (text.ToLower() == "polearm" &&
                        player.CharacterClass.ID != (int)eCharacterClass.Armsman)
                    {
                        return(false);
                    }

                    String versionID = String.Format(";{0};", text.ToLower());
                    Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                                 (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);
                    if (!versions.ContainsKey(versionID))
                    {
                        log.Warn(String.Format("Artifact version {0} not found", versionID));
                        return(false);
                    }
                    ItemTemplate template = versions[versionID];
                    if (GiveItem(scholar, player, ArtifactID, template))
                    {
                        String reply = String.Format("May Bruiser serve you well. Do not lose {0}",
                                                     "this, for I can only unlock the artifact's powers once.");
                        scholar.TurnTo(player);
                        scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                        FinishQuest();
                        return(true);
                    }
                    return(false);
                }
                }
                return(false);
            }

            return(false);
        }
Exemplo n.º 20
0
        /// <summary>
        /// Handle whispers to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public override bool WhisperReceive(GameLiving source, GameLiving target, string text)
        {
            if (base.WhisperReceive(source, target, text))
            {
                return(true);
            }

            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

            if (player == null || scholar == null)
            {
                return(false);
            }

            if (Step == 1 && text.ToLower() == ArtifactID.ToLower())
            {
                String reply = String.Format("The scholars have often remarked about the {0} {1} {2} {3} {4}",
                                             "craftsmanship that went into these bracers. I'm impressed. I don't think we can make",
                                             "anything to compare with it. Hmm. Well, I'm here to study the lifestyles of Atlanteans",
                                             "through their written words, not their crafts. Hand me the Arbiter's Personal Papers",
                                             "please. If you don't have it, I suggest you hunt the creatures of Oceanus til you",
                                             "find it.");
                scholar.TurnTo(player);
                scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                Step = 2;
                return(true);
            }
            else if (Step == 3)
            {
                switch (text.ToLower())
                {
                case "strength":
                case "constitution":
                case "dexterity":
                case "quickness":
                case "casting":
                {
                    String versionID = String.Format(";;{0}", text.ToLower());
                    Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                                 (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);
                    ItemTemplate template = versions[versionID];
                    if (template == null)
                    {
                        log.Warn(String.Format("Artifact version {0} not found", versionID));
                        return(false);
                    }
                    if (GiveItem(scholar, player, ArtifactID, template))
                    {
                        String reply = String.Format("You have made your choice. Here is your {0}",
                                                     "bracer. Do not lose it. It is irreplaceable.");
                        scholar.TurnTo(player);
                        scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                        FinishQuest();
                        return(true);
                    }
                    return(false);
                }
                }
                return(false);
            }

            return(false);
        }
Exemplo n.º 21
0
        private void CheckDocumentQueue()
        {
            string sql    = null;
            object result = null;

            try
            {
                DocumentsQueued = false;
                sql             = string.Format(Database.Resources.DoQueueRecordsExist, ArtifactID.ToString(), JobArtifactID.ToString());
                result          = EDDSDBConnection.ExecuteSqlStatementAsScalar(sql);
                if ((result != null))
                {
                    if (!System.DBNull.Value.Equals(result))
                    {
                        DocumentsQueued = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }