示例#1
0
    void OnQuestReward(C2G.QuestReward packet, C2G.QuestRewardAck ack)
    {
        m_Quest.Data.rewarded     = true;
        m_Quest.Data.daily_index  = Network.DailyIndex;
        m_Quest.Data.weekly_index = Network.WeeklyIndex;
        m_Quest.CheckComplete();
        QuestManager.Instance.SetUpdateNotify();

        var player_levelup = Network.PlayerInfo.UpdateExp(ack.player_add_exp_info);

        if (player_levelup.old_level < player_levelup.new_level)
        {
            TeamLevelUp.Instance.Show(player_levelup);
        }

        Network.Instance.ProcessReward3Ack(ack.reward_ack);

        Popup.Instance.Show(ePopupMode.Reward, m_Quest.Info.Rewards, m_Quest.Info.Title, Localization.Get("GetThisRewards"), (C2G.Reward3Ack)ack.reward_ack);
        if (OnRewardCallback != null)
        {
            OnRewardCallback();
        }
    }
示例#2
0
 public void OnReward()
 {
     C2G.QuestReward packet = new C2G.QuestReward();
     packet.quest_id = m_Quest.Info.ID;
     Network.GameServer.JsonAsync <C2G.QuestReward, C2G.QuestRewardAck>(packet, OnQuestReward);
 }