|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 9 N( w0 z8 c7 Z# t
I posted this because someone kinda posted a youtube thingy about it :O.9 l- A& O1 O* O5 @
5 }. y" T C; C* Y! S/ PFind this in DPSrv.cpp @ worldserver+ w2 B" d( V9 f; T8 i
6 @% o2 T. b6 HCode:+ Q# {7 U% ]% x: E$ b
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 V; G# w) E9 U, k' V0 K{
7 D4 R$ W) T% c3 ]8 v, h6 U DWORD nId;
0 B+ r5 o6 y) I5 P$ D6 t9 f5 |0 L int nPart;
* y2 B$ x4 R/ H8 ?+ e- P" U5 h$ ~4 a0 _4 U. w
ar >> nId;+ l. r9 L5 H( y' v" |
ar >> nPart;
7 N8 n) B. L3 W7 S0 m) V 5 [- a y3 ?9 l3 G2 |+ K2 E; n' X
if( nPart >= MAX_HUMAN_PARTS )
+ n- O% j1 q+ M, U" a return;
7 F! t$ j) n1 G* D# Y: e% v% l8 o. N8 @$ x
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
3 q- y6 x9 w( t; C8 k7 {) Y3 d! ]! L. Y4 o9 b
% M2 V* k9 f. I3 i8 p
Code:
4 w# n2 h7 m2 Y# ]! I( |0 W#ifdef __QUGET_SWAP_FIX% v# @% C& _, q4 u0 C9 m
$ k; i9 o: y# e2 ^ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; j9 O9 ^; [: a3 z, j% j$ m pUser->SetHitPoint( pUser->GetMaxHitPoint());
- l# {; B) C2 c6 |/ h* w- |! l; ^
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
, D- v, r# |: r8 ~, L7 ~ pUser->SetManaPoint( pUser->GetMaxManaPoint() );) c/ K0 T+ z) J2 |+ b7 ]
) Z. E( r/ B' a9 o' Y1 F if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 h; x K/ K9 C. c+ W. s! W
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- C/ T8 c. K7 F) ^5 n5 e- L1 s8 S( B
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 s3 ]; ^. ~. K" l+ C; J
and add under
/ w9 Q9 p* b1 j T
! D+ a1 v( z" n- G1 b# B, GCode:9 s, x% j2 u' G: L, i
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 U9 x, z1 K* C" @
{
5 ]9 U. S- B" _7 }0 ~ CMover::UpdateParts( pPlayer->GetSex(), pPlayer->m_dwSkinSet, pPlayer->m_dwFace, pPlayer->m_dwHairMesh, pPlayer->m_dwHeadMesh, pPlayer->m_aEquipInfo, g_WndMng.m_pWndBeautyShop->m_pModel, &pPlayer->m_Inventory );. N8 ^3 ~7 ?" |! A" R9 e: C# _
}this& }3 I) B8 j, y3 {
L# m) V. T- ^ U9 R3 w1 K
Code:
( E; k1 {5 f2 P9 e- p#ifdef __QUGET_SWAP_FIX
9 b! r, N' ~5 R# z& l6 y if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! q- X: S7 D; e; m; P' ]
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 |: U* B* A3 X3 T ~9 ]1 p
2 d) R6 g* \3 L5 T, O. x& Z$ K if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 y" O1 b4 O8 g% I pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 P7 v6 J' f7 ^; O" b6 a4 D
- u) P$ p- d8 Z0 f; i6 P' L if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )# ]+ r6 c! A1 [
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 s; J6 n" ~ o
, n0 l, i" L: S t% c5 a: I7 ?#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! G* f6 I" ^* z; k. h5 ^6 Z
9 [* }2 h. S0 z/ g8 C4 @( ?1 ^9 C& r/ z2 p* O; C& J- J0 w
|
|