飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16305|回复: 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 + l9 O; P4 d* J8 ^# y/ m9 E
I posted this because someone kinda posted a youtube thingy about it :O.4 {) ]: B4 B) g1 H! ]

- ]: @! N, A2 O+ B  U/ I  t9 F0 @Find this in DPSrv.cpp @ worldserver1 ^. A: P5 x0 P/ V2 ]
" d/ {/ _# B% K
Code:. @3 M; k- Z) q: W! I3 e2 @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, p* j7 V% Y1 C0 b9 o" ]. \% ~{
2 F% @: L7 l: \3 C" i! w        DWORD nId;
! b: T7 w! ~( ]  A        int nPart;; `+ s) v% p! p7 Y* _& ?. n6 f% ~0 x
0 M1 y2 Z) C2 H0 k. [' m
        ar >> nId;
9 P8 A& s4 m! U3 a        ar >> nPart;                ' R3 ?9 F/ J( ~/ O( w
       
2 r% }: E4 t+ H5 G        if( nPart >= MAX_HUMAN_PARTS )       
7 j! m2 _1 P0 J+ X+ v% E                return;" F" F) y: ]9 t3 H# i
# F% Z. S; \5 _3 x) {* m
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' Y  F5 z9 ^8 z) |2 }- {! {" A3 {" J- `" y' n" i" ]! W. J
- x0 m$ j6 J5 W& p9 a
Code:
" c! h# E( \8 b4 x3 r* `# F: l6 }#ifdef __QUGET_SWAP_FIX
2 y( m4 u" a- ~
: m. [' j- A% c0 y; t! L                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
$ Q1 _7 \4 T. c7 O3 b                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ I- V! P# |  `; v8 A" J- L) X- {* U% X( M7 G' k
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
+ m) h  Q2 s% C0 B" {                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- D* L# ]3 L7 N8 u2 G6 [3 \( R0 B1 t
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
' }+ A/ a+ A6 E9 C                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ N) \4 i* `; q1 b/ B

% `5 R9 m1 V) |5 u, H#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 w- N+ k. L& Z  ^
and add under
$ B5 {1 A" W5 f0 B) Y- X2 l0 E4 D7 f) x( {
Code:4 U+ W/ Y" y/ O0 \7 S2 H9 X3 ^; d
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
2 r2 b" o7 L5 V/ s7 Z* h7 j                        {
( R! L+ m+ u; R$ Q/ ?) ~3 @                                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 P3 O# N) k/ C" u' T1 z# F
                        }this5 c/ H* S3 _& e- t  A

; E7 |" l2 Q& n+ s; `Code:
- Y2 i) E5 O) Y# R3 K9 x" i) N9 ]#ifdef __QUGET_SWAP_FIX
, E8 E* M" J, G6 q. }$ H" C& x( C                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; [- }: f: w# {                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! o: Q( Q, Q- g4 z' a, x
! j- |* B2 J4 C
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
+ O) @4 e+ g3 o                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! ^1 P6 a- b% O$ F/ ~: l$ \

/ b) i; J5 M8 ~0 `3 D                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )1 R- n: c2 {# l4 a% B
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 N  m( \6 y  D! Z6 {
0 o; `8 `) t) @* m6 a#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 Z) D0 T* M' c
$ E. `' q- `4 [1 j9 A# {) p& }
6 X$ K: n% x; ~5 I% R% }5 t: r

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-4 03:47 , Processed in 0.060098 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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