Event when a profession is abandonned
It would be great to send a CHAT_MSG_SKILL event when a profession is abandonned, currently only SKILL_LINES_CHANGED is sent, but since event is triggered a bit too often, it does not allow proper monitoring of professions.
Thus at this point, it's easier to detect when a new profession is gained than to detect when it's abandonned. If a chat message was sent with a parameter like this: ERR_SKILL_ABANDONNED_S = "You have abandonned the %s skill."; -- %s is the skill name I think it would be much easier :) Thao PS: If you guys know valid workarounds, I'm open to suggestions. Edit: I hooked AbandonSkill to do the trick, but I still think an event would be better :) |
You could hook
Code:
AbandonSkill(index) |
Yeah, that's what I did in the end, and it was rather easy after all. But I guess an event would be more natural :)
I had started with SKILL_LINES_CHANGED, but it was triggered so often that the solution I was about to come up with would have been dirty, so I rolled back and started to look for another solution. Here's what I did, if by any chance anyone is interested. Code:
local Orig_AbandonSkill = AbandonSkill |
Another way to see if a player will be removing a skill , as a pre-check and post check you can use the following. Since this is the popup they get before a skill is removed.
Code:
Code:
To be honest AbandonSkill is the best way to do it. But just wanted to post another possible way of checking for player intentions. |
All times are GMT -6. The time now is 03:26 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI