public bool UseReplaceMoney(GameClient client, int UseNum, DaiBiSySType type, string info, bool isLuckStar = false) { try { if (UseNum == 0) { return(true); } if (!BoCaiConfigMgr.CanReplaceMoney(type)) { return(false); } if (this.UseHuanledaibi(client, UseNum)) { GameManager.logDBCmdMgr.AddDBLogInfo(-1, "欢乐代币代替钻石", info, client.ClientData.RoleName, "系统", "减少", UseNum, client.ClientData.ZoneID, client.strUserID, client.ClientData.UserMoney, client.ServerId, null); LogManager.WriteLog(LogTypes.Info, string.Format("[ljl_欢乐代币]{0}", string.Format("msg={0},subNum={1},type={2},isLuckStar={3},id={4},name={5}", new object[] { info, UseNum, type, isLuckStar, client.ClientData.RoleID, client.ClientData.RoleName })), null, true); return(true); } } catch (Exception ex) { LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_欢乐代币]{0}", ex.ToString()), null, true); } return(false); }
public bool HuanledaibiReplaceEnough(GameClient client, int UseNum, DaiBiSySType type) { try { if (!BoCaiConfigMgr.CanReplaceMoney(type)) { return(false); } return(this.HuanledaibiEnough(client, UseNum)); } catch (Exception ex) { LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_欢乐代币]{0}", ex.ToString()), null, true); } return(false); }
public static bool CanReplaceMoney(DaiBiSySType type) { try { BoCaiConfigMgr.DaiBiShiYongData cfg = BoCaiConfigMgr.DaiBiShiYongCfgList.Find((BoCaiConfigMgr.DaiBiShiYongData x) => x.XiTongMingCheng.Equals(type.ToString())); if (null != cfg) { return(cfg.IsOpen); } } catch (Exception ex) { LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl]{0}", ex.ToString()), null, true); } return(false); }