飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1070

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1070
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 . \# x- B2 S: s! i# K( Q
I posted this because someone kinda posted a youtube thingy about it :O.
3 H. I2 K, E( ?$ W, r: w1 V' p0 y4 \& t; o- L. [  W* o6 x9 N
Find this in DPSrv.cpp @ worldserver
$ x+ c# _  s; ?1 O8 k
3 p) O8 j- S; ^. tCode:
! L. P+ U; d! l2 J' l6 Q! ^void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! o9 z. B0 W2 o: b{
" ^% @/ x' T! _: q        DWORD nId;
/ R/ |9 Y6 K  V+ @/ L        int nPart;5 }( n( D, j! b: }/ f, p5 O; H
$ U; ~# R, n( g
        ar >> nId;: C! F* k) y! ^! }0 H5 a
        ar >> nPart;                ! ^9 B  p7 y5 ?: P+ G; }1 A6 {
       
- M, L+ i; b$ f$ h        if( nPart >= MAX_HUMAN_PARTS )        . Y9 W$ z9 T5 O! q. W% t
                return;8 c6 J' ]/ Q. S3 v0 V: m- ?4 a& R

9 I) h+ H4 h8 o$ B2 E        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 Y7 ^$ Q! i9 R

# r9 m) W' U7 w. t* G1 Q0 t
. ?1 }3 R- q1 F6 v# `* dCode:
8 r# i* B+ @5 l/ l1 A#ifdef __QUGET_SWAP_FIX+ j9 H# a+ ?8 B1 g2 p
4 Y6 ^) y) K* q5 M; f" Z# ~/ c. j
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )  u7 G1 F  ^* M5 E( S0 T
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());: s* j$ `$ K" M* b

3 k& E/ _3 @# ~& \                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )0 M' B- A) O) v  {
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! [8 h! [0 E2 i" k# J% C9 s$ V. U' l0 d7 l5 q  F
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
( X% \& B. g2 b' b                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 n( n2 q/ N! b" A4 }
( E6 U5 n% l( R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. Y) ]) m! U$ Fand add under6 Z2 O6 ?- |1 q
* h; U' Z. p3 k
Code:8 j, Y5 T: J6 Z0 c( u8 N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 x" j) f9 h. F& z, e
                        {* f% m8 n  b, j& c* \4 g3 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 );
; |/ l3 W" q& U+ u                        }this
1 v2 K$ g0 I' h6 z- K. V+ n1 I* W$ K& [" q8 e  |; ^
Code:
# [8 W) t; P0 w+ g#ifdef __QUGET_SWAP_FIX' O& X( l' {7 d9 |- ?3 y# ]
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )( a0 N8 I" y3 f  _, I8 ~% T
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- {0 w( O8 t% E5 A" }9 B

9 c2 X: C2 I  w                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )3 e, l2 u7 k+ O: Z0 R$ Q6 v# a% }4 t/ Q
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ m7 |; Y8 s3 ?# y0 D0 ~

' D( G& U9 t' u. v8 @                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )  G5 u) j3 x4 c6 q
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 N. h7 |- g8 O. T; b& ~) }- L+ O) E, Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( r( Y" g3 |) D4 ~- R& f  \/ h: P  j4 F

1 C1 Y% f" I4 u0 r& d# K, }& z

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-5 03:48 , Processed in 0.061623 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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