Example #1
0
        private void _tradeOpen(short p1, string p1name, short p2, string p2name)
        {
            EOTradeDialog dlg = new EOTradeDialog(m_packetAPI);

            dlg.InitPlayerInfo(p1, p1name, p2, p2name);

            string otherName;

            if (p1 == World.Instance.MainPlayer.ActiveCharacter.ID)
            {
                otherName = p2name;
            }
            else if (p2 == World.Instance.MainPlayer.ActiveCharacter.ID)
            {
                otherName = p1name;
            }
            else
            {
                throw new ArgumentException("Invalid player ID for this trade session!", "p1");
            }

            m_game.Hud.SetStatusLabel(DATCONST2.STATUS_LABEL_TYPE_ACTION, DATCONST2.STATUS_LABEL_TRADE_YOU_ARE_TRADING_WITH,
                                      otherName + " " + World.GetString(DATCONST2.STATUS_LABEL_DRAG_AND_DROP_ITEMS));
        }
        private void _tradeOpen(short p1, string p1name, short p2, string p2name)
        {
            EOTradeDialog dlg = new EOTradeDialog(m_packetAPI);
            dlg.InitPlayerInfo(p1, p1name, p2, p2name);

            string otherName;
            if (p1 == World.Instance.MainPlayer.ActiveCharacter.ID)
                otherName = p2name;
            else if (p2 == World.Instance.MainPlayer.ActiveCharacter.ID)
                otherName = p1name;
            else
                throw new ArgumentException("Invalid player ID for this trade session!", "p1");

            m_game.Hud.SetStatusLabel(DATCONST2.STATUS_LABEL_TYPE_ACTION, DATCONST2.STATUS_LABEL_TRADE_YOU_ARE_TRADING_WITH,
                    otherName + " " + World.GetString(DATCONST2.STATUS_LABEL_DRAG_AND_DROP_ITEMS));
        }