飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16759|回复: 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
5 x& f0 z9 t' f4 @I posted this because someone kinda posted a youtube thingy about it :O.4 ]) L" \0 R! B" y- e7 |
' V1 W% ^/ Z0 `
Find this in DPSrv.cpp @ worldserver
* }# y$ x( P. |/ h2 J# h1 L) w' P
/ h  W4 ?/ B: OCode:" M9 U+ L- j3 V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
  W% o: [8 A" b7 ?3 k2 \{- J) G3 A' l$ @4 ~$ z5 ?( E
        DWORD nId;
. _$ g# y( l; D: g- V! |. u) B        int nPart;
& m; O6 z4 E$ p: U9 `$ E
& U) Z. m: s) {% Y7 Y        ar >> nId;; J; B- |$ _. |, ]7 i/ J+ p( h
        ar >> nPart;                4 t- P1 {- q. o, I9 l
       
1 B& Q" r5 R% k8 A" f3 W& H. l+ [        if( nPart >= MAX_HUMAN_PARTS )        + \, A1 q5 z) q
                return;8 p0 o  S/ w& d
" n+ J  n# o) x* E( O5 O( o
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 a+ P( c  h8 ^% w' _/ Z( b+ A8 F6 w  {  c& e7 e4 ^" _8 T
0 k9 ]: Q) D( H$ h3 p8 |' C! @
Code:) B8 L$ p4 G- U7 W; j
#ifdef __QUGET_SWAP_FIX# e7 X% \, b9 b0 e  r0 T2 x
4 D$ E/ {( U4 v; h" w
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
% O* s+ N* F* d0 X3 B                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());1 J' H4 L. i! D1 c3 H/ F
' K; @7 V9 T+ ~+ p: E  k) y
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
, S7 N1 @9 G( I5 {# D2 g( Z5 g                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );% {9 B; F- [( m# Q! _

, d, M$ B: G. A; C' F                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
; ?3 ~2 y8 }3 i) q* o+ N                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- d0 f9 R6 Z5 Q0 v& ]# Y
6 m! R3 X( E& P; e- j. U% {0 U  M5 a
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  x' j: y- f& _- o1 k6 m# _5 k
and add under% R3 N& ^5 j# H; |

) Y. p. v) e" U! d# N( ^( H# XCode:
$ ?, }5 T$ y' l4 r" k9 [' R, D9 ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 h7 J$ J4 v( X& \; |: `                        {
% W* s4 Y& s! T9 T                                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 );
$ A" k5 R. U$ B/ }( Y/ m3 S- L                        }this
. Z6 ]6 o$ i, R  H5 W0 l  L
1 {; {' j% n8 P: c* R6 yCode:; |& Y1 a+ H  [- f
#ifdef __QUGET_SWAP_FIX
* p0 Z0 I9 A% _; M                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )- m! u6 `+ e/ k- G2 d5 H; m9 F
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 j3 X% u, T" h  ?

& G6 {1 v0 Q( Y& y                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
% ]+ z2 ]" X- A5 Y" |* f                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; j8 S; v: T: K. R7 Q7 f- ~
6 q4 c  E7 c! w& a
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
  e+ a( Q4 s( Q1 H                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* R( {' K' X0 l( S
+ E3 j! Y! {9 b0 |" R2 R* |7 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 R' A  L! I. b5 c) R7 S) O" X" O3 s! v1 u. I, v0 c+ n
9 C; _  t$ R4 Z: Y. ^+ H

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-28 23:30 , Processed in 0.074374 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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