View Single Post
06/28/18, 01:40 PM   #4
ziggr
 
ziggr's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 27
Originally Posted by sirinsidiator View Post
You call promote/demote in a loop without any interval inbetween in your SetRank function. Every single of these calls is counted towards the command spam limit. You will have to isolate each call in order to not get kicked.
Oh yeah. Forgot about that loop. It's only 1-3 promotions/demotions per player, but yeah, that adds up.
Also, not shown here, I make ~500 GetGuildMemberInfo() calls, in a tight loop, before starting the zo_callLater() promote/demote sequence. Those calls probably count against the command spam limit, which means I'm starting on thin ice.

I'll add a big delay after the GetGuildMemberInfo() loop, and de-loop the promote/demote cycle.

And not test this until I'm done with my dailies, just in case I get another 10-minute time out. ^_^

Thank you for the code review and shared wisdom!

--- edit ---
Success!

1. Remove the 500x GetGuildMemberInfo() loop at the start. Replace with individual GetGuildMemberIndexFromDisplayName() + GetGuildMemberInfo() calls inside the zo_callLater() sequence.
2. Increase zo_callLater() delay to 10 seconds between each guild member's promotion/demotion. Took 900 seconds to get through 90 guildies.

Was still able to promote/demote in a for-loop for those few guildies who were moved 2 or 3 ranks.

--Z

Last edited by ziggr : 06/28/18 at 02:09 PM. Reason: Success!
  Reply With Quote