Ejemplo n.º 1
0
 private void EventSink_SkillGain(SkillGainEventArgs e)
 {
     if (e.From is PlayerMobile && e.Skill.SkillID == (int)m_Skill)
     {
         if (e.Skill.BaseFixedPoint >= CompletionTotal)
         {
             AchievmentSystem.SetAchievementStatus(e.From as PlayerMobile, this, e.Skill.BaseFixedPoint);
         }
     }
 }
Ejemplo n.º 2
0
        private static void EventSink_SkillGain(SkillGainEventArgs e)
        {
            string content = "";

            if (e.From is PlayerMobile)
            {
                double oldSkill = e.Skill.Base - ((double)e.Gained / 10);
                if (e.Skill.Base >= 100 && oldSkill < 100)
                {
                    content = String.Format("{0} has become a GrandMaster {1}", e.From.Name, e.Skill.Info.Title);
                    var json     = "{\"content\": \"" + content + "\"}";
                    var msg      = new StringContent(json, Encoding.UTF8, "application/json");
                    var response = client.PostAsync(url, msg);
                    Console.WriteLine(json);
                }
                if (e.Skill.Base >= 120 && oldSkill < 120)
                {
                    content = String.Format("{0} has become a Legendary {1}", e.From.Name, e.Skill.Info.Title);
                    var json     = "{\"content\": \"" + content + "\"}";
                    var msg      = new StringContent(json, Encoding.UTF8, "application/json");
                    var response = client.PostAsync(url, msg);
                }
            }
        }