function affReward(Bet thisBet, uint256 betID)
        private {
        
        if(thisBet.laff > 0)
        {
            uint laff_1_reward_max = thisBet.amountBet * edge / 10000;
            uint laff_1_reward = thisBet.amountBet * edge * dealer_level_1_reward / (10000 * 100);
            if(laff_1_reward >= dealerMinReward && laff_1_reward < laff_1_reward_max)
            {

                address laff_1_address = PlayerBook.getPlayerAddr(thisBet.laff);
                dealer_reward_total += laff_1_reward;
                safeSend(laff_1_address, laff_1_reward);
                PlayerBook.rewardXID(thisBet.laff, laff_1_reward, betID, 1);


                uint laff_2_pid = PlayerBook.getPlayerLAff(thisBet.laff);
                uint laff_2_reward = thisBet.amountBet * edge * dealer_level_2_reward / (10000 * 100);
                if(laff_2_pid>0 && laff_2_reward >= dealerMinReward && laff_2_reward < laff_1_reward_max)
                {

                    address laff_2_address = PlayerBook.getPlayerAddr(laff_2_pid);
                    dealer_reward_total += laff_2_reward;
                    safeSend(laff_2_address, laff_2_reward);
                    PlayerBook.rewardXID(laff_2_pid, laff_2_reward, betID, 2);
                }
                
            }
            
        }
    }