Ejemplo n.º 1
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            GamePlayer player  = source as GamePlayer;
            Scholar    scholar = target as Scholar;

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                IDictionaryEnumerator versionsEnum = versions.GetEnumerator();
                versionsEnum.MoveNext();

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, versionsEnum.Value as ItemTemplate);
                    String reply = String.Format("Thank you! Here, take this cloak. {0}",
                                                 "I hope you find it useful. Please don't lose it, I can't replace it!");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(base.ReceiveItem(source, target, item));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactId, (eCharacterClass)player.CharacterClass.ID, player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactId, versions[";;"]);
                    string reply = $"Do you see how the stars in the band have begun to glow, {player.CharacterClass.Name}? That is because the magic of the bracelet is active again. It shall flow through the Band and into you, then back into the Band. Because of this flow, you may not give the bracelet to anyone else. Destroying the Bracelet will end the flow of magic and once stopped, it cannot be restarted again. May the Band of Stars guide you to success in the trials,  {player.CharacterClass.Name}.";
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactId, (eCharacterClass)player.CharacterClass.ID, player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactId, versions[";;"]);
                    string reply = $"Here is the Healer\'s Embrace Cloak, restored to its original power. It is a fine cloak and I wish I could keep it, but it is for you and you alone. Do not destroy it because you will never have access to its full power again. Take care of it and it shall aid you in the trials, {player.CharacterClass.Name}!";
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                scholar.TurnTo(player);
                if (RemoveItem(player, item))
                {
                    String reply = String.Format("Ahh. These notes are well-preserved. {0} {1} {2}",
                                                 "Here, these bracers are unlike any other artifact. I can unlock one power,",
                                                 "[strength], [constitution], [dexterity], [quickness] or [casting]. You can",
                                                 "only choose one, and can not return for another. Choose wisely.");
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 3;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                scholar.TurnTo(player);
                Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactId, (eCharacterClass)player.CharacterClass.ID, player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactId, versions[";;"]);
                    string reply = $"Can you feel the magic of the Guard of Valor flowing once again? It comes from Aloeus\' love for his beautiful Nikolia. When Aloeus presented the gift to Nikolia, the magic in it bound to her. And now as I present it to you, the magic in it will bind itself to you, so that no other may wear it. I beg you, {player.CharacterClass.Name}, take care not to destroy such a gift! It cannot be replaced! I wish you well, {player.CharacterClass.Name}.";
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(
                    ArtifactId,
                    (eCharacterClass)player.CharacterClass.ID, player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactId, versions[";;"]);
                    string reply = "Brilliant, thank you! Here, take the artifact. I\'ve unlocked its powers for you. As I\'ve said before, I\'m more interested in the stories and the history behind these artifacts than the actual items themselves.";
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactId, (eCharacterClass)player.CharacterClass.ID, player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactId, versions[";;"]);
                    string reply = $"Ahh. This is a tale about some great crazy champion named Remus. There\'s not much known about him, or his father, except what is in this tale. I\'ve read pieces of it, but never did we find all the letters. It\'s a great find. Thank you, {player.Name}.";
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, versions[";;"]);
                    String reply = String.Format("Great! Thanks! This should help us in {0} {1}",
                                                 "our studies. We've found several other references to this shield. Don't know how",
                                                 "much this book will help, but it certainly can't hurt!");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactId, (eCharacterClass)player.CharacterClass.ID, player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactId, versions[";;"]);
                    string reply = "Great! Thanks! This should help us in our studies. We\'ve found several other references to this shield. Don\'t know how much this book will help, but it certainly can\'t hurt!";
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                scholar.TurnTo(player);
                if (RemoveItem(player, item))
                {
                    string reply = $"You now have a decision to make, {player.CharacterClass.Name}. I can unlock your Malice Axe so it uses [slashing] skills or so it uses [crushing] skills. In both cases, I can unlock it as a one-handed weapon or a two-handed one. All you must do is decide which kind of damage you would like to do to your enemies. Once you have chosen, you cannot change your mind.";
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 3;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                scholar.TurnTo(player);
                if (RemoveItem(player, item))
                {
                    String reply = String.Format("You now have a decision to make, {0}. {1} {2} {3} {4} {5}",
                                                 player.CharacterClass.Name,
                                                 "I can unlock your Malice Axe so it uses [slashing] skills or so it uses",
                                                 "[crushing] skills. In both cases, I can unlock it as a one-handed weapon",
                                                 "or a two-handed one. All you must do is decide which kind of damage you",
                                                 "would like to do to your enemies. Once you have chosen, you cannot change",
                                                 "your mind.");
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 3;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    IDictionaryEnumerator versionsEnum = versions.GetEnumerator();
                    versionsEnum.MoveNext();
                    GiveItem(scholar, player, ArtifactID, versionsEnum.Value as ItemTemplate);
                    String reply = String.Format("Here is your staff. Do not lose it, it is irreplaceable.");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                String armorType = GlobalConstants.ArmorLevelToName(player.BestArmorLevel,
                                                                    (eRealm)player.Realm);
                ItemTemplate template = null;
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                foreach (String versionKey in versions.Keys)
                {
                    String[] serializedKey = versionKey.Split(';');
                    if (serializedKey[0] == armorType)
                    {
                        template = versions[versionKey];
                        break;
                    }
                }

                if (template != null && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, template);
                    String reply = String.Format("I feel fortunate to {0} {1} {2} {3} {4}. {5} {6} {7} {8}.",
                                                 "be able to study some of these artifacts that have survived from the days of the",
                                                 "Atlanteans. I am only sad that I shall never get to meet the people that created",
                                                 "wonderful objects like the Arms of the Winds. The magic in them has been",
                                                 "reawakened for you,",
                                                 player.CharacterClass.Name,
                                                 "You must take care of these sleeves because I cannot do it again. If you lose them",
                                                 "or they are  destroyed, the Arms of the Winds will be forever lost to you. I hope",
                                                 "they serve you well,",
                                                 player.CharacterClass.Name);
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                scholar.TurnTo(player);
                if (RemoveItem(player, item))
                {
                    Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID, (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                    String reply = "";

                    if (versions.Count > 1)
                    {
                        reply = "Great! ";
                        DisplayStep3(scholar, player, reply);
                        Step = 3;
                        return(true);
                    }
                    else
                    {
                        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));

                        Dictionary <String, ItemTemplate> .Enumerator venum = versions.GetEnumerator();
                        venum.MoveNext();

                        if (GiveItem(scholar, player, ArtifactID, venum.Current.Value))
                        {
                            scholar.TurnTo(player);
                            scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                            FinishQuest();
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                String armorType = GlobalConstants.ArmorLevelToName(player.BestArmorLevel,
                                                                    (eRealm)player.Realm);
                ItemTemplate template = null;
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                foreach (String versionKey in versions.Keys)
                {
                    String[] serializedKey = versionKey.Split(';');
                    if (serializedKey[0] == armorType)
                    {
                        template = versions[versionKey];
                        break;
                    }
                }

                if (template != null && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, template);
                    String reply = String.Format("The spell is complete and the magic {0} {1}! {2} {3} {4}",
                                                 "of the Leggings has been reawakened from its long sleep! But heed this warning,",
                                                 player.CharacterClass.Name,
                                                 "Take good care of these leggings, because the magic contained within them is",
                                                 "fragile and if the leggings are lost or destroyed, the magic will be gone forever.",
                                                 "May these leggings serve you well as you travel through the trial planes.");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

            if (!(source is GamePlayer player) || !(target is Scholar scholar))
            {
                return(false);
            }

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactId)
            {
                scholar.TurnTo(player);
                if (RemoveItem(player, item))
                {
                    Dictionary <string, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactId, (eCharacterClass)player.CharacterClass.ID, player.Realm);

                    string reply;

                    if (versions.Count > 1)
                    {
                        reply = "Great! ";
                        DisplayStep3(scholar, player, reply);
                        Step = 3;
                        return(true);
                    }

                    reply = $"The magic of Eirene\'s Chestpiece is unlocked 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)}, {player.CharacterClass.Name}!";

                    using (Dictionary <string, ItemTemplate> .Enumerator venum = versions.GetEnumerator())
                    {
                        venum.MoveNext();

                        if (GiveItem(scholar, player, ArtifactId, venum.Current.Value))
                        {
                            scholar.TurnTo(player);
                            scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                            FinishQuest();
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                String armorType = GlobalConstants.ArmorLevelToName(player.BestArmorLevel,
                                                                    (eRealm)player.Realm);
                ItemTemplate template = null;
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                foreach (String versionKey in versions.Keys)
                {
                    String[] serializedKey = versionKey.Split(';');
                    if (serializedKey[0] == armorType)
                    {
                        template = versions[versionKey];
                        break;
                    }
                }

                if (template != null && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, template);
                    String reply = String.Format("Here, take these boots! I hope you find {0}",
                                                 "them useful. Don't lose them, I can only unlock their power for you once!");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, versions[";;"]);
                    String reply = String.Format("Do you see how the stars in the {0} {1}? {2} {3} {4} {5} {6} {7}.",
                                                 "band have begun to glow, ",
                                                 player.CharacterClass.Name,
                                                 "That is because the magic of the bracelet is active again. It shall flow through",
                                                 "the Band and into you, then back into the Band. Because of this flow, you may not",
                                                 "give the bracelet to anyone else. Destroying the Bracelet will end the flow of",
                                                 "magic and once stopped, it cannot be restarted again. May the Band of Stars guide",
                                                 "you to success in the trials, ",
                                                 player.CharacterClass.Name);
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                scholar.TurnTo(player);
                if (RemoveItem(player, item))
                {
                    String reply = String.Format("Great! Now, I can make you a [single] handed or [double] handed version");

                    switch (player.CharacterClass.ID)
                    {
                    case (int)eCharacterClass.Armsman:
                        reply += " or I can make you a [polearm] version. Which would you prefer?";
                        break;

                    default:
                        reply += ", which would you prefer?";
                        break;
                    }

                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    Step = 3;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step > -1 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, versions[";;"]);
                    String reply = String.Format("Here is the {0}, {1} {2} {3} {4}, {5}!",
                                                 "restored to its original power. It is a fine item and I wish I could keep",
                                                 "it, but it is for you and you alone. Do not destroy it because you will never",
                                                 "have access to its full power again. Take care of it and it shall aid you in",
                                                 "the trials",
                                                 ArtifactID,
                                                 player.CharacterClass.Name);
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, versions[";;"]);
                    String reply = String.Format("Ahh. This is a tale about some great {0} {1} {2} {3}.",
                                                 "crazy champion named Remus. There's not much known about him, or his father,",
                                                 "except what is in this tale. I've read pieces of it, but never did we find all",
                                                 "the letters. It's a great find. Thank you,",
                                                 player.Name);
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Handle an item given to the scholar.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="item"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        public override bool ReceiveItem(GameLiving source, GameLiving target, InventoryItem item)
        {
            if (base.ReceiveItem(source, target, item))
            {
                return(true);
            }

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

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

            if (Step == 2 && ArtifactMgr.GetArtifactID(item.Name) == ArtifactID)
            {
                Dictionary <String, ItemTemplate> versions = ArtifactMgr.GetArtifactVersions(ArtifactID,
                                                                                             (eCharacterClass)player.CharacterClass.ID, (eRealm)player.Realm);

                if (versions.Count > 0 && RemoveItem(player, item))
                {
                    GiveItem(scholar, player, ArtifactID, versions[";;"]);
                    String reply = String.Format("Brilliant, thank you! Here, take the artifact. {0} {1} {2}",
                                                 "I've unlocked its powers for you. As I've said before, I'm more interested",
                                                 "in the stories and the history behind these artifacts than the actual items",
                                                 "themselves.");
                    scholar.TurnTo(player);
                    scholar.SayTo(player, eChatLoc.CL_PopupWindow, reply);
                    FinishQuest();
                    return(true);
                }
            }

            return(false);
        }