飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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 ' p$ a6 ]! U' {$ j1 K
I posted this because someone kinda posted a youtube thingy about it :O.
9 i: w$ ]: F: ^2 ]0 }8 k0 _$ X0 u) Q% `/ v4 i
Find this in DPSrv.cpp @ worldserver$ e% a- @$ @) O+ [( l. |0 Q

# ^& R) T$ n5 dCode:9 C2 Z: i; @0 P- u6 `' I
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 B# Q/ A% s  e2 i
{/ B# {( P" u/ i5 k7 g1 q: N$ X0 X
        DWORD nId;
3 k  u* h6 p+ U: P        int nPart;( k/ ]3 q  ?9 {$ ^( ]
7 c5 }0 J- F7 [" n3 j
        ar >> nId;5 z0 Y' M+ i9 g; l) X
        ar >> nPart;               
3 E: Z6 {& D! R; p: B0 [7 V3 A9 u        - u/ S" n/ W: n& |& t& }/ j
        if( nPart >= MAX_HUMAN_PARTS )        ) m& o' n: l4 C! W3 G' _
                return;: E7 w3 W, ~3 D: h5 G3 c3 E" _

0 X* R6 ~$ u  H/ H        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. U% h7 [* ?) X- s
3 B' O# U3 Z% H8 E' D
4 d( L  Y0 Q8 p: x. b: Z8 ]/ Y
Code:
5 l: ]  a8 D2 E% u. @% ?#ifdef __QUGET_SWAP_FIX6 s( f3 I% n) ]# D  I. U& S
4 m( f4 h" }/ L8 c' \  N
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
6 B, `2 `% x0 m+ U' Q                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ s% k' E3 a3 N6 n3 u: x
$ o: I0 g0 I; z* c                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
; |5 u! r7 H- j( k                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& o) N1 H: E* O7 O% U5 h
" F' {2 K& u5 C8 j" X                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
0 F+ J7 y) J' v& R2 Z, K' f                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 d$ J1 p, \) g

: `0 ]& `0 [/ A+ B, c$ Q0 Q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 l5 D  |3 b! b
and add under
5 V1 B0 Z+ o6 F$ B
! ]2 B1 T/ p8 }0 [) \9 LCode:+ A" F- z, r- j% t* o7 R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ i* E: b& Q4 k# y                        {5 W# s1 x7 j0 {+ i1 w6 m+ A& Z& `
                                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 |1 q, \( Y6 @0 n  M6 n                        }this
6 w. f2 t# y1 O# G( A
! W. k' l# o. q& }  fCode:
- G; E% [  v) ~9 N  N5 d#ifdef __QUGET_SWAP_FIX
* t9 j0 u$ k$ O. z5 l                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ), b0 ]- a, z. M' u  x& V
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 b+ s* m" w! \$ A6 e( n
0 Q: C& K! @  Q: Q. o" _                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )6 a( O: H4 Y9 E9 I" M
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& V, y7 V2 ~+ z: k6 }& X1 }4 }, {- g# t8 P5 @& r
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ): o" z0 ^$ \9 [& ?' E% W9 x+ Q. w
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& q. D: T5 z0 [' x! @% {! y% e
9 P# z* X: k0 [  \- K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 P& n# d& w2 ]" @; w) c

( {3 d8 G+ l4 z5 V' r4 x: C4 r
0 x0 |" c0 z5 r0 e  j

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-27 10:51 , Processed in 0.069257 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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