Example #1
0
        public async Task OnPetTamingTryBuild(PetTamingTryBuildMessage msg)
        {
            int CorrectCount = 0;

            foreach (var item in Bricks)
            {
                foreach (Brick item2 in msg.Bricks)
                {
                    if (item.DesignID == item2.DesignID)
                    {
                        CorrectCount += 1;
                    }
                }
            }

            PetTamingTryBuildResultMessage nmsg = new PetTamingTryBuildResultMessage();

            nmsg.Associate     = msg.Associate;
            nmsg.Success       = !(CorrectCount == Bricks.Count);
            nmsg.NumberCorrect = CorrectCount;
            (msg.Associate as Player).Message(nmsg);
        }
Example #2
0
 public async Task PetTamingTryBuildHandler(PetTamingTryBuildMessage message, Player player)
 {
     await player.OnPetTamingTryBuild.InvokeAsync(message);
 }