SetSkills() public method

public SetSkills ( SkillInfo skills ) : void
skills SkillInfo
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Send the skill list to the client.
        /// Skills sorted by Battle, Living and Special.
        /// </summary>
        public void SendSkillList()
        {
            Packets.Server.BattleSkill             bskill = new Packets.Server.BattleSkill(this.Char.BattleSkills.Count);
            Packets.Server.BattleSkill.SkillInfo[] skills = new SagaMap.Packets.Server.BattleSkill.SkillInfo[this.Char.BattleSkills.Count];
            int j = 0;

            foreach (uint i in this.Char.BattleSkills.Keys)
            {
                skills[j].skillID = i;
                skills[j].exp     = this.Char.BattleSkills[i].exp;
                j++;
            }
            bskill.SetSkills(skills);
            if (this.Char.BattleSkills.Count != 0)
            {
                this.netIO.SendPacket(bskill, this.SessionID);
            }
            Packets.Server.LivingSkill             lskill  = new Packets.Server.LivingSkill(this.Char.LivingSkills.Count);
            Packets.Server.LivingSkill.SkillInfo[] skills2 = new SagaMap.Packets.Server.LivingSkill.SkillInfo[this.Char.LivingSkills.Count];
            j = 0;
            foreach (uint i in this.Char.LivingSkills.Keys)
            {
                skills2[j].skillID = i;
                skills2[j].exp     = this.Char.LivingSkills[i].exp;
                j++;
            }
            lskill.SetSkills(skills2);
            if (this.Char.LivingSkills.Count != 0)
            {
                this.netIO.SendPacket(lskill, this.SessionID);
            }
            Packets.Server.SpecialSkill             sskill  = new Packets.Server.SpecialSkill(this.Char.SpecialSkills.Count);
            Packets.Server.SpecialSkill.SkillInfo[] skills3 = new SagaMap.Packets.Server.SpecialSkill.SkillInfo[this.Char.SpecialSkills.Count];
            j = 0;
            foreach (uint i in this.Char.SpecialSkills.Keys)
            {
                skills3[j].skillID = i;
                skills3[j].exp     = this.Char.SpecialSkills[i].exp;
                skills3[j].slot    = this.Char.SpecialSkills[i].slot;
                j++;
                Packets.Server.SetSpecialSkill p1 = new SagaMap.Packets.Server.SetSpecialSkill();
                p1.SetSkill(i);
                p1.SetSlot(this.Char.SpecialSkills[i].slot);
                this.netIO.SendPacket(p1, this.SessionID);
            }
            sskill.SetSkills(skills3);
            if (this.Char.SpecialSkills.Count != 0)
            {
                this.netIO.SendPacket(sskill, this.SessionID);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Send the skill list to the client.
 /// Skills sorted by Battle, Living and Special.
 /// </summary>
 public void SendSkillList()
 {
     Packets.Server.BattleSkill bskill = new Packets.Server.BattleSkill(this.Char.BattleSkills.Count);
     Packets.Server.BattleSkill.SkillInfo[] skills = new SagaMap.Packets.Server.BattleSkill.SkillInfo[this.Char.BattleSkills.Count];
     int j = 0;
     foreach (uint i in this.Char.BattleSkills.Keys)
     {
         skills[j].skillID = i;
         skills[j].exp = this.Char.BattleSkills[i].exp;
         j++;
     }
     bskill.SetSkills(skills);
     if (this.Char.BattleSkills.Count != 0) this.netIO.SendPacket(bskill, this.SessionID);
     Packets.Server.LivingSkill lskill = new Packets.Server.LivingSkill(this.Char.LivingSkills.Count);
     Packets.Server.LivingSkill.SkillInfo[] skills2 = new SagaMap.Packets.Server.LivingSkill.SkillInfo[this.Char.LivingSkills.Count];
     j = 0;
     foreach (uint i in this.Char.LivingSkills.Keys)
     {
         skills2[j].skillID = i;
         skills2[j].exp = this.Char.LivingSkills[i].exp;
         j++;
     }
     lskill.SetSkills(skills2);
     if (this.Char.LivingSkills.Count != 0) this.netIO.SendPacket(lskill, this.SessionID);
     Packets.Server.SpecialSkill sskill = new Packets.Server.SpecialSkill(this.Char.SpecialSkills.Count);
     Packets.Server.SpecialSkill.SkillInfo[] skills3 = new SagaMap.Packets.Server.SpecialSkill.SkillInfo[this.Char.SpecialSkills.Count];
     j = 0;
     foreach (uint i in this.Char.SpecialSkills.Keys)
     {
         skills3[j].skillID = i;
         skills3[j].exp = this.Char.SpecialSkills[i].exp;
         skills3[j].slot = this.Char.SpecialSkills[i].slot;
         j++;
         Packets.Server.SetSpecialSkill p1 = new SagaMap.Packets.Server.SetSpecialSkill();
         p1.SetSkill(i);
         p1.SetSlot(this.Char.SpecialSkills[i].slot);
         this.netIO.SendPacket(p1, this.SessionID);
     }
     sskill.SetSkills(skills3);
     if (this.Char.SpecialSkills.Count != 0) this.netIO.SendPacket(sskill, this.SessionID);
 }