Jump to content

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

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.

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

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...