Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 02:58

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



CMsgStreamBuffer::operator>> Help

Discussion on CMsgStreamBuffer::operator>> Help within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2012
Posts: 53
Received Thanks: 6
CMsgStreamBuffer::operator>> Help

PHP Code:
void CNetProcessIn::OnB001(CMsgStreamBuffer &msg) {
    
DEBUG_PRINT_CALL()

    
int n;
    
CMsgStreamBuffer cs(0xB001);
    
memcpy(cs.m_node1msg.m_node1sizeof(msg.m_node1));
    
memcpy(cs.m_node2msg.m_node2sizeof(msg.m_node2));

    
cs.m_availableBytesForReading msg.m_availableBytesForReading;
    
cs.m_currentReadBytes msg.m_currentReadBytes;
    
cs.m_msgid msg.m_msgid;

    
cs >> n//crash!!!

    
reinterpret_cast<void(__thiscall *)(CNetProcessIn *, CMsgStreamBuffer &)>(0x008A4960)(thismsg);


How to save a copy of "msg" correctly ?

CMsgStreamBuffer cs = msg; is crash also.


Thanks!
halloway520 is offline  
Old 07/11/2021, 16:12   #2

 
SubZero**'s Avatar
 
elite*gold: 70
Join Date: Apr 2017
Posts: 1,024
Received Thanks: 511
read the packet then use

msg->FlushRemaining(); //for custom packet
msg->m_currentReadBytes=0 // for org packets
SubZero** is offline  
Thanks
4 Users
Old 08/05/2021, 12:15   #3
 
elite*gold: 0
Join Date: Dec 2012
Posts: 53
Received Thanks: 6
Thumbs up

Quote:
Originally Posted by SubZero** View Post
read the packet then use

msg->FlushRemaining(); //for custom packet
msg->m_currentReadBytes=0 // for org packets

Tanks bro, you fix my problem!
halloway520 is offline  
Old 10/13/2021, 20:11   #4
 
elite*gold: 0
Join Date: Jul 2020
Posts: 163
Received Thanks: 15
Quote:
Originally Posted by SubZero** View Post
read the packet then use

msg->FlushRemaining(); //for custom packet
msg->m_currentReadBytes=0 // for org packets
thank you boss
you really good person
kotsh23 is offline  
Reply


Similar Threads Similar Threads
[Release]Operator - Tool. Die Hilfe für die Admins!
10/06/2011 - Minecraft Mods, Textures, Skins & Maps - 26 Replies
http://www7.pic-upload.de/06.04.11/k6q858v67ruj.pn g Hallo Crafter! Heute stelle ich mein kleines Werk vor! Hierbei handelt es sich um das Operator - Tool. Man kann es auch GM-Tool für Minecraft nennen ;D Aktuelle (grobe) Funktionsliste:
[c++] Überladen von << Operator
05/02/2011 - C/C++ - 5 Replies
Hallo, ich hab ein Programm, das mittels Objekten einen Binärbaum erstellt. nun soll ich Ich hab zwar was zu Überladen von Stream-Operatoren gefunden, hab aber keinen Plan wie ich das anwenden soll. Also die Einrückung wird mittels einer Membervariable, die die Tiefe des Knotens angibt erzeugt.
[C++]Verkettungs operator
07/26/2010 - C/C++ - 3 Replies
Hallo! Gibt es in C++ einen verkettunsoperator? Und wen ja wie, wie lautet dieser? In AutoIT ises & in Php ises . In JS ises +
need operator or moderator for bee middle man
05/29/2010 - Silkroad Online Trading - 4 Replies
plz add me on msn assap :b [email protected]
[C++] "->"-Operator
04/11/2008 - C/C++ - 3 Replies
Hey, Ich probiere grade nen kleinen PixelBot zu schreiben. Folgendes habe ich jetzt aus Testgründen geschrieben: #include <iostream> #include <windows.h> using namespace std;



All times are GMT +1. The time now is 02:58.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.