View Single Post
  #7  
Old 03-17-2013, 03:58 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

thinking about this some more, I would not just walk the hate list as pets will be there too.
walk the list each time the event hits. and check if it is a client. if so add it to a list of names in an array declared at spawn.

once that array is up to 6, if GetName or GetOwner is not one of the 6 names then port them.

depending on how you want to handle a fail, you can reset the 6 names to nothing when the mob leaves combat. or set a time to reset the names if you are going to give them a chance to regroup before anyone else can do anything.

if you have any kind of massive damage ability with a range greater than the aggro range, you may want to rethink a few other things as people could easily do something like a mana burn or crit big damage spell or something in a large 1 shot blast. it will still do the damage and then add the person to the hate list which would then port them. but the damage would already be done.
Reply With Quote