Esempio n. 1
0
 public static void LinkTextProcessor(LinkText.TYPE linkTextType, string strText, string strTextKey, object objData)
 {
     if (linkTextType == LinkText.TYPE.ITEM)
     {
         NrLinkTextProcessor.ItemLinkFunc(objData);
     }
     else if (linkTextType == LinkText.TYPE.PLAYER)
     {
         NrLinkTextProcessor.PlayerLinkFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.NPC)
     {
         NrLinkTextProcessor.NpcLinkFunc(strTextKey, strText);
     }
     else if (linkTextType == LinkText.TYPE.MESSAGE)
     {
         NrLinkTextProcessor.PostLinkFunc();
     }
     else if (linkTextType == LinkText.TYPE.HELP)
     {
         NrLinkTextProcessor.HelpLinkFunc(strTextKey);
     }
     else if (linkTextType == LinkText.TYPE.PLUNDER_REPLAY)
     {
         NrLinkTextProcessor.PlunderReplayFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.COLOSSEUM_REPLAY)
     {
         NrLinkTextProcessor.ColosseumReplayFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.MINE_REPLAY)
     {
         NrLinkTextProcessor.MineReplayFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.INFIBATTLE_REPLAY)
     {
         NrLinkTextProcessor.InfiBattleReplayFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.COUPON)
     {
         NrLinkTextProcessor.CouponFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.TREASUREBOX)
     {
         NrLinkTextProcessor.TreasureBoxFunc(strText);
     }
     else if (linkTextType == LinkText.TYPE.GUILD)
     {
         NrLinkTextProcessor.ShowGuildInfo(strText);
     }
 }
Esempio n. 2
0
    private static void TreasureBoxFunc(string strText)
    {
        if (strText.Contains("[#"))
        {
            strText = strText.Remove(0, 11);
        }
        if (strText.Contains("["))
        {
            strText = strText.Replace("[", string.Empty);
        }
        if (strText.Contains("]"))
        {
            strText = strText.Replace("]", string.Empty);
        }
        int i32Day = 0;

        if (!NrLinkTextProcessor.TreasureRewardTimeCheck(strText, ref i32Day))
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("632");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        short num = NrLinkTextProcessor.TreasureRewardTreasureCheck(strText);
        GS_TREASUREBOX_MOVE_REQ gS_TREASUREBOX_MOVE_REQ = new GS_TREASUREBOX_MOVE_REQ();

        if (num == -1)
        {
            gS_TREASUREBOX_MOVE_REQ.i16TreasureUnique = 0;
            gS_TREASUREBOX_MOVE_REQ.i32Day            = i32Day;
        }
        else
        {
            gS_TREASUREBOX_MOVE_REQ.i16TreasureUnique = num;
            gS_TREASUREBOX_MOVE_REQ.i32Day            = i32Day;
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TREASUREBOX_MOVE_REQ, gS_TREASUREBOX_MOVE_REQ);
    }