飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16451|回复: 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
( }& I* \) Q, I. S# c  uI posted this because someone kinda posted a youtube thingy about it :O.
; d5 B) I' j3 O5 ~$ B% g5 L3 ~/ M! c5 [/ P$ N. _
Find this in DPSrv.cpp @ worldserver
. S5 R! i0 U3 g- }# p& e) V! F7 i# @
Code:
) b  O- q" Y; _9 pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 p+ |9 ^! o( @: q* @5 d{
7 w! s  y) R. }% e+ T& ?" H/ `        DWORD nId;
6 N4 N0 x  }( L        int nPart;* M5 Q( E, S5 E8 N4 B$ P1 q
6 X6 x! Z8 l+ j
        ar >> nId;
- W6 R& L- {% R% c- Z! }! S4 p% W        ar >> nPart;               
' W9 q% p7 ?0 [/ N0 |* \        ( y7 R, N0 b0 b
        if( nPart >= MAX_HUMAN_PARTS )       
# \  `! ~4 T6 k1 I. G( a% R' |                return;
- V# V) n8 |. K; l$ F2 t! U, Q: u$ r% F0 f9 p" h# I2 C
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
  }) i% v) h4 s4 N  w* ]: V, {2 i6 s- y. N1 U7 R; H: R

+ b( S- E' D( u. G2 c: O- HCode:
. n/ Q7 C& [) o& l( W9 `( {- I/ D#ifdef __QUGET_SWAP_FIX
$ K; x5 g/ y# c$ U0 Z  m* E" l0 e4 |
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )- y! s$ |. \! c8 I! ]: @
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ T/ c: O! X3 v
' P! @# O# X4 ]( L, b6 A1 X' m                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
, O9 y5 n  O( H" o' ~                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 ]3 d2 R0 t+ E" x. ]1 N
- Q- ?7 X1 y* U. y                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )) W- a7 B9 f- s5 X
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );, J* h) h6 W2 \( W! ~& V
; T/ K! [7 h/ o" }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 [  V  v! Q' [5 `& \8 h6 j
and add under
' h, H/ r- j4 `) j0 G, `  J
' n9 W2 Y% a7 y' ]; G1 ~* ?0 xCode:. ]! [* b8 {  b3 B9 \1 l, c4 |
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 o4 _/ o! P8 M$ a
                        {$ S4 b" W% a; ^: D% K. w- 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 );
' ~+ \. s8 \# W% F% x% o                        }this- G+ p% e! v* s  P3 o

1 S. A/ Y. c9 ?; \. ^6 TCode:
0 m9 t5 `( \7 w/ j" R3 e( I#ifdef __QUGET_SWAP_FIX7 J/ C6 x. V0 C9 {7 f# r
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )( ^+ E$ e9 ]% ~9 q1 r
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& W  a8 ^+ [6 [: y
! k; e* q& F% ]7 b
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ), y% K) l- J2 Z. l" A
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ r) b, z6 Q1 }2 e
9 k& A+ P! i+ r6 Z                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )- q/ `2 ^$ s) ?# v9 c
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ j6 C  ^& |  u$ w2 M

. Q8 r0 |" \% @: W( |#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 O$ b( X2 g3 Z; r! }+ |

& X, A& |  E% f. Z# D! F$ ~) U: t* v! h7 H* J% h

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-12 08:57 , Processed in 0.060986 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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