飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17017|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1086

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1086
QQ
跳转到指定楼层
楼主
发表于 2016-1-10 03:43:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " L6 J8 l2 y3 K2 \8 H# F
I posted this because someone kinda posted a youtube thingy about it :O./ u$ D3 I+ k0 h6 L( Z" G
6 W  U- p( U! Q  Y, S& J) ?
Find this in DPSrv.cpp @ worldserver
3 A, S3 M0 U7 H: u! R: |' O1 I  W7 e2 x* B+ r
Code:7 j9 I6 N; |9 X
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, D+ ]- J+ }  A  G- J! S0 e$ V( D{3 F/ p- |7 m& g& j; X  c/ q2 E
        DWORD nId;7 z/ S" D7 s% K+ V" k6 D' P
        int nPart;
! i( M3 ]/ x* i& ?& r9 y2 Q1 a  Y5 |% G3 X7 Z) V6 p9 S
        ar >> nId;$ ^* m! e, e; \
        ar >> nPart;               
1 ~8 P4 ~. u. R* ^       
( ^: h( B9 D! i: K        if( nPart >= MAX_HUMAN_PARTS )        7 T) m: f6 T  B3 Z2 ]# B
                return;
7 h8 q5 t5 z3 G" y7 ]
, d' S9 n6 I0 ~1 m# [        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) U9 ~: I+ j9 H' g0 X; H
9 u3 Q/ [' w: ~1 e6 M, d9 ]8 p4 L& H& {' ?6 K, I' r
Code:) v7 B3 S2 E2 E1 F  r6 U4 m
#ifdef __QUGET_SWAP_FIX
3 M" `8 a) c3 [+ e6 l" e7 F' b$ M/ v& Z3 ]
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
7 C" X* a( Y3 k8 J6 Y$ @% F; x9 H7 x                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ j/ M2 {4 R( M- F. m) q

) L1 g- X; U  f& ]                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )  k/ G0 m" x; r
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# D4 W0 {/ x8 w. U' l1 ~
9 {: S3 N/ l, U2 {' n0 [                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
# Y7 K. ]: X: v                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 H9 O" [2 V6 K% A4 K) b* q/ W! U' }

- o7 L2 D5 V' p#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( H4 Z" O  b- x2 D6 l3 Nand add under5 v. q7 D) D- {$ Y/ u9 e

( l% D0 j1 O- z4 dCode:; |. Q/ i7 p9 B) @
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 C2 ]2 N& q' W1 W) Q                        {, f# W( c( S5 h6 Q9 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 );- T5 w& C  f& ]4 F3 U$ \2 \
                        }this
2 V4 d3 e  Y7 z+ ~* D6 v& g9 w$ x' Z4 g: T% D! y$ U
Code:
, g% v7 \( T( i# W0 m1 _#ifdef __QUGET_SWAP_FIX
3 h8 m! F+ Q4 v* c- d% i                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )7 n  I6 [! G) h: ^
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! I8 g+ S* A4 ^5 T( S' V9 Z$ U
" F" c. L9 C( Z% ~) D3 O) s
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )5 M, B! b; h( k- Q$ v
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( f* I2 ]3 O" ?0 {$ h+ N' F; h

: S+ G9 }/ a8 {                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )+ d0 U% B# G/ t0 Y
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 x1 N$ B- x$ R
, h8 W4 N2 }$ ^& [8 ^#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 k: L! f& C2 ]. D
! f! h; y+ R0 L. }

( j( ]2 l2 ]4 N/ J7 ]

相关帖子

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|飞飞世界技术论坛  

GMT+8, 2026-1-18 06:18 , Processed in 0.060861 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表