|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* K9 i) b5 H% y- V2 a, JI posted this because someone kinda posted a youtube thingy about it :O.
( l( g$ D% X" z7 k4 H
2 t# z% v& C8 R: C- I# b. V* FFind this in DPSrv.cpp @ worldserver$ {# X8 S/ L* J4 M
% B& {% a& ]: q ^Code:7 c7 ^. X# Q) @# i6 n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& X0 [/ t) }7 x a9 `
{
5 B/ f& d& N0 c7 a0 Y; C* A+ V DWORD nId;- |3 N/ l* X4 \- H0 J
int nPart;
q& p2 s7 ?( L; B
8 x/ A, m/ R5 M' r% l" s6 u) Y: }: ^ ar >> nId;
) M# X" W5 k. M' ^1 D3 [) _8 p ar >> nPart; 0 x5 y( R# _8 O) Z, N
) M, n3 D/ l3 ]$ [/ _ if( nPart >= MAX_HUMAN_PARTS ) T" w4 q0 X0 T+ t( y
return;
; [2 Z# n3 D/ C8 I/ |
/ F+ D! t) \4 H i/ W9 v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ c* U; u: e" Q/ [" h) k; b1 q+ T) M7 m6 {
+ o2 o* }/ ]# p4 sCode:
& D3 H# T! O% {#ifdef __QUGET_SWAP_FIX* W" `6 z4 N) S" E6 T
: T( j3 c8 D9 y% o
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- F7 y2 C. k7 @ pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 ~& |! v& ?; [% w. S6 `* V" k8 h0 o% I& Y0 ^% U1 y$ ]+ A
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): R' G+ p7 o2 h) p L$ s/ ]
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
% z& u9 B; W M1 f8 ? l7 c1 U3 @ E! C7 Z* ^: |
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
: X/ y( i6 H7 \' q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
f1 ^1 u+ S$ K5 Y* T) q3 {/ T7 N9 L' P% u5 X! S" p0 E
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% U. R% I) n' X4 m. R: Z* X
and add under6 f" j3 f1 ?5 _. m
/ m1 @2 `! N- Y$ |& M5 W
Code:! D, f& X8 ~6 [9 G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
0 B5 ?0 y- Q, z6 U; c; T% h {2 f' ] b. h' t. j3 j/ ?
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 );1 d2 T, n! D$ s0 G p5 P6 I4 }
}this
- Y* k6 Y: A ~7 a3 @0 Z
5 o; Q( R, X; j' t5 o! v* _Code:
5 O1 j$ j" {* E8 L! X3 o#ifdef __QUGET_SWAP_FIX
8 |: g$ v% g+ l* ^ o if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ), I* T5 e! n, t* @' e: n
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! `* O Z' N/ w5 t7 p4 a8 T' ~
# _2 v2 r! M, ?4 n& G
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
' A8 M* x8 _! L9 S( ~+ t pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ k; ], z4 R- D
+ ^0 m. i% r8 F' ^* f$ Y4 r9 X7 N* m. d if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
- y+ \/ P% C/ A/ m/ j- I1 C pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 n1 @, Q) g7 e, _2 q; J+ X9 V( V. z; [; o. ~ P
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . w& N! F* u$ L! ^5 O
7 d+ e8 {4 z- E C0 M2 \, h' z6 c2 T) Y
|
|