/// <summary> /// 获取喝的二锅头的当前收益 /// </summary> /// <param name="client"></param> /// <returns></returns> public string GetErGuoTouBufferExperience(GameClient client) { BufferData bufferData = Global.GetBufferDataByID(client, (int)BufferItemTypes.ErGuoTou); if (null == bufferData) { return("0"); } if (Global.IsBufferDataOver(bufferData)) { return("0"); } //判断如果是否在打坐,则自动增加经验和内力值 RoleSitExpItem roleSitExpItem = null; if (client.ClientData.Level < Data.RoleSitExpList.Length) { roleSitExpItem = Data.RoleSitExpList[client.ClientData.Level]; } //经验的收益 if (null != roleSitExpItem) { int experience = roleSitExpItem.Experience; double dblExperience = 1.0; //这儿应该是双倍烤火时间(后期加入) if (SpecailTimeManager.JugeIsDoulbeKaoHuo()) { dblExperience += 1.0; } //如果是处于组队状态,则有经验加成 //处理组队状态下的祝福经验加成 dblExperience += Global.ProcessTeamZhuFuExperience(client); double multiExpNum = (bufferData.BufferVal & 0x00000000FFFFFFFF) - 1.0; //增加额外的倍数 dblExperience += multiExpNum; //处理双倍经验的buffer experience = (int)(experience * dblExperience); return(experience.ToString()); } return("0"); }
public string GetErGuoTouBufferExperience(GameClient client) { BufferData bufferData = Global.GetBufferDataByID(client, 48); string result; if (null == bufferData) { result = "0"; } else if (Global.IsBufferDataOver(bufferData, 0L)) { result = "0"; } else { RoleSitExpItem roleSitExpItem = null; if (client.ClientData.Level < Data.RoleSitExpList.Length) { roleSitExpItem = Data.RoleSitExpList[client.ClientData.Level]; } if (null != roleSitExpItem) { int experience = roleSitExpItem.Experience; double dblExperience = 1.0; if (SpecailTimeManager.JugeIsDoulbeKaoHuo()) { dblExperience += 1.0; } dblExperience += Global.ProcessTeamZhuFuExperience(client); double multiExpNum = (double)(bufferData.BufferVal & (long)0xffff_ffffUL) - 1.0; dblExperience += multiExpNum; result = ((int)((double)experience * dblExperience)).ToString(); } else { result = "0"; } } return(result); }