| 101 | } |
| 102 | |
| 103 | bool CharacterIsTalentDisabled(OsiArgumentDesc & args) |
| 104 | { |
| 105 | auto characterGuid = args[0].String; |
| 106 | auto talent = args[1].String; |
| 107 | auto & disabled = args[2].Int32; |
| 108 | |
| 109 | auto character = FindCharacterByNameGuid(characterGuid); |
| 110 | if (character == nullptr) return false; |
| 111 | |
| 112 | auto permanentBoosts = GetCharacterDynamicStat(character, 1); |
| 113 | if (permanentBoosts == nullptr) return false; |
| 114 | |
| 115 | auto talentId = EnumInfo<TalentType>::Find(talent); |
| 116 | if (!talentId) { |
| 117 | OsiError("Talent name is invalid: " << talent); |
| 118 | return false; |
| 119 | } |
| 120 | |
| 121 | disabled = permanentBoosts->IsTalentRemoved(*talentId) ? 1 : 0; |
| 122 | return true; |
| 123 | } |
| 124 | |
| 125 | void CharacterDisableTalent(OsiArgumentDesc const & args) |
| 126 | { |
nothing calls this directly
no test coverage detected