|
You last visited: Today at 20:44
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.
09/11/2020, 20:59
|
#16
|
elite*gold: 0
Join Date: May 2013
Posts: 2,221
Received Thanks: 1,457
|
Quote:
Originally Posted by #HB
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
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
|
|
|
09/12/2020, 07:56
|
#17
|
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
|
any help?
|
|
|
09/12/2020, 10:29
|
#18
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
|
Quote:
Originally Posted by NorseGodTyr
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
any help?
|
You seem to miss includes somehow or VC packages.
Quote:
Originally Posted by *Deadly
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
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.
|
|
|
09/12/2020, 13:31
|
#19
|
elite*gold: 0
Join Date: May 2013
Posts: 2,221
Received Thanks: 1,457
|
Quote:
Originally Posted by #HB
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
|
|
|
09/12/2020, 14:32
|
#20
|
elite*gold: 213
Join Date: Feb 2020
Posts: 401
Received Thanks: 189
|
Quote:
Originally Posted by #HB
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);
}
|
|
|
09/12/2020, 16:35
|
#21
|
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
|
Quote:
Originally Posted by #HB
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?
|
|
|
09/12/2020, 16:49
|
#22
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
|
Quote:
Originally Posted by *Deadly
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
what VC should i use? and can you share link for download?
|
Quote:
Originally Posted by #HB
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.
|
|
|
|
09/12/2020, 16:52
|
#23
|
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
|
Quote:
Originally Posted by #HB
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.
|
|
|
09/12/2020, 17:35
|
#24
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
|
Quote:
Originally Posted by irockalone
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.
|
|
|
09/12/2020, 19:24
|
#25
|
elite*gold: 0
Join Date: Apr 2020
Posts: 79
Received Thanks: 42
|
Quote:
Originally Posted by #HB
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
|
|
|
09/14/2020, 22:15
|
#26
|
elite*gold: 213
Join Date: Feb 2020
Posts: 401
Received Thanks: 189
|
Quote:
Originally Posted by #HB
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++
|
|
|
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?
|
|
|
11/21/2020, 11:11
|
#28
|
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
|
Quote:
Originally Posted by nevet.S
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.
|
|
|
|
|
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.
|
|