飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16816|回复: 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
! u  Q; b& K$ T5 ~* \* n9 aI posted this because someone kinda posted a youtube thingy about it :O./ c1 o1 N3 G5 _0 l1 q5 H

* S" S: q: u' B" ZFind this in DPSrv.cpp @ worldserver
) C. k& a5 K6 @  a
# M1 L* O$ k' i1 m; tCode:
' ?5 l( _- b9 j1 j0 Qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: s/ c6 v; w9 E, t* w{
; }% L0 r: M4 q* d        DWORD nId;
+ i2 _, h+ [9 Z% h3 ?8 s  N        int nPart;* N3 M3 q7 d7 V0 j/ u7 C* k: f! M' i
& F5 |  Y) Z/ V! s. |6 M
        ar >> nId;3 ]2 b5 A) y1 X5 }
        ar >> nPart;               
- r' }0 P# w0 x7 O) V; T       
  S0 T5 a7 Y; P7 N; s8 v        if( nPart >= MAX_HUMAN_PARTS )        5 U% E: x5 U8 t
                return;
( I2 s/ e7 J6 w+ H$ O+ _' E+ g- p# P- J6 u! X4 ?" h, ?
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" |3 x9 ?7 N1 g. \
( d# G8 {7 \+ I! Q- w* \  @+ m. ~( @2 q# t' V$ |) n* G- A
Code:
8 k' ~* x+ }" A#ifdef __QUGET_SWAP_FIX
& P+ U" H) Z% }$ {! r
* x# V1 f* Y2 u/ V+ j! V: ]9 H( b. L                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
- u- B3 F1 K( I' }- S                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 s" L3 g4 y# S# _8 }
; K; B8 p% s9 P                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
, r1 K4 j/ p. f  X  I7 h3 Q3 g0 c                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 i3 m, t* z2 e' k5 w8 |/ o" d& v! \& I  B
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 @! ~- t6 y: p- P. V! o# h                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& G$ ^6 R& l' |( E9 `1 U9 u% U" x3 j4 B# D% R1 w0 T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. |* k- b) x; b. |& H. z! L' ?, _and add under
2 q5 `9 |! |5 r% j% E" _7 L5 m  I/ L+ ]. i9 ~+ ~
Code:* _7 s8 `5 X- C9 n
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
) J8 n2 _' k" _+ ~$ B: @( P                        {
6 s+ J# |4 g, y2 s                                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 ~) `' {8 F3 m/ P
                        }this
: Q- a  }6 C  l" ]& {6 O4 }& x% Q  P& G8 o. O
Code:
. }, i& D9 b( z5 ]- E#ifdef __QUGET_SWAP_FIX% G/ f4 T6 q9 V) f
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 F, w7 G* ]5 ]1 k% W                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ w" [( v/ a, {
. c! V. O2 X4 }' }" G" |2 h  |
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
3 E0 H; {+ e; u& e! ?7 Y                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 P* i3 _0 }, `5 S4 {) X2 O8 y

" ^& }+ H6 z3 N' a) {! |: c                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
, y: ^# G' w0 J* s9 j2 L( q& F                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ S# b- T6 \2 n8 \
) p- L: Y$ M, d; F: C#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / k+ ~( J3 S2 C  O, h, Q" p9 Y. n

1 f7 ~% h5 P) u+ z" M0 j! m
* R9 _; `" O9 U) o& d+ A: V0 u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-2 10:48 , Processed in 0.098826 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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