[Request]

08/11/2017 17:00 babyminion#1
can anyone have this feature?
after i upgrade my weapon/accessories to +10/+20 system will announce my name? :handsdown::handsdown::handsdown:
08/13/2017 22:59 Nick#2
#moved
08/14/2017 08:40 Burdenz2007#3
Quote:
Originally Posted by babyminion View Post
can anyone have this feature?
after i upgrade my weapon/accessories to +10/+20 system will announce my name? :handsdown::handsdown::handsdown:
Actually you can have this feature. But i can assure you its not released here yet.
08/15/2017 04:49 iSynaptic#4
It's not that hard to realize. The Upgrade is already on the World Server end, you can simply check the upgrade value and you can send a all notice from there.
08/15/2017 13:32 babyminion#5
Quote:
Originally Posted by iSynaptic View Post
It's not that hard to realize. The Upgrade is already on the World Server end, you can simply check the upgrade value and you can send a all notice from there.
sorry master but i can't do that things coz im just new in flyff developing :(
08/16/2017 01:52 iSynaptic#6
The most basic way would be like:

In DPSrvr.cpp on Line 5647 under
Code:
BYTE nResult = CItemUpgrade::GetInstance()->OnSmeltSafety( pUser, pItemElem0, pItemElem1, pItemElem2, pItemElem3 );
Add:

Code:
if ( nResult == 1 && *pItemElem0->GetAbilityOptionPtr() == 9 ) // 9 + successs = 10
	{
		char szUpgradeNotice[150] = { 0, };
		sprintf(szUpgradeNotice, "%s just successfully upgradet an item to +10", pUser->GetName());
		g_DPCoreClient.SendSystem(szUpgradeNotice);
	}
But keep in mind, that this message only appears on Safe Upgrade if a item reaches +10 and via the standard /sys notice.

You can also select the Itemname and print it out for example, or make a difference between accessory which acually should also print a message if it reach +10 instead of +20, but i wont give you everything fully done.

This is just as start point - go, get some expierence by yourself.

Synaptic
08/16/2017 07:36 Hekmatyar#7
Quote:
Originally Posted by iSynaptic View Post
The most basic way would be like:

In DPSrvr.cpp on Line 5647 under
Code:
BYTE nResult = CItemUpgrade::GetInstance()->OnSmeltSafety( pUser, pItemElem0, pItemElem1, pItemElem2, pItemElem3 );
Add:

Code:
if ( nResult == 1 && *pItemElem0->GetAbilityOptionPtr() == 9 ) // 9 + successs = 10
	{
		char szUpgradeNotice[150] = { 0, };
		sprintf(szUpgradeNotice, "%s just successfully upgradet an item to +10", pUser->GetName());
		g_DPCoreClient.SendSystem(szUpgradeNotice);
	}
But keep in mind, that this message only appears on Safe Upgrade if a item reaches +10 and via the standard /sys notice.

You can also select the Itemname and print it out for example, or make a difference between accessory which acually should also print a message if it reach +10 instead of +20, but i wont give you everything fully done.

This is just as start point - go, get some expierence by yourself.

Synaptic
wouldnt at that moment "GetAbilityOptionPtr" would return 10 since the value would increase on success before returning the result to this function? also y even get the pointer from the reference of the value when you can just check the default value with GetAbilityOption(). you're not applying an edit to the pointer anyway. its unneeded schematics.

but yes this code is pretty much how one would do it
08/16/2017 08:10 iSynaptic#8
Quote:
Originally Posted by Hekmatyar View Post
wouldnt at that moment "GetAbilityOptionPtr" would return 10 since the value would increase on success before returning the result to this function? also y even get the pointer from the reference of the value when you can just check the default value with GetAbilityOption(). you're not applying an edit to the pointer anyway. its unneeded schematics.

but yes this code is pretty much how one would do it
You are absolutly right. I copied the wrong code. When i did the tests, i addet the following lines of code:


Code:
// acually 9 because were in the success bracket 
			if (*pAbilityOption == 9) {
				char szUpgradeNotice[150] = { 0, };
				sprintf(szUpgradeNotice, "%s just successfully upgradet an item to +10", pUser->GetName());
				g_DPCoreClient.SendSystem(szUpgradeNotice);
			}
not under the SafeUpgrade location, but under

Code:
void CDPSrvr::OnEnchant( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize)
above:

Code:
			// ¼º°ø
			pUser->AddDefinedText( TID_UPGRADE_SUCCEEFUL, "" );
			pUser->AddPlaySound( SND_INF_UPGRADESUCCESS );
This would also cover the normal upgrade.
Well, ive just copyied the *pAbilityOption from 20 lines above:

Code:
if( *pAbilityOption >= nLevDown )
Thanks for the hint.