飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16257|回复: 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 , {0 l6 x% j% `1 O- a" R& X
I posted this because someone kinda posted a youtube thingy about it :O.) }' q$ f& |; X, i

* y! a8 P3 d: n2 x% `  E7 `Find this in DPSrv.cpp @ worldserver* e# \4 A  ]- u; d4 ]0 c8 ^. ]
8 l5 z" Z( q5 ~9 x
Code:8 D# P+ P. G7 N! ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( ]8 t4 Y' C$ `2 z{; Q) }& D  R. l
        DWORD nId;
/ T2 g0 \3 ~% ^0 s( Y& M        int nPart;8 ]& h7 Z- @' W" z: G) V# N
: p& g, z$ T5 T0 O
        ar >> nId;/ p4 M% l9 T# }: Q) B& L, G
        ar >> nPart;                5 C% C8 \% t4 ?
       
5 @6 b2 V- z) X& H. b9 k        if( nPart >= MAX_HUMAN_PARTS )       
3 b# N8 ?7 t; F& q0 a+ R                return;
- K7 k) m# o% M. c! W+ U& i/ J$ S: _* T
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 [4 l, S. s/ N: u/ ^+ f

7 E; m9 H+ t* f2 x3 L9 C/ l/ q, f8 ~& t( X1 L8 ]: a% Z$ Z
Code:
  o- k3 g5 i8 S4 v/ ]#ifdef __QUGET_SWAP_FIX( v# P1 m& z7 z- L

! p2 {- ~: F" O+ s7 L6 E                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
" `9 }7 R, g/ _( @8 l. h3 @                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! b: c" [6 _# M1 U2 {$ i
6 L& M1 K9 I& C6 ], x+ U
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. g+ }( V* n- _' a! b# h                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 {+ m  ]9 M- e/ F% R- s& b! i) x7 t
/ d/ m4 W) _; W( s1 m                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )) Q( ^! U+ j# J. \
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# ~- [6 G8 @3 {6 x2 p9 t3 I. E0 Y$ S. V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ O- m) C% P# H- C3 P9 b7 H
and add under
( N- T2 w' R0 e5 i8 C0 v/ E6 g
" X, Q! f8 h/ C! p; k6 KCode:5 h/ `  t* K8 v& J% d, R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* R& w+ K8 f5 e1 L' f! X* ^
                        {
3 h# A2 F# K) n- ?" c) M' {! P                                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 );5 E7 m9 \0 b' [! t- z) L% V8 j
                        }this
. g* d: k7 y6 N: v8 |* k6 q3 Y  \- t9 P+ s$ L5 I* x  A
Code:& f0 P- z  s2 ?& ~, S
#ifdef __QUGET_SWAP_FIX$ F6 {. {6 S/ E( P! z. ^
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 K. {% b0 r5 x) _
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ M; _: I+ p0 k7 I: ?

4 R- [) I5 V' ^9 D                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
& }8 R* N6 r, P% W# Y' T. E7 O1 l# u                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# n  B. w+ W+ [% K* o- Q8 e5 I- T
& r. B& v' Y7 M2 H8 q                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% B% s' r. i2 I# {
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- X6 i4 N9 n  g( D& }% l& b- ]
- }& L& s. ~; m# Y- p! _0 \
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 n8 W9 G3 _1 S$ N
; t: K; C0 t4 l- Z" C: J2 Z4 S; w4 y! b

相关帖子

回复

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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