飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16220|回复: 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 9 A( U" @  K4 c0 ~5 l
I posted this because someone kinda posted a youtube thingy about it :O.
) P* ]  @- S/ U! j( u; O# s2 P+ v0 z' v$ J
Find this in DPSrv.cpp @ worldserver
& t: {+ J# N  y1 m: z8 @( ?1 H+ A2 j- h: J: ~# {+ @* ~
Code:
; o4 x5 d  J" Tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# ^; ^7 [5 `8 z0 ^- a& p# h7 \
{, f7 i: W& R7 h* q/ v# e, @3 X, C
        DWORD nId;
( g. k) ?$ z  [( b, {# K        int nPart;
& O/ j# o: X) l; j+ O+ M+ i0 a! x) g, E
        ar >> nId;# n% _+ v0 n8 r8 D
        ar >> nPart;               
& J8 E- I1 _, ?8 u2 V       
& A# h5 i3 S% x& ]; D        if( nPart >= MAX_HUMAN_PARTS )       
0 i' N* s+ x: f' G( b- S# \+ b8 r                return;7 Q: q" A, J" v/ U9 L; A! q

. h9 ?. d3 M$ g6 G9 R1 m        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 ?! U7 Z. ^6 l* Y
7 f- t/ [2 g: r# i  ?/ U  b
; ?5 [: Y; c/ W, j( @Code:3 q0 y9 I& P: W
#ifdef __QUGET_SWAP_FIX
$ y. }& T# _: D; o  G: P, L  V' U4 x# Y7 h
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
" k3 B0 |4 M+ e& P8 _8 z: H                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
: y9 `7 Z( B4 n- w! [% X9 l- n$ A0 Q
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )( P1 ^8 M$ t7 {; q" s# H! |9 j
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );# F' n9 e2 y6 m6 s
' p9 n" C; o, I. t( l6 L7 k
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
: Q1 e* ?/ P: X* A' P                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* h( @) F* \+ P  U  J+ T
+ f7 ]( h1 A# i& d" ]. A, R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* R/ s8 e/ d* q1 p& y* E) S1 y1 z0 r
and add under
7 x- x+ W+ C1 a( v3 y0 d
$ I! s+ v! C7 J5 xCode:
# h( Y, C) [8 _/ y5 kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 b& W( c3 r' |6 Z5 {% r" ]$ v                        {9 j' C/ `8 A( Q7 f  @1 j: H
                                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 );) z( R0 f- z: q4 _) e
                        }this5 `3 i2 g/ M8 V0 M8 K
6 Z$ v& S# G# b5 S7 Z
Code:
9 _- J# ]! `7 S' q6 V* `#ifdef __QUGET_SWAP_FIX* ?+ F* o! L- P5 D9 H- t
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )6 _6 y. N$ ?& N  r+ ~
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 H" r' e3 T* ~& r2 x; F' c2 B5 p7 T1 H( `2 l
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )$ T" ?3 y4 s* u3 ~
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 s8 P9 M% `. D2 z' ?8 o, {
* T6 X3 b$ ]  G, d4 g2 D
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )$ x& A6 U2 P* S% K  g9 z
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& b/ R+ _  u9 i% L8 R8 y
( Y/ X+ e* F- \& T7 @5 f/ k#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 L8 Y6 |9 z/ u: f* _
6 g9 N- I: ~3 f7 O( s8 W
- N6 G4 o' I: a7 N0 f8 l" g# S

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-26 21:47 , Processed in 0.078484 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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