public void AddChangeGoldList(string sGameMasterName, string sGetGoldUserName, int nGold) { TGoldChangeInfo GoldInfo; GoldInfo = new TGoldChangeInfo(); GoldInfo.sGameMasterName = sGameMasterName; GoldInfo.sGetGoldUser = sGetGoldUserName; GoldInfo.nGold = nGold; m_ChangeGoldList.Add(GoldInfo); }
private unsafe bool ChangeUserGoldInDB(TGoldChangeInfo GoldChangeInfo) { bool result = false; THumDataInfo HumanRcd = new THumDataInfo(); byte nCode = 0; try { if (GoldChangeInfo != null) { nCode = 4; if (RunDB.LoadHumRcdFromDB("1", GoldChangeInfo.sGetGoldUser, "1", &HumanRcd, 1)) { nCode = 1; if (((HumanRcd.Data.nGold + GoldChangeInfo.nGold) > 0) && ((HumanRcd.Data.nGold + GoldChangeInfo.nGold) < 2000000000)) { HumanRcd.Data.nGold += GoldChangeInfo.nGold; nCode = 2; if (RunDB.SaveHumRcdToDB(new TSaveRcd() { sAccount = "1", sChrName = GoldChangeInfo.sGetGoldUser, nSessionID = 1, boIsHero = false, boisDoubleHero = false, btJob = 0, HumanRcd = HumanRcd })) { nCode = 3; UserEngine.sub_4AE514(GoldChangeInfo); result = true; } } } } } catch { M2Share.MainOutMessage("{异常} TFrontEngine.ChangeUserGoldInDB Code:" + nCode); } return(result); }