IDLE RAID: Optimize several functions

Fix the problem that sometimes the number of rewards for watching ads is incorrect Optimize several functions.