|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , @2 m" D' _6 s' |
I posted this because someone kinda posted a youtube thingy about it :O.
: ~2 H) k% j8 E! ]
4 L- A( `0 s/ h$ E* vFind this in DPSrv.cpp @ worldserver
6 D: s- q" \" L# O
5 s+ R( z7 \+ v' e! R/ \7 D2 JCode:, K8 L2 R7 i7 M7 R
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 r% t ~' F$ P; N% S4 ?
{
- ~- R7 p7 \# t9 Y2 q DWORD nId;6 v- b' N7 H# }' e" f2 \" Y$ S
int nPart;, o4 F' Y2 a7 z& I" h6 {8 w
- O C$ d* o) m& \$ t/ P* u ar >> nId;
! n0 l" m+ `3 k1 e) x: p ar >> nPart; / |' ?1 X9 O5 \# A
4 }# R& P/ S5 j& |2 ~) d! G. z
if( nPart >= MAX_HUMAN_PARTS ) * i* f& G. g4 k, w. P0 \
return;* ?2 j( x0 m5 g! ^
/ r! V/ {! U4 [! D8 n1 L9 S5 `) X4 U
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it o6 G, t" V7 C0 J
0 H1 @" Z* J6 a7 s% P5 h9 B/ z% ^5 W* u t$ x. `
Code:
8 s1 \8 x. S$ c#ifdef __QUGET_SWAP_FIX
4 p7 u9 l2 G7 b0 j1 W) q2 o1 y: |% n3 \ j! U# m3 H9 S
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 @( |$ q& S2 [* M' v) v
pUser->SetHitPoint( pUser->GetMaxHitPoint());) j1 K4 I9 m$ w6 P l
' K- V* d) G7 E7 G4 p2 Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ a# D3 c1 Q9 `2 {( f/ o3 I
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ k! I T/ Q, J. _
! q1 [9 E' C" e9 U3 q$ d if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ v3 b! B% W5 z$ `2 C j% c6 o4 T
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 V4 d f8 I( ^' e4 B, ~! @, k0 S. r" O+ @. y) S
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 D& H$ X9 v! Xand add under r( l; h& x3 H
# G' I9 i U9 N! V$ d& zCode:" b; Y% g; m& W. x( I) \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), m; a' @/ B; q% {3 D4 p5 p
{( I* x+ ]- ^! G
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 );5 D: H. {7 l1 m0 n( X& h: h
}this* c& r% ?4 d# o5 I
7 G W. i+ G. J ~( m }: O' YCode:6 _. e$ N R6 v8 D
#ifdef __QUGET_SWAP_FIX6 S. ?8 {; Y. C4 L: J
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
; i! E7 k+ U3 d$ t7 u- L pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 S- y0 T; P2 Q% ^: ^& e! z
9 W9 c+ ~1 q- [2 i if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 E( }7 u; p" }: t: n9 Z' e
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 m% d% l# ?% [, x
8 d/ B8 N% E; L6 R2 \6 `5 [& W if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 D8 S) ?& x8 D7 q% f0 H, ^ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 x. @! i' ~7 i' x n
* h: g B; a$ K2 _8 q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. n/ ]1 |4 a% ?% P
9 E* r6 D) t" }! I# m- W. V6 }9 r( B3 R: p$ K9 w
|
|