Ejemplo n.º 1
0
    void WriteAckHandler(C2G.CreatureEvalBoardWrite send, C2G.CreatureEvalBoardWriteAck recv)
    {
        if (recv.is_success == true)
        {
            pd_CreatureEvalBoard data = new pd_CreatureEvalBoard();
            data.thumb_info = new pd_ThumbInfo();
            data.thumb_info.leader_creature = Network.PlayerInfo.leader_creature;
            data.thumb_info.nickname        = Network.PlayerInfo.nickname;
            data.thumb_info.player_level    = Network.PlayerInfo.player_level;
            data.thumb_info.account_idx     = SHSavedData.AccountIdx;
            data.bad           = 0;
            data.good          = 0;
            data.board_idx     = recv.board_idx;
            data.is_best       = false;
            data.message       = recv.message;
            data.my_eval_state = pe_EvalState.None;

            item_list.Add(data);

            DrawItems();
            m_EvalBoardScroll.ResetPosition();

            m_InputMessageLabel.value = string.Empty;

            Tooltip.Instance.ShowMessageKey("EvalWriteComplete");
        }
        else
        {
            Popup.Instance.Show(ePopupMode.Message, Localization.Format("EvalWroteError", 1));
        }
    }
Ejemplo n.º 2
0
    public void OnClickWriteConfirmBtn()
    {
        if (m_InputMessageLabel.value.Equals(Localization.Get("EvalInputStartingMsg")) == true)
        {
            return;
        }

        if (m_InputMessageLabel.value.Length < 6 || m_InputMessageLabel.value.Length > 150)
        {
            Tooltip.Instance.ShowMessageKey("EvalInputErrorMsg");
            return;
        }

        C2G.CreatureEvalBoardWrite packet = new C2G.CreatureEvalBoardWrite();
        packet.creature_id = creature_id;
        packet.message     = m_InputMessageLabel.value;

        Network.GameServer.JsonAsync <C2G.CreatureEvalBoardWrite, C2G.CreatureEvalBoardWriteAck>(packet, WriteAckHandler);
    }