Swap bug Quick fix

o.e then my testers were failing so hard.
Can you explain me the whole bug

Some players fast switch there item using macro program in first this swap bug is ok but now the players know about swap bug very fast

Example:


When you have hp weapons and you switch it to Atk weapons (using an specific AoE skill), you will have the hp + Atk in the same time. that's a gay bug that pinoys loves.


Yah pinoy loves that bug
 
it only looks like it works, you dont see your HP/MP/FP bugging but it still does.


i asaled 1 time with 20k mp, i did 500k.
then i aoe'd and swapped from 20k MP to 1k mp and still did 500k asal.
then i just asaled with 1k mp again but this time without any aoe and did 30k asal.


It really does NOT work, it only shows normal HP/MP/FP while swapping but it still bugs when you hit/aoe/or do any dmg.



Does someone know a "true" fix?



Edit:

i saw you dont know why this bug is happening, let me explain it to you.

it happens because when you get any dmg or do dmg, then the "Battle-Phase" starts, while battle phase your HP/MP/FP will not recover, the battle phase lasts 10 secounds, when the 10 secounds are over and you didnt made any DMG or received any DMG then it is over and your HP/MP/FP recovers.
you must remove that Battle Phase, or make that HP/FP/MP always recover, even while fighting.
 
Last edited:
it only looks like it works, you dont see your HP/MP/FP bugging but it still does.


i asaled 1 time with 20k mp, i did 500k.
then i aoe'd and swapped from 20k MP to 1k mp and still did 500k asal.
then i just asaled with 1k mp again but this time without any aoe and did 30k asal.


It really does NOT work, it only shows normal HP/MP/FP while swapping but it still bugs when you hit/aoe/or do any dmg.



Does someone know a "true" fix?



Edit:

i saw you dont know why this bug is happening, let me explain it to you.

it happens because when you get any dmg or do dmg, then the "Battle-Phase" starts, while battle phase your HP/MP/FP will not recover, the battle phase lasts 10 secounds, when the 10 secounds are over and you didnt made any DMG or received any DMG then it is over and your HP/MP/FP recovers.
you must remove that Battle Phase, or make that HP/FP/MP always recover, even while fighting.
Nope.

Why?
Because if it really does not work then he only sent to user that HP/MP/FP changed but didn't change it in world server in the same time, that's all. That's only my opinion after reading all what is here because I didn't test personally.
 
:P In theory it should be fixed.
But you could add it before someone uses a skill.
I didnt know swap bug would go so fast that you can't see your gear change :/
This is @ worldserver
oid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{
DWORD nId;
int nPart;

ar >> nId;
ar >> nPart;

if( nPart >= MAX_HUMAN_PARTS )
return;

CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
#ifdef __QUGET_SWAP_FIX

if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
pUser->SetHitPoint( pUser->GetMaxHitPoint());

if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
pUser->SetManaPoint( pUser->GetMaxManaPoint() );

if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );

#endif
 
OMG! Why didn't I look at this more closely when you first posted it? More importantly, how did somebody not catch the problem before now?

The reason your coding doesn't work, is because in DPSrvr.cpp, you added the reset HP/MP/FP coding BEFORE their equips were actually changed. Move it to the bottom of the function, then it should work.

Edit: Someone please tell me if this fixes it. I'm not entirely sure it's fast enough (that function in DPSrvr chains into a lot of other functions before finishing). If it's not fast enough, I'll find a spot higher in the function chain that should work.
 
Last edited:
OMG! Why didn't I look at this more closely when you first posted it? More importantly, how did somebody not catch the problem before now?

The reason your coding doesn't work, is because in DPSrvr.cpp, you added the reset HP/MP/FP coding BEFORE their equips were actually changed. Move it to the bottom of the function, then it should work.

Edit: Someone please tell me if this fixes it. I'm not entirely sure it's fast enough (that function in DPSrvr chains into a lot of other functions before finishing). If it's not fast enough, I'll find a spot higher in the function chain that should work.
o.o Why did i already had it at the bottom and didn't put it here :o. thats why it worked for me :?: maybe xD
 
Edit: Someone please tell me if this fixes it. I'm not entirely sure it's fast enough (that function in DPSrvr chains into a lot of other functions before finishing). If it's not fast enough, I'll find a spot higher in the function chain that should work.

No it dosent work! It only looks like it works, you dont see your HP/MP/FP bugging but it still does.


i asaled 1 time with 20k mp, i did 500k.
then i aoe'd and swapped from 20k MP to 1k mp and still did 500k asal.
then i just asaled with 1k mp again but this time without any aoe and did 30k asal.


It really does NOT work, it only shows normal HP/MP/FP while swapping but it still bugs when you hit/aoe/or do any dmg.
 
No it dosent work! It only looks like it works, you dont see your HP/MP/FP bugging but it still does.


i asaled 1 time with 20k mp, i did 500k.
then i aoe'd and swapped from 20k MP to 1k mp and still did 500k asal.
then i just asaled with 1k mp again but this time without any aoe and did 30k asal.


It really does NOT work, it only shows normal HP/MP/FP while swapping but it still bugs when you hit/aoe/or do any dmg.

>.> You don't have to constantly repeat it and yell at me. I didn't make this coding, merely tried to fix it, but without testing it. Just for that, I won't bother trying to help you with it.
 
Some players fast switch there item using macro program in first this swap bug is ok but now the players know about swap bug very fast
somebody should program a little timer on changing equip, so swapping wont be "in" anymore. similar to using blinkwings.


btw, does the other stats are set right instantly? the bug only exists for hp/mp/fp?
 
somebody should program a little timer on changing equip, so swapping wont be "in" anymore. similar to using blinkwings.


btw, does the other stats are set right instantly? the bug only exists for hp/mp/fp?


yes the bug only exist for HP MP FP because they get stuck (dont recover) if the user is in Attack Mode, that means if he is fighting the HP MP FP wont recover so they will stay at the same point for 10 sec. if he keeps fighting it holds for another 10 sec. and so on.

i found a way to fix it much easier, i just removed code that the HP MP FP dont recover for 10 sec if the user is in attack mode. Now the HP MP FP does always recover, even when he is fighting and this makes it impossible to bug the HP MP FP.

Its easy to fix the item switching, just get Toms Antihack and change the detection.ini that he just allows 1 item switch per minute.
But it think thats just stupid because in pvp and especially in Guild Siege the players should swapp items like from HP to DMG but without holding their HP at a really high amount by abusing the Non-Recover in Attack mode.
 
i found a way to fix it much easier, i just removed code that the HP MP FP dont recover for 10 sec if the user is in attack mode. Now the HP MP FP does always recover, even when he is fighting and this makes it impossible to bug the HP MP FP.

That is an interesting idea, but it just gave me a better one. Instead of enabling recovery regardless of being in attack mode, when the ProcessRecovery function checks if you're able to recover, you should simply check if their HP, MP, and FP are at values that they shouldn't be.
 
This code was never tested by myself and was just a theory.
Swapping involves equipping things. And some people said it got fixed at my old server... Might be something else I did tough. Just can't remember.

I don't even know how this bug exactly works just that you sap your equips before using Asal :P
 
This code was never tested by myself and was just a theory.
Swapping involves equipping things. And some people said it got fixed at my old server... Might be something else I did tough. Just can't remember.

I don't even know how this bug exactly works just that you sap your equips before using Asal :P

some people some people? you cannot trust your community always. those people who can say its fixed must try it, prolly they use it, how can u be sure?
i prefer u go and check it yourself. xD
 
Back