Jump to content

Detect Target Immunities (ie: Immune to Diseases)


Apexx
 Share

Recommended Posts

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 by Apexx
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
  }
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...