飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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
: H% e9 C0 @6 V1 }$ F9 T* SI posted this because someone kinda posted a youtube thingy about it :O.! r0 K8 B0 W/ e, Z

5 s! l* b# x; H. L% |( ^; g0 cFind this in DPSrv.cpp @ worldserver! O! I  d5 {  M# D' ^8 l9 I# |  `

# ~9 P& \+ `' {# h! r1 ICode:  |+ F: P1 B+ B: {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 b7 H0 `- F8 ?. S# {; B% o  t{& r" o! O- B# q- m0 X, S
        DWORD nId;
" E  p- @0 d* f1 ^4 B; k1 }        int nPart;$ G/ L4 r, F7 j; l

. |3 n6 o. ]$ v0 P1 A- N        ar >> nId;! f" l( E# t3 E. s( e  P
        ar >> nPart;                . n* G% g! Q' ?& f) |. B2 T
        9 w% G( _" Z% X. }! ]' S$ Z
        if( nPart >= MAX_HUMAN_PARTS )        , b  O8 p. n0 O) @0 q0 S
                return;
5 e. z" ^4 I+ l5 `
% ?/ K7 }% x: R. ?8 F. W        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it* t5 Y% L, t1 F4 ^7 N8 U0 @) V, f7 l

5 X0 S7 d# S' H+ L! ~3 V! K
6 q. U3 K& L2 R+ J7 `3 N, ZCode:# E9 Y+ m& |) z6 K3 N$ l
#ifdef __QUGET_SWAP_FIX+ T" z/ J. a5 f0 A
& r- ?+ V7 I/ {3 i6 @* h
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). H5 b4 `  c7 Z. o+ G
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ q* Z* ]) H% K2 Z# l0 c; X
$ _, h4 I) g; [- D% g                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- t" ^+ o: p. P3 w2 V
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# m$ y5 T: j2 {0 o0 E8 B, j
2 L8 ^- a! t) S( I9 L& I% k' |! ?                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
* E, K3 }  q6 }& p- n# e                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* `" S7 a) G: K% h
: K& C# i) I% P( ]' B( n#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% |8 ]1 g1 W: e/ O6 i8 ~and add under
3 g$ k$ X3 C: f4 Y: r
) s8 s  N/ E. M4 C0 }) u( NCode:
* x# b3 Z2 T$ [* [; H' iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ m  E4 C+ f# M3 Q# H                        {; x: A. a5 Z3 E9 j# Q) {
                                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 );
; _+ \% x5 x: S/ }                        }this9 J) M, Y: o% Y1 ^/ Y" M' n
5 O7 U# B9 L8 r- U2 X: p- r3 w
Code:/ C( H# I  p' A9 x. L- |
#ifdef __QUGET_SWAP_FIX
  H" N* C" w0 \8 K6 o  j" p                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
$ V1 t  m" Z2 R9 w1 d& q                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 e  w& D; o4 m2 A

  e) X- Y7 R9 d+ Y: |7 a& ^& Y) b                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
  d# V" c3 H" n% J* _' f                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( R9 O" A7 \2 n! l( s
3 |$ x) d$ r3 b1 @. i& t
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
$ t. }0 f& w5 @; d                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# K0 y4 h! \$ r. ]- T1 R' h, V% q* z% P) B, ?) }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ( k; g% c6 o/ p: g1 c8 o* y& l% T

7 {. j' A  y) p- T( l- r
% f" G* n1 L3 C. K( y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-27 19:24 , Processed in 0.116560 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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