MCPcopy Create free account
hub / github.com/crossuo/crossuo / CPacketBookHeaderChangeOld

Method CPacketBookHeaderChangeOld

src/Network/Packets.cpp:1223–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221}
1222
1223CPacketBookHeaderChangeOld::CPacketBookHeaderChangeOld(CGumpBook *gump)
1224 : CPacket(99)
1225{
1226 // FIXME: PACKET: check if this should be ASCII or UTF8
1227 auto title = wstr_to_utf8(gump->m_EntryTitle->m_Entry.GetTextW());
1228 auto author = wstr_to_utf8(gump->m_EntryAuthor->m_Entry.GetTextW());
1229
1230 WriteUInt8(0xD4);
1231 WriteUInt32BE(gump->Serial);
1232 WriteUInt16BE((uint16_t)0x0000); //flags
1233 WriteUInt16BE((uint16_t)gump->PageCount);
1234 WriteString(gump->m_EntryTitle->m_Entry.GetTextA(), 60);
1235 WriteString(gump->m_EntryAuthor->m_Entry.GetTextA(), 30);
1236}
1237
1238CPacketBookHeaderChange::CPacketBookHeaderChange(CGumpBook *gump)
1239 : CPacket(1)

Callers

nothing calls this directly

Calls 3

wstr_to_utf8Function · 0.85
GetTextWMethod · 0.80
GetTextAMethod · 0.45

Tested by

no test coverage detected