飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1068

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1068
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$ m% u# x0 j) `3 C
I posted this because someone kinda posted a youtube thingy about it :O.( V% t$ x# A" y$ j( g
+ n& y+ x& s# P$ g, g
Find this in DPSrv.cpp @ worldserver
+ `  v/ S2 L; H1 S# E' S; E) \# u$ P( q7 c+ u+ s! E
Code:
8 q) R8 e0 d& [8 h: o$ ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )" W6 n) {$ y: e0 `2 \8 f) x
{
0 H1 B0 d( k; Z. J& U        DWORD nId;% _9 [1 P& W# u4 V& k
        int nPart;
1 {, X2 B" p# ^9 s0 r7 P
; g+ U. }) U' l  v3 Y! u$ W4 T& f        ar >> nId;; L) z# i  C. f( t6 B" {
        ar >> nPart;               
/ }6 @& ]5 d3 }. V# |       
& N- e7 W1 j5 V  F: o. g) q5 V        if( nPart >= MAX_HUMAN_PARTS )        , {) }. S" |& a& j5 ?6 d' s
                return;" K1 h8 ?/ u, G3 [
2 G- ~* K' q6 H8 W( f1 `. E
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" X* B9 }# C. w, y' ^: O2 W

2 e8 d( W3 d" T7 _- J7 ?: d# a/ ]' B9 _6 q: l+ _
Code:1 N4 F+ W& t% A( k, I  |2 K
#ifdef __QUGET_SWAP_FIX
$ B, p* R8 @9 \) h& ~* F2 {9 ~# Z8 h+ l1 t& ?2 `& z. @2 l8 h' D! g
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
5 \% Z. C& z8 E- A5 J                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( k5 ^5 ^& j; q% r& r
: E$ C. y# \2 K' c6 ?1 Y6 @
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ). K9 X+ u1 g/ V% f
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );6 {% f+ m2 z8 X  q2 |; _  X( p
) A5 D' @/ A) \
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
1 X+ T# s# t7 t# t                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' ]5 m) j+ J  M* K: ^% ~
! d1 S- l# U8 r  z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. p2 k; v  H/ q! U/ w  p
and add under
. E+ y) @' [, L, A* @- U
/ L$ y  \; Q) M7 W4 TCode:
* X* `/ E1 a5 C2 M: l% ~* O. _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' S9 w9 R- K/ H. N
                        {3 H2 _! X( U9 f, k
                                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 );" X* W$ E2 g5 V: Z# i: w0 k9 R
                        }this
+ j/ O' u3 t2 V/ [+ |4 W$ F; r
8 |* J1 C/ o* v! W9 RCode:
7 v. S! Q; N3 m4 |8 l6 t4 h/ U#ifdef __QUGET_SWAP_FIX3 O3 Y6 W* h) _% e  L
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
+ Q4 a8 a3 D# t* b, m% r5 v                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. c& _9 J2 o5 I" K
) [# w/ w0 a6 c5 ^
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )2 ^7 @8 F- R! {3 O# H$ k0 b
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 x' e9 C/ p0 u) m! o+ V- Z% Q3 J
9 k3 [& B3 f0 _8 e, ^" s5 C& O. ?: h                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )4 _7 E# ]8 Q3 f2 ?" ?* k
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, ^( j% f  C7 u7 T: \; _
( ~# O$ ?4 f- @8 E7 X) r% O( @
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 I# g3 |: ]( b
% D. z, _1 j' Y. J) t; T9 m- M2 |0 e2 [/ p& \4 s- u8 r

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-28 09:24 , Processed in 0.058040 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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