Jump to content
View in the app

A better way to browse. Learn more.

Shaiya.gg

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help about notice packets.

Im still tryna understand whats problem inside of code, after sending custom notice ps_game crashed.

 

***

AdminCmdNoticeAllOutgoing createNotice(const std::string& message) {

AdminCmdNoticeAllOutgoing notice{};

notice.messageLength = message.length();

std::memcpy(&notice.message, message.c_str(), message.length());

return notice;

}

***

 

std::string output;

 

auto charId = std::stoi(args.at(0));

std::string Notice = args.at(1);

 

CUser* user = CWorld::FindUser(charId);

 

if (!user)

{

std::stringstream output_msg;

output_msg << "Character not found !!";

output = output_msg.str();

return 0;

}

auto SendNotice = createNotice(Notice);

SConnection::Send(&user->connection, &SendNotice, sizeof(SendNotice));

 

std::stringstream output_msg;

output_msg << "notice send to player ok !";

output = output_msg.str();

Featured Replies

  • Author

notice packet struct like that

 

#pragma pack(push, 1)

struct AdminCmdNoticeAllOutgoing

{

UINT16 opcode{ 0xF90B };

// w/ null-terminator

UINT8 messageLength;

ChatMessage message;

};

#pragma pack(pop)

Create an account or sign in to comment

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.