飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16972|回复: 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
( k0 z$ `6 `- ~0 Q% I  M. zI posted this because someone kinda posted a youtube thingy about it :O.  Q+ r! K! p) H

3 k" I1 s' t3 |: b( n% sFind this in DPSrv.cpp @ worldserver; B) D; A$ z1 Z2 _
# N5 t. N% w% X- \- ~
Code:
  ?5 ^2 |6 @, p( j9 Q1 I# Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* T/ E& r% s3 ^- n; t4 M. [
{/ T/ o0 I. e2 h5 ]5 Y8 w
        DWORD nId;
+ d1 k8 V$ @6 R0 Q( K+ B        int nPart;  X  A8 d1 u/ G% _

# A% P' L: T9 X: `6 O        ar >> nId;
  C* g9 S8 A/ ~% }5 N1 N        ar >> nPart;               
' l, p1 O0 c6 i  H       
# J1 c! N& ~6 {        if( nPart >= MAX_HUMAN_PARTS )       
3 L4 [  T+ S6 [0 K& y5 w0 {/ L                return;
: b$ C6 T# `7 o+ K+ X" x* @8 o+ M' {! T/ `
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ A/ ]7 \4 r* Y4 h- F9 R& c; u0 G+ R, W) F5 z
- h5 J5 Z7 o4 _$ G; q; t0 Q+ k! ?
Code:. X! _8 q5 ^' q) `2 U& Z1 Z, Q
#ifdef __QUGET_SWAP_FIX
, T6 w4 D( \% J! ^
, J+ E. O) z% e( P! ]                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
9 \/ e9 p/ q( j' H% u, |                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());; b* {4 Z( I3 @" u, C. J
- e& V$ k  n* W7 I8 a
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
& ]' L  y% X) d! o                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );. [: i3 F1 o+ u3 g! P) y
) }$ h* S5 Y2 w7 i, Q4 N! F
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )7 f/ z6 g  v( Z
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" Y) M# J! X! }. t" u# j5 h' X& x; [4 |1 n+ L6 t: M8 R
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ W- q& G, h& D3 N) a3 ]5 ]$ k
and add under. @( V1 d: _9 R1 b

! t9 \6 C# @+ PCode:$ d  r6 S. o3 P" q% Q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 Q" I# y, f' U                        {" {& V, `" W6 ]& z5 U
                                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 );
/ W9 t* m1 ]; ]& `9 t                        }this
  r- Q. R+ |- C+ T
6 J0 q# l# b1 i( ?; r* T5 i; Z- }( dCode:
2 F0 Z. J% y6 @#ifdef __QUGET_SWAP_FIX
; n: h; ^- Q3 z- o, V( t* H                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )/ ?9 }3 ?! y4 T
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( O8 y9 P1 q) W; X0 D0 U: I7 c4 I" f- w2 W0 ]
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )% U8 h& I1 b2 j/ F, k/ Z- |/ H3 B
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 j: h3 P* z* h7 O9 p; e9 ?  Q8 `+ K) g
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
  |& X# Y5 H$ R& F% d                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) h/ L; _6 p5 ]
7 L% q1 M) _/ s' [  c8 N#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# S  o' Y6 V7 U6 _! F* {  ]1 |6 J+ B4 A# m) _' y

) f  ^0 Y7 C' E. \  @$ K* |

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-15 19:15 , Processed in 0.108657 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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