Ejemplo n.º 1
0
        public async Task EquippEgg(Egg aegg, Player player, ISocketMessageChannel chan = null)
        {
            if (egg != null)
            {
                throw NeitsilliaError.ReplyError("You already have an egg in your Egg Pocket.");
            }
            if (Tier < aegg.Tier)
            {
                throw NeitsilliaError.ReplyError("Your Egg Pocket is too low tier to care for this egg.");
            }
            egg = aegg;

            player.Quest_Trigger(Items.Quests.Quest.QuestTrigger.FillEggPocket, $"{egg.Tier}");

            if (chan != null)
            {
                await CompanionCommands.PocketUi(player, chan);
            }
        }
Ejemplo n.º 2
0
        public NPC Hatch(Player player)
        {
            if (egg == null)
            {
                throw NeitsilliaError.ReplyError("Pocket empty");
            }
            NPC baby = egg.Hatch();

            egg = null;
            hatchCount++;

            baby.origin = $"{player.userid}\\{player.name}";
            player.PetList.Pets.Add(new Pet(baby, Pet.PetStatus.Idle));
            player.PetList.Save();

            player.EggPocketKey.Save();

            _ = player.SendMessageToDM($"Your egg has hatched! View your pets using the `Pets` command.");

            return(baby);
        }