飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16753|回复: 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
! Q( {) Q9 |4 a* O' f9 WI posted this because someone kinda posted a youtube thingy about it :O.8 W( s  @# G: F! N, {2 G5 `* E3 Y+ G
9 p+ {- s# i- Z* N# n& X( S
Find this in DPSrv.cpp @ worldserver
! g4 H# J4 Q4 Y# `
% p8 p0 B8 H  u  H3 zCode:
; \4 [9 J) E" c6 e% {* o9 _3 T! |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& x( G* p/ Z: C5 q" Q+ r& D" b{
, \) q% q( b$ I) B6 O        DWORD nId;- |+ M' f: _6 R* |% B# R
        int nPart;
- @# s! C3 P5 i* i$ w' o3 H0 \# \) c4 K7 d4 h$ M
        ar >> nId;3 A4 v& ?* r8 D3 t. l
        ar >> nPart;               
5 a% r4 ~! o) n1 P8 }+ S/ d. g+ _       
1 n6 B: ?; y. i: A' g5 q        if( nPart >= MAX_HUMAN_PARTS )       
) q, a% Y. p; {+ e8 N                return;/ u7 b* X7 P6 @) s8 C9 g
; N8 c/ K$ _( ?# B3 W3 S# N
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, N. Y* B& B, w9 Y' p, ^9 f4 i# ^6 h+ k
3 z6 L4 J5 E: j8 [" ^/ O8 e. y4 w: D& r
Code:
  m# `2 S( r4 @2 s/ ]#ifdef __QUGET_SWAP_FIX
5 s' |- r; u' ^, u% u0 ^: {) R- P( P/ O. p! o) T- T
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
+ ?# L4 S, K4 f; q+ }( t& i/ \                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());0 w9 u$ G" D) Y/ N" r* h

. C9 A5 E6 a9 q. l" \                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )0 x. W+ |( k7 R. d9 H, g  x
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 g2 t+ x# B/ ~+ ^  h" Y- f) H, |* d* H
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 j. i" a) Y. `6 D' z% Z$ L$ f/ I                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 w- p  r; s; K# ?& {- W
/ `$ b! p+ ^0 z" r#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- o' x, n3 v' D( X: i7 c. ~
and add under2 u# D$ x, \) R
3 g6 b" H! R8 S* a1 u7 p8 H
Code:; k* j+ M" ?/ v, ?- ?$ K2 k+ F
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ I5 f/ I1 Y  g! s
                        {
* O6 t/ I  ]% z. ~: }6 s1 M                                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 );
" [$ [' Q) j. k& }% j                        }this9 e& ?  {5 R0 V5 S' F% v8 ^

2 F3 e9 n! Q0 w8 a+ N$ c' eCode:  r; r+ i0 o+ t& Q4 T# N! j$ B
#ifdef __QUGET_SWAP_FIX7 W. _# ^  H7 a2 H
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
) f+ _( }5 s. e7 M  I                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 o( S9 c0 l0 F* M; ~) h' ?

5 k, Q9 }6 I1 Y- K% K& `% p                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
1 D( G' A5 s9 }9 h- k7 X2 {7 S                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& z6 S, k0 N: `5 \$ j8 E- D0 e6 B. ]5 |, d* x
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )5 \$ _$ E+ _: N  n
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! i  ^( x9 }: i6 y6 A  H! _& S9 p) H% R- e' t) w1 N
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 I2 t5 w: Y) f
3 k  E4 G- b' A; ^  \4 X/ [! I6 v: l" a( w; F1 S& e# [  v

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-28 21:20 , Processed in 0.061075 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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