public static void AddDailyActivePoints(GameClient client, int DailyActiveID, SystemXmlItem itemDailyActive, bool writeToDB = false) { int awardDailyActiveValue = Math.Max(0, itemDailyActive.GetIntValue("Award", -1)); int nVipLev = client.ClientData.VipLevel; if (nVipLev > 0 && nVipLev <= VIPEumValue.VIPENUMVALUE_MAXLEVEL) { int[] nAddNum = GameManager.systemParamsList.GetParamValueIntArrayByName("VIPHuoYueAdd", ','); if (nAddNum != null && nAddNum.Length > 0 && nAddNum.Length > VIPEumValue.VIPENUMVALUE_MAXLEVEL) { awardDailyActiveValue += nAddNum[nVipLev]; } } if (0 != awardDailyActiveValue) { client.ClientData.DailyActiveValues += awardDailyActiveValue; if (client.ClientData.DailyActiveValues >= 100) { WebOldPlayerManager.getInstance().ChouJiangAddCheck(client.ClientData.RoleID, 1); } client.ClientData.OnlineActiveVal += awardDailyActiveValue; DailyActiveManager.ModifyDailyActiveInfor(client, (uint)client.ClientData.DailyActiveValues, DailyActiveDataField1.DailyActiveValue, writeToDB); if (writeToDB) { } } }
public static void ProcessBuyItemInMallForDailyActive(GameClient client, int nValue) { int xiaoFei = Global.GetRoleParamsInt32FromDB(client, "10175"); xiaoFei += nValue; if (xiaoFei >= 100) { WebOldPlayerManager.getInstance().ChouJiangAddCheck(client.ClientData.RoleID, 2); } Global.SaveRoleParamsInt32ValueToDB(client, "10175", xiaoFei, true); if (!DailyActiveManager.IsDailyActiveCompleted(client, 300)) { if (DailyActiveManager.CheckLevCondition(client, 300)) { uint nSpend = DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveBuyItemInMall); client.ClientData.DailyActiveDayBuyItemInMall += (int)(nSpend + (uint)nValue); DailyActiveManager.ModifyDailyActiveInfor(client, (uint)client.ClientData.DailyActiveDayBuyItemInMall, DailyActiveDataField1.DailyActiveBuyItemInMall, true); bool bIsCompleted = false; DailyActiveManager.CheckSingleConditionForDailyActive(client, 300, 300, (long)client.ClientData.DailyActiveDayBuyItemInMall, "Consumption", out bIsCompleted); } } }