コード例 #1
0
ファイル: QueryHandler.cs プロジェクト: 0xFh/Asda2-Project
        public static void SendPageText(Character chr, PageTextEntry entry)
        {
            var locale = chr.Locale;

            while (entry != null)
            {
                using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_PAGE_TEXT_QUERY_RESPONSE, 100))
                {
                    packet.Write(entry.PageId);
                    packet.Write(entry.Texts.Localize(locale));
                    packet.Write(entry.NextPageId);
                    chr.Send(packet, addEnd: false);
                }
                entry = entry.NextPageEntry;
            }
        }
コード例 #2
0
        public static void SendPageText(Character chr, PageTextEntry entry)
        {
            ClientLocale locale = chr.Locale;

            for (; entry != null; entry = entry.NextPageEntry)
            {
                using (RealmPacketOut packet =
                           new RealmPacketOut((PacketId)RealmServerOpCode.SMSG_PAGE_TEXT_QUERY_RESPONSE, 100))
                {
                    packet.Write(entry.PageId);
                    packet.Write(entry.Texts.Localize(locale));
                    packet.Write(entry.NextPageId);
                    chr.Send(packet, false);
                }
            }
        }
コード例 #3
0
ファイル: QueryHandler.cs プロジェクト: 0xFh/Asda2-Project
        public static void SendPageText(Character chr, uint pageId)
        {
            var entry = PageTextEntry.GetEntry(pageId);

            if (entry != null)
            {
                do
                {
                    SendPageText(chr, entry);
                    entry = entry.NextPageEntry;
                } while (entry != null);
            }
            else
            {
                using (var outPack = new RealmPacketOut(RealmServerOpCode.SMSG_PAGE_TEXT_QUERY_RESPONSE, 100))
                {
                    outPack.Write("-page is missing-");
                    outPack.Write(0);
                    chr.Send(outPack, addEnd: false);
                }
            }
        }
コード例 #4
0
        public static void SendPageText(Character chr, uint pageId)
        {
            PageTextEntry entry = PageTextEntry.GetEntry(pageId);

            if (entry != null)
            {
                do
                {
                    QueryHandler.SendPageText(chr, entry);
                    entry = entry.NextPageEntry;
                } while (entry != null);
            }
            else
            {
                using (RealmPacketOut packet =
                           new RealmPacketOut((PacketId)RealmServerOpCode.SMSG_PAGE_TEXT_QUERY_RESPONSE, 100))
                {
                    packet.Write("-page is missing-");
                    packet.Write(0);
                    chr.Send(packet, false);
                }
            }
        }