void OnAttendRewardGetAckHandler(C2G.AttendRewardGet packet, C2G.AttendRewardGetAck ack) { m_Attend.SetReward(ack.take_count); m_RewardItems[packet.take_count].SetReward(); if (Network.Instance.UnreadMailState == PacketEnums.pe_UnreadMailState.None) { Network.Instance.SetUnreadMail(PacketEnums.pe_UnreadMailState.UnreadMail); } Tooltip.Instance.ShowMessageKey("AttendRewarded"); }
public void OnSendBtnClick() { if (m_Attend.Data.take_count < m_Attend.Data.take_count_max) { foreach (var item in m_RewardItems) { if (item.IsRewarded == false && item.IsEnabled == true) { C2G.AttendRewardGet _AttendRewardGet = new C2G.AttendRewardGet(); _AttendRewardGet.attend_idn = m_Attend.Data.attend_idn; _AttendRewardGet.take_count = m_Attend.Data.take_count; _AttendRewardGet.is_additional = m_Attend.Data.last_daily_index == Network.DailyIndex; Network.GameServer.JsonAsync <C2G.AttendRewardGet, C2G.AttendRewardGetAck>(_AttendRewardGet, OnAttendRewardGetAckHandler); return; } } } Tooltip.Instance.ShowMessageKey("AttendNoRewards"); }