Apexx 42 Posted November 9, 2020 Share Posted November 9, 2020 (edited) I was surfing the forums, and Google for about 20 minutes looking for anything to help me figure this out. I am writing a fight class using C#, and Lua. For the first time I ran into a problem where the combatants I was fighting with were immune to my "Devouring Plague" and was left wasting mana, because each mob was immune to diseases. Is there anything to catch such a thing? Thank you! Edit* Mob entity: https://wotlkdb.com/?npc=32400 There's no real information regarding immunizes. Edited November 9, 2020 by Apexx Quote Link to post Share on other sites
Matenia 557 Posted November 9, 2020 Share Posted November 9, 2020 I hardcode lists and partially rely on user feedback. Now you could parse combat log events, store the results per mob entry and maybe even serialize them. That way, you're good to go. Unfortunate though, if mobs are immune for only a few seconds and you never use certain spells anymore because they temporarily immuned thanks to a buff. Although I guess you could write some smart detection for a "buff state" in combination with the school/spell. Spell school can be ready from spell info and combatlog iirc. Apexx 1 Quote Link to post Share on other sites
Zer0 69 Posted November 9, 2020 Share Posted November 9, 2020 This is how I do it (TBC). Although as Matenia pointed out, some mobs might only be temporary immune to a school. That being said, I'd rather handle those rare exceptions than random immunities that differ from server to server. EventsLuaWithArgs.OnEventsLuaWithArgs += LuaEventsHandler; private void LuaEventsHandler(LuaEventsId id, List<string> args) { if (args[11] == "IMMUNE")) { Logging.Write($"{ObjectManager.Target.Name} is immune to {args[9]}"); // Your code to handle spell ban // args[9] is the name of the spell } } Apexx 1 Quote Link to post Share on other sites
Apexx 42 Posted November 9, 2020 Author Share Posted November 9, 2020 Perfect! Thank you very much, I will try this out soon. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.