function invest(address _addr, uint256 _affID, uint256 _mfCoin, uint256 _general)
        external
        isActivated()
        payable
    {
        require(milAuth_.checkGameRegiester(msg.sender), "game no register");
        require(_mfCoin.add(_general) <= msg.value, "account is insufficient");

        if (msg.value > 0) {
            uint256 tmpAffID = 0;
            if (_affID == 0 || plyrAddr_[_affID] == _addr) {
                tmpAffID = plyr_[_addr].laff;
            } else if (plyr_[_addr].laff == 0 && plyrAddr_[_affID] != address(0)) {
                plyr_[_addr].laff = _affID;
                tmpAffID = _affID;
            }
            
            
            uint256 _affiliate = msg.value.sub(_mfCoin).sub(_general);
            if (tmpAffID > 0 && _affiliate > 0) {
                address affAddr = plyrAddr_[tmpAffID];
                plyr_[affAddr].affTotal = plyr_[affAddr].affTotal.add(_affiliate);
                plyr_[affAddr].eth = plyr_[affAddr].eth.add(_affiliate);
                emit onAffiliatePayout(affAddr, _addr, _affiliate, block.timestamp);
            }

            if (totalSupply_ > 0) {
                uint256 delta = _general.mul(1 ether).div(totalSupply_);
                globalMask_ = globalMask_.add(delta);
            } else {
                
                fundAddr_.transfer(_general);
            }

            updateGenVault(_addr);
            
            buyMFCoins(_addr, _mfCoin);

            emit onUpdateGenVault(_addr, balance_[_addr], plyr_[_addr].genTotal, plyr_[_addr].eth);
        }
    }