|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 P% j2 c2 }. z
I posted this because someone kinda posted a youtube thingy about it :O.
# f( ^' w# x' y- T6 R& S7 V. }% H* ?# v
Find this in DPSrv.cpp @ worldserver
. \3 H. X% ?* U! A6 h, W. S
) v v: s9 v" v' k# ICode:- x: p9 n; |: e7 U4 b
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )$ P! U" l) k' W9 t, D$ v
{- c) A0 D1 V, m7 |: A" q- d
DWORD nId;8 v9 H6 Q. r+ x! e6 s1 `4 F
int nPart;) T3 Y7 o# p J ^3 J8 v' [: s. @4 }
1 u* `8 ~, z! y8 R" }6 m ar >> nId;" \- u9 F8 f) m9 [9 C+ }
ar >> nPart;
+ r6 m& t9 D4 F8 S; @; R 8 j9 [ m, w. F
if( nPart >= MAX_HUMAN_PARTS ) 2 l- }$ q: e% X0 I! x7 \8 E
return;' }) Y% [3 _# i" c
; i, R4 N5 \6 Z5 W7 R CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 i; s" p5 K7 j) _+ d8 X
7 O' k) b, \! }- W: n, V# h
* ]8 G1 ~# T @8 g( s8 ]Code:) h- ]/ h0 \! T8 _
#ifdef __QUGET_SWAP_FIX6 v7 X) m6 t* X X" G$ b- `9 f
" o9 s: O; j* ^2 F' Y, o9 j' v6 q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- P q) ]0 W! |7 n7 {
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 V, n" z/ m1 H8 {8 {' r
. Z8 a( {$ w9 e5 D, n+ I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% I$ N1 ^* O" j: ]" h pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' A3 M# a( A! O: V0 U' ?7 x& _9 g* w- y- `, e4 t. N/ I% x
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). g$ f! D9 p- W1 h2 Q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# _$ [1 x$ i' ?" }, g! d2 j, \- u# E* p# L
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( T/ ~: k P) E* O" Pand add under
/ d; F! A- O( u% a& u. ?" z- `9 z5 d5 ~- v7 H/ f5 G, Z: w; b" l: A. ^
Code:5 O1 B$ C! {0 w6 J0 R5 l
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): s& R- j- U# b" |; S9 M
{
- |5 a! w, W* H8 v- P) b 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 );4 ?0 q# x: e5 R2 W% d. {
}this7 D2 c/ r4 t) D, h1 j( S% m3 \$ ^9 X, c
+ |+ p( I* a* N. U7 V+ T( }2 Y3 g5 o
Code:
) ~' V) K8 t4 j" P#ifdef __QUGET_SWAP_FIX
. }4 @2 q, ^$ j" h- j' j. \6 S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( o8 [( i( ^" c
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ O: l$ M- A4 s0 U! L. }. q& Q. h* A4 D/ s' }) Z& R7 w* K
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 W& B( b. n6 H' U* f" ^5 p1 ~
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 t V$ @3 Q( y$ O0 ^! k
: `0 j" r& t, j: O* R if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; U) l* e4 R& ?6 V; }0 q# x T pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 T& H: G8 J7 V3 _6 j
4 e+ E+ C4 i6 a#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 o! F9 x8 `/ V$ Y
$ C* j0 P; l3 M% ~9 Q4 d! K8 |: S2 W9 i3 s. t
|
|