Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 20:44

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

Advertisement



[Non-Mini Release] Rewriting Client Notification Handler

Discussion on [Non-Mini Release] Rewriting Client Notification Handler within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old 09/11/2020, 20:59   #16
 
NorseGodTyr's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 2,221
Received Thanks: 1,457
Quote:
Originally Posted by #HB View Post
Hmmm works fine for me.

Your problem is here anyways:
Code:
if (chat = g_notificationhandler.GetKillNotify(uqdata->ObjNameStrID))
{
	swprintf_s(buffer, sizeof(buffer), g_textmanager->GetStringTextByCode(chat)->c_str(), KillerName.c_str());
	g_interface->ShowBlueNotify(buffer);
	sysmsg->Write(UNIQUE_KILL_SYSTEM_COLOR, buffer);
}
You have to be exceeding the buffer size or messing up arguments, ex:
ok found the problem changed to swprintf

Quote:
Originally Posted by Goosxc View Post
My game stuck after i load monster the unique

also after i killed the unique i got the same error @norsegodtyr
change by

Quote:
if (chat = g_notificationhandler.GetKillNotify(uqdata->ObjNameStrID))
{
swprintf_s(buffer, sizeof(buffer), g_textmanager->GetStringTextByCode(chat)->c_str(), KillerName.c_str());
g_interface->ShowBlueNotify(buffer);
sysmsg->Write(UNIQUE_KILL_SYSTEM_COLOR, buffer);
}
swprintf_s to swprintf
NorseGodTyr is offline  
Thanks
2 Users
Old 09/12/2020, 07:56   #17
 
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42


any help?
irockalone is offline  
Old 09/12/2020, 10:29   #18
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by NorseGodTyr View Post
swprintf_s to swprintf
Which means your buffer is messed up or it exceeds limit, so its no good to modify it to swprintf.

swprintf_s is limited by the dest buffer size that you specify so if you exceed it, you should be getting that error.

While swprintf just fills the dest buffer with the same size of the source, so it doesn't really care if it exceeds the dest buffer size, AKA if source size is greater than dest size, you'll modify bytes that don't really belong to your dest buffer, which is not safe AT ALL.

That's probably why swprintf is not considered safe.

So, you can try increasing the buffer size.

Quote:
Originally Posted by irockalone View Post
any help?
You seem to miss includes somehow or VC packages.

Quote:
Originally Posted by *Deadly View Post
Is it possible to use some other color like the Pink, Green and Blue notifications on the middle of the screen?
Should be possible, but its not related to this topic. Have a look at resinfo files as well, the color could be there as well.

Quote:
Originally Posted by *Deadly View Post
when I tried to change the hex color of ShowBlueNotify or Pink to something else and build, it started crashing my client the unique appears.
You must've modified something else that isn't really related to it.
#HB is offline  
Thanks
1 User
Old 09/12/2020, 13:31   #19
 
NorseGodTyr's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 2,221
Received Thanks: 1,457
Quote:
Originally Posted by #HB View Post
Which means your buffer is messed up or it exceeds limit, so its no good to modify it to swprintf.

swprintf_s is limited by the dest buffer size that you specify so if you exceed it, you should be getting that error.

While swprintf just fills the dest buffer with the same size of the source, so it doesn't really care if it exceeds the dest buffer size, AKA if source size is greater than dest size, you'll modify bytes that don't really belong to your dest buffer, which is not safe AT ALL.

That's probably why swprintf is not considered safe.

So, you can try increasing the buffer size.
i have try to increase but not work so i changed to swprintf and work fine without any crash/error
NorseGodTyr is offline  
Old 09/12/2020, 14:32   #20


 
*Deadly's Avatar
 
elite*gold: 213
Join Date: Feb 2020
Posts: 401
Received Thanks: 189
Quote:
Originally Posted by #HB View Post

You must've modified something else that isn't really related to it.

i modified those hex colors

Code:
void CGInterface::ShowBlueNotify(std::wstring msg)
{
	reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(this, &msg);
}
Code:
void CGInterface::ShowBlueNotify(std::wstring* msg)
{
	reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(this, msg);
}
*Deadly is offline  
Old 09/12/2020, 16:35   #21
 
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
Quote:
Originally Posted by #HB View Post
Which means your buffer is messed up or it exceeds limit, so its no good to modify it to swprintf.

swprintf_s is limited by the dest buffer size that you specify so if you exceed it, you should be getting that error.

While swprintf just fills the dest buffer with the same size of the source, so it doesn't really care if it exceeds the dest buffer size, AKA if source size is greater than dest size, you'll modify bytes that don't really belong to your dest buffer, which is not safe AT ALL.

That's probably why swprintf is not considered safe.

So, you can try increasing the buffer size.



You seem to miss includes somehow or VC packages.



Should be possible, but its not related to this topic. Have a look at resinfo files as well, the color could be there as well.



You must've modified something else that isn't really related to it.

what VC should i use? and can you share link for download?
irockalone is offline  
Old 09/12/2020, 16:49   #22
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by *Deadly View Post
i modified those hex colors

Code:
void CGInterface::ShowBlueNotify(std::wstring msg)
{
	reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(this, &msg);
}
Uhm... These are not colors, these are addresses. Anyways this is out of topic, so please keep this outta here.

Quote:
Originally Posted by irockalone View Post
what VC should i use? and can you share link for download?
Quote:
Originally Posted by #HB View Post
NOTE: Structures found in the files are for VC80 libs, back when strings were 28 bytes. You'll face errors, if you work with any later compiler.
#HB is offline  
Thanks
2 Users
Old 09/12/2020, 16:52   #23
 
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
Quote:
Originally Posted by #HB View Post
Uhm... These are not colors, these are addresses. Anyways this is out of topic, so please keep this outta here.
its been 2 hour while i m looking for VC80 SP but there's nothing exists like MS stopped supporting this lol
i would be thankful if you shared a link for this.
irockalone is offline  
Old 09/12/2020, 17:35   #24
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by irockalone View Post
its been 2 hour while i m looking for VC80 SP but there's nothing exists like MS stopped supporting this lol
i would be thankful if you shared a link for this.
VC80 is pretty old yeah, but sadly we have to stick with it, you have 2 options:
  • Download Visual Studio 2005

No matter what option you choose, you still need to keep up with Joymax allocator, so flo's reconstructed JoymaxAllocator in would be great to ensure the safety of your std lib.
#HB is offline  
Thanks
1 User
Old 09/12/2020, 19:24   #25
 
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
Quote:
Originally Posted by #HB View Post
VC80 is pretty old yeah, but sadly we have to stick with it, you have 2 options:
  • Download Visual Studio 2005

No matter what option you choose, you still need to keep up with Joymax allocator, so flo's reconstructed JoymaxAllocator in would be great to ensure the safety of your std lib.

after including all neccessary directories

irockalone is offline  
Old 09/14/2020, 22:15   #26


 
*Deadly's Avatar
 
elite*gold: 213
Join Date: Feb 2020
Posts: 401
Received Thanks: 189
Quote:
Originally Posted by #HB View Post
Uhm... These are not colors, these are addresses. Anyways this is out of topic, so please keep this outta here.
Ah, thanks I don't actually know c++
*Deadly is offline  
Old 11/20/2020, 23:49   #27
 
elite*gold: 0
Join Date: Apr 2015
Posts: 103
Received Thanks: 12
Can it work for taiwan v1.258 files?
nevet.S is offline  
Old 11/21/2020, 11:11   #28
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by nevet.S View Post
Can it work for taiwan v1.258 files?
It can, you'll need to adapt with addresses difference, and you'll probably need to add new types and also maybe modify an old type, since there's a big version difference between the files.
#HB is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
hat jemand erfahrung mit nginx location URL Rewriting?
12/04/2014 - Web Development - 3 Replies
Hallo, hat jemand Erfahrung mit nginx URL Rewriting? Ich hab da einige fragen. Bitte melden!
[WTB] unded mini ghostly/mini panada/mini polar bear
05/07/2012 - Guild Wars Trading - 2 Replies
Hi, Would like to buy one of those pets. Make me an offer if you got one. Thanks.
[Release] Hero OnLine Notification for iPhone
03/13/2012 - General Gaming Releases - 0 Replies
Dear users i'm near the end of finishing Hero OnLine Notification for iPhone software. No you think wtf is that right ? Well i made a small piss of software that looks if your Hero OnLine Windows / Process is ON, if not then you will get an notification to your iPhone using pushme.to http://www.nexxoz.com/e107_files/public/133165932 6_1_FT0_nofication_iphone.png What you need to do is go to pushme.to make an account then go to Export widget then click on Romantic design then to the rgiht...
Texture Rewriting
11/23/2011 - Lin2 Guides & Templates - 1 Replies
http://darkmanga.irule.net/l2/l2tools.htm wer viel zeit hat kanns ja mal in deutsch übersetzen ;p l2tool könnt ihr hier saugen
Client für Novo Easy Handler v0.4.0.5?
08/17/2010 - WoW Private Server - 3 Replies
Hi Leute, da die SuFu nichts ergeben hat nun meine Frage: Wo kann ich einen Client für meinen WOW-P-Server (Novo's Easy Handler v0.4.0.5) downloaden oder einrichten? :confused: Danke im Vorraus! Euer Hacke



All times are GMT +2. The time now is 20:44.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.