コード例 #1
0
ファイル: TalentHandler.cs プロジェクト: pallmall/WCell
		/// <summary>
		/// Sends a request to wipe all talents, which must be confirmed by the player
		/// </summary>
		public static void SendClearQuery(IHasTalents thing)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.MSG_TALENT_WIPE_CONFIRM, 12))
			{
				packet.Write(thing.EntityId);
				packet.Write(thing.Talents.ResetAllPrice);

				thing.Client.Send(packet);
			}
		}
コード例 #2
0
ファイル: TalentHandler.cs プロジェクト: pallmall/WCell
		/// <summary>
        /// Sends the client the list of talents
        /// </summary>
        /// <param name="hasTalents">The IHasTalents to send the list from</param>
        public static void SendTalentGroupList(IHasTalents hasTalents, int talentGroupId)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_TALENT_GROUP_LIST))
            {
                var isPlayer = (hasTalents is Character);

                packet.Write((byte)(isPlayer ? 0 : 1));
                if (isPlayer)
				{
					WritePlayerTalentList(packet, (Character)hasTalents, talentGroupId);
                }
                else
				{
					packet.Write(hasTalents.FreeTalentPoints);
					packet.Write((byte)hasTalents.Talents.Count);
					foreach (var talent in hasTalents.Talents)
					{
						packet.Write((int)talent.Entry.Id);
						packet.Write((byte)talent.Rank);
					}
                }
                hasTalents.Client.Send(packet);
            }
        }
コード例 #3
0
ファイル: TalentHandler.cs プロジェクト: pallmall/WCell
        public static void SendTalentGroupList(IHasTalents hasTalents)
        {
			SendTalentGroupList(hasTalents, hasTalents.SpecProfile != null ? hasTalents.SpecProfile.TalentGroupInUse : 0);
        }