[DiscordArchive] Why would you look for the files in the first place? What do you want to do with them?
[DiscordArchive] Why would you look for the files in the first place? What do you want to do with them?
Archived author: Honey • Posted: 2024-11-24T13:54:12.591000+00:00
Original source
Why would you look for the files in the first place? What do you want to do with them?
Archived author: OUTRAKE • Posted: 2024-11-24T14:04:40.883000+00:00
Original source
any method to hook on spec change other than
```
void OnSpellCast(Player* player, Spell* spell, bool /*skipCheck*/) override
{
// 63644 - Activate Secondary Spec
// 63645 - Activate Primary Spec
if (spell && (spell->GetSpellInfo()->Id == 63644 || spell->GetSpellInfo()->Id == 63645))
{
if player->HasTankSpec() ...
}
}
```
Archived author: OUTRAKE • Posted: 2024-11-24T14:05:27.614000+00:00
Original source
because hastankspec doesnt return true on spec change
Archived author: OUTRAKE • Posted: 2024-11-24T14:05:52.233000+00:00
Original source
it return true after if you change the spec again, from tank spec to dps spec
Archived author: OUTRAKE • Posted: 2024-11-24T14:17:37.995000+00:00
Original source
this should work? `OnForgotSpell()`
Archived author: OUTRAKE • Posted: 2024-11-24T14:17:46.703000+00:00
Original source
because after spec is changed you learn/forgot spells
![[Image: image.png?ex=690c103c&is=690abebc&hm=141...3407fe63f&]](https://cdn.discordapp.com/attachments/1255602330431127753/1310259751309021195/image.png?ex=690c103c&is=690abebc&hm=141e26a44954259265a86742f6f4af83e9c85ec9011988416ac7e5e3407fe63f&)
Archived author: OUTRAKE • Posted: 2024-11-24T15:04:28.169000+00:00
Original source
this doesnt trigger on change spec abilities
```
void OnLearnSpell(Player* player, uint32 /*spell*/) override
```
![[Image: image.png?ex=690c103c&is=690abebc&hm=141...3407fe63f&]](https://cdn.discordapp.com/attachments/1255602330431127753/1310259751309021195/image.png?ex=690c103c&is=690abebc&hm=141e26a44954259265a86742f6f4af83e9c85ec9011988416ac7e5e3407fe63f&)
Archived author: Revision • Posted: 2024-11-24T15:20:12.290000+00:00
Original source
You don't learn the spells when changing spec, they're already there; they just "activate" when you change spec.
Archived author: OUTRAKE • Posted: 2024-11-24T15:26:30.546000+00:00
Original source
yea there is not hook for that
Archived author: OUTRAKE • Posted: 2024-11-24T15:26:48.606000+00:00
Original source
thats the only solution i found
```
void OnSpellCast(Player* player, Spell* spell, bool /*skipCheck*/) override
{
// 63644 - Activate Secondary Spec
// 63645 - Activate Primary Spec
if (spell && (spell->GetSpellInfo()->Id == 63644 || spell->GetSpellInfo()->Id == 63645))
{
player->m_Events.AddEvent(new ApplyBuffEvent(player), player->m_Events.CalculateTime(5000));
}
}
```