/// <summary> /// Removes all ranks of this talent. /// </summary> internal void Remove(bool update) { Rank = -1; if (update) { TalentHandler.SendTalentGroupList(Talents); } }
/// <summary>Removes all ranks of this talent.</summary> internal void Remove(bool update) { this.Rank = -1; if (!update) { return; } TalentHandler.SendTalentGroupList(this.Talents); }
/// <summary> /// Removes the given amount of arbitrarily selected talents (always removes higher level talents first) /// </summary> public void RemoveTalents(int count) { var trees = Trees; // TODO: Remove depth-first, instead of breadth-first for (var i = 0; i < trees.Length; i++) { var tree = trees[i]; while (m_treePoints[i] > 0 && count > 0) { for (var r = tree.TalentTable.Length - 1; r >= 0; r--) { var row = tree.TalentTable[r]; foreach (var entry in row) { if (entry != null) { var talent = GetTalent(entry.Id); if (talent != null) { if (count >= talent.ActualRank) { count -= talent.ActualRank; talent.Remove(); } else { talent.ActualRank -= count; count = 0; TalentHandler.SendTalentGroupList(this); return; } } } } } } } TalentHandler.SendTalentGroupList(this); }
/// <summary> /// Called within Map Context. /// Sends initial packets /// </summary> private void OnLogin() { InstanceHandler.SendDungeonDifficulty(this); CharacterHandler.SendVerifyWorld(this); AccountDataHandler.SendAccountDataTimes(m_client); VoiceChatHandler.SendSystemStatus(this, VoiceSystemStatus.Disabled); // SMSG_GUILD_EVENT // SMSG_GUILD_BANK_LIST CharacterHandler.SendBindUpdate(this, BindLocation); TutorialHandler.SendTutorialFlags(this); SpellHandler.SendSpellsAndCooldowns(this); CharacterHandler.SendActionButtons(this); FactionHandler.SendFactionList(this); // SMSG_INIT_WORLD_STATES // SMSG_EQUIPMENT_SET_LIST AchievementHandler.SendAchievementData(this); // SMSG_EXPLORATION_EXPERIENCE CharacterHandler.SendTimeSpeed(this); TalentHandler.SendTalentGroupList(m_talents); AuraHandler.SendAllAuras(this); // SMSG_PET_GUIDS }
/// <summary> /// Removes the given amount of arbitrarily selected talents (always removes higher level talents first) /// </summary> public void RemoveTalents(int count) { TalentTree[] trees = Trees; for (int index1 = 0; index1 < trees.Length; ++index1) { TalentTree talentTree = trees[index1]; while (m_treePoints[index1] > 0 && count > 0) { for (int index2 = talentTree.TalentTable.Length - 1; index2 >= 0; --index2) { foreach (TalentEntry talentEntry in talentTree.TalentTable[index2]) { if (talentEntry != null) { Talent talent = GetTalent(talentEntry.Id); if (talent != null) { if (count >= talent.ActualRank) { count -= talent.ActualRank; talent.Remove(); } else { talent.ActualRank -= count; count = 0; TalentHandler.SendTalentGroupList(this); return; } } } } } } } TalentHandler.SendTalentGroupList(this); }