飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1082

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1082
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
3 p: t8 D1 x* ]. t9 nI posted this because someone kinda posted a youtube thingy about it :O.
' H& |) d! k3 r6 J2 v$ Q
9 l: ?) C/ j/ Z  E0 G6 z( ]Find this in DPSrv.cpp @ worldserver( s; r* {0 ?, `' L' [

) J8 I. S2 r+ M9 HCode:: Y) j' U- l( Y, N' F0 L- [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 t& w  @# D' P+ Z3 m( ?+ ^  h
{/ o) d( w( f! R; F$ j0 u
        DWORD nId;
" d, |; s$ \4 Y+ f9 A; N        int nPart;
5 U* V: i7 p  v* ^
- T/ b% c  j# l0 [. j9 ?. x        ar >> nId;
2 h* ^+ d% [' ^+ r8 m        ar >> nPart;                7 ~' }# V. p/ @$ J
       
7 b* @+ v7 K0 A! Y# e+ y( z" F+ G        if( nPart >= MAX_HUMAN_PARTS )       
' x% \( a" H/ {, A& A/ B                return;
4 A/ I& v; {2 B4 Q$ T5 w' d- F4 g  i( r# o
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ s! M% |3 `( f# h) H2 _$ n1 B& J  Q/ C1 Q7 F
1 h; ]+ r( f; {! j- e4 T: [0 m
Code:9 ?/ c6 z! |5 g# \: M; \: d9 \6 C
#ifdef __QUGET_SWAP_FIX3 W) \. i* U6 g
( ~7 P8 P" X* T& ?; }
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
) u1 Z, N2 ]% H; b                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! M/ i6 t2 e% @! n* o$ E
. `$ I$ V2 H3 t
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )3 S7 L. F4 f8 [1 e
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: \9 h: K* y1 x9 i  Q' u; l. M+ H
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
) K3 q  h+ {. d; M9 W, W                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( m: l8 q# ~& p1 \! U- _+ Y1 H0 d
# x# q% T, u' `- G" g. Q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" `9 w; }/ ]& B6 ]2 D7 R$ Yand add under* `- ^, h- B" q1 v# C2 J
5 B; t1 ]$ q$ Z
Code:
0 E7 R+ l. h3 u0 k& z' ^+ }9 C0 J/ Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). n0 P( d0 e2 `& e! B0 @4 g6 K4 ]
                        {7 K! P0 R; J" r% N: 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 );
4 v4 V( y+ |  m5 m                        }this0 Y% I) S/ R$ u7 s2 @2 Y# G

8 R5 z7 I1 b6 c# @/ ECode:4 W' e  I5 K/ `5 T  ?
#ifdef __QUGET_SWAP_FIX) ]6 k0 z9 ~' b
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
0 l$ {7 L& p$ u) h! M* x                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' L2 h3 @5 b; p( x$ {. [* V
$ R; t8 J. T- G9 v) X; R
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )$ O3 z4 R- N  L
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 K0 F  \6 F) z( q% L# V; Z7 U

2 }- @1 \. R' ?1 M5 F$ k# k5 ~. g; l                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 p+ W# A9 G0 {2 S1 c  n( O; M
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* J. U! p; R. x/ e, O9 a1 m) b# X7 W" H4 x' e0 v
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ V$ y# [, F4 i* [% z' g, t& _8 w3 L' C2 U( r* e4 F

) B) O4 L' q# i/ G; Q

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-5 22:25 , Processed in 0.075874 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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