|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
6 x9 H G5 s. N8 tI posted this because someone kinda posted a youtube thingy about it :O.
/ P: j- r) E# O+ [! h3 w4 |% @% X5 Q# t) i+ u( ^6 F3 {
Find this in DPSrv.cpp @ worldserver
) z% p/ k) R4 t- Y% e
3 ~: a4 ]2 m/ n4 YCode:
1 H8 Q0 _0 L, W1 }, |* G: x4 lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 d; I# M, J7 p- t{4 W7 F5 D' a/ K7 v' E# H
DWORD nId;4 ^' a) [6 S3 U( h) X3 ~
int nPart;' ?; l& L, O: J$ M% _* C+ g' h
4 f0 y/ G. ]3 C
ar >> nId;
1 I. n# |! p2 B! R6 K. g; \ ar >> nPart; " m+ [% N; |; }) ?
: f" r9 {6 ~4 u; P
if( nPart >= MAX_HUMAN_PARTS )
s' E5 w; C# T: J. D! w- D u return;
; _; [7 `2 s& o& M, P3 K# q" q5 T r& f1 h. S, j6 `1 c8 [
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it f. l2 L, M% N- k$ F- b
* H. @3 c' u/ b" o r, l$ L h
% K- J4 a' o+ S. x$ ]5 w4 t7 RCode:# z5 E: w' l5 `' Y; [" I
#ifdef __QUGET_SWAP_FIX) v# ^! B9 u3 M/ y0 h; k I* p
# O3 Q: @; f: S
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 }% [' A2 ]/ t# ^) ?' K) y: h
pUser->SetHitPoint( pUser->GetMaxHitPoint());# Y* b1 z) v! u6 ~' G8 O a
- k! U/ Y& U; w6 E. E7 ]1 {, J
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 ]/ {: ?7 Q/ k( Y7 g+ i
pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 Z7 \5 n# Q! M0 [6 ]( _- ?
0 o2 y2 v) @9 d Y6 t if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 Z& \* H4 [: r) p4 A! P
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ M3 i6 t& ~# s# W1 {/ e9 y4 q( e' w$ [" W8 P
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
E2 d- ~+ j# Vand add under2 Y7 ^5 u/ r) k2 }7 C; m. A
5 a( {1 H8 [* N9 _/ ]Code:
# L$ |/ ^4 H. w H+ vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" u1 Y' {9 L/ n {
) d r" t% D$ m! J3 G3 [" C7 N 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 );
9 g7 O$ ^8 g4 e( } }this
p* ], g) f# k. ~% L" G' h* e6 H
3 \$ l5 o* c! J8 N* @+ OCode:
1 K- e) z3 l- h* X6 U( i2 a+ c#ifdef __QUGET_SWAP_FIX
: k5 I% O6 {. x! {7 i' P* w# f if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% G' V8 m. }5 i* L& a3 q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" z* X$ s# ^) ~4 `
! w+ Z) M: J& r7 ~ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# n- Q6 E; r, [0 `
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! `: |4 b/ k* H7 c1 u) R
+ h, @! Q7 }, A5 X. G if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, M, X- O3 ?* V; k6 M5 w) z pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 x H6 X1 X% Z' F) n8 f. ~
; O6 {, `4 |2 S- k' b8 U#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, |$ V( d# @& p# a; [4 N: W
+ [* t! _+ u+ f" Y" S+ z- R2 q, D( e" p7 e" a& i4 t; F
|
|