/// <summary> /// 用户金币保存并推送 /// </summary> private void GoldSaveAndSend(tg_user user, BaseBuyPower baseinfo, Int64 userid) { user.gold -= baseinfo.gold; user.Save(); if (!Variable.OnlinePlayer.ContainsKey(userid)) { return; } var session = Variable.OnlinePlayer[userid] as TGGSession; if (session == null) { return; } session.Player.User = user; Common.GetInstance().RewardsToUser(session, user, (int)GoodsType.TYPE_GOLD); }
/// <summary> /// 用户金币保存并推送 /// </summary> private void GoldSaveAndSend(tg_user user, BaseBuyPower baseinfo, Int64 userid) { user.gold -= baseinfo.gold; user.Save(); if (!Variable.OnlinePlayer.ContainsKey(userid)) { return; } var session = Variable.OnlinePlayer[userid] as TGGSession; if (session == null) { return; } session.Player.User = user; new Share.User().REWARDS_API((int)GoodsType.TYPE_GOLD, user); }