Пример #1
0
        public bool RespondToQuestDialog(QuestState state, DialogReply reply, byte action = 0)
        {
            if (!Initialized || !m_client.ConnectedAndInitialized)
            {
                return(false);
            }

            OldPacket pkt = new OldPacket(PacketFamily.Quest, PacketAction.Accept);

            pkt.AddShort(state.SessionID); //session ID - ignored by default EOSERV
            pkt.AddShort(state.DialogID);  //dialog ID - ignored by default EOSERV
            pkt.AddShort(state.QuestID);
            pkt.AddShort(state.NPCIndex);  //npc index - ignored by default EOSERV
            pkt.AddChar((byte)reply);
            if (reply == DialogReply.Link)
            {
                pkt.AddChar(action);
            }

            return(m_client.SendPacket(pkt));
        }
Пример #2
0
		public bool RespondToQuestDialog(QuestState state, DialogReply reply, byte action = 0)
		{
			if (!Initialized || !m_client.ConnectedAndInitialized)
				return false;

			Packet pkt = new Packet(PacketFamily.Quest, PacketAction.Accept);
			pkt.AddShort(state.SessionID); //session ID - ignored by default EOSERV
			pkt.AddShort(state.DialogID); //dialog ID - ignored by default EOSERV
			pkt.AddShort(state.QuestID);
			pkt.AddShort(state.NPCIndex); //npc index - ignored by default EOSERV
			pkt.AddChar((byte) reply);
			if (reply == DialogReply.Link)
				pkt.AddChar(action);

			return m_client.SendPacket(pkt);
		}