飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16813|回复: 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
5 L0 t& r3 F7 nI posted this because someone kinda posted a youtube thingy about it :O.
2 D# s" a& n  r$ P" I% e2 z7 w6 l
2 J2 R- n6 o0 t/ d% ZFind this in DPSrv.cpp @ worldserver) n! z$ ^' J2 y$ A
: ]" k: N, L) G% F9 [* z8 r
Code:
. n, |0 n5 L. S6 Uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' N) ?* t$ I3 v) C
{# ?/ Q/ ]. T5 }) m
        DWORD nId;: a4 I( f) T1 c7 v" a+ I
        int nPart;& ?% a1 p2 R2 L( X4 r3 J
* J$ u/ W* c6 v! }& W1 o
        ar >> nId;* T6 D; \0 ^! M, p, v
        ar >> nPart;               
8 E# J/ P) s& F5 H0 Z& k* F        5 u+ n2 [* j, p6 J& B6 _+ P
        if( nPart >= MAX_HUMAN_PARTS )        5 B# n- h! m( Q0 j  @% H9 z7 X; ~4 K
                return;
3 ~/ C; s6 P3 e6 b, q, Y0 G8 `: |) `  n7 a$ i
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 Y" H9 G; p. E+ t3 `3 R/ C

2 e" l. v6 j6 C
# K6 D7 ]- w4 C0 c" T* ECode:
& J% J. X# D8 G6 m& F#ifdef __QUGET_SWAP_FIX4 }, Y5 y! {1 e" C
1 V8 }3 N3 C9 Q
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
) o9 e/ i, s9 L1 R/ V                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());2 o7 Y- ^0 b" L
" j; [) @% V) Q9 W& D
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ). {3 o4 |' h) T
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: r4 w! S! z% k; y# Y  ?( {7 T  S6 l3 d; y/ I
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
+ Y4 x, v& i  R1 [                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: J" E9 K; O% Q% i* a" ]
5 @; s) w4 Q+ Y* N#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
) Q% J. k+ V2 ~" a6 yand add under! Q8 C4 A* j. ?/ w: v! N1 g

: t6 G8 M# b! e) \  E% Z2 L2 e" T/ VCode:
+ ^) [' \, p0 s. P" F0 H7 U9 t- Iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! C. h- {. Y- p0 c) u1 A+ N, R( U0 e                        {
4 v% r6 \- n4 n& 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 );
, q$ l' A. x* l; f                        }this
# B6 b& s- g0 }2 Q' H; }
4 R* E. L2 b1 z# Y: q# \3 [2 k: bCode:6 j1 V$ Y9 {8 h: i' ^: p% w# _" W
#ifdef __QUGET_SWAP_FIX2 v" z% {  _+ R: S! x
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
# {+ K; F7 ^( D8 `5 r6 g                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 b# n0 j: A6 ?" S

' Q5 r- N$ {1 }                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
' i/ k( e. r1 k' |                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" A# U2 h* Q5 C/ t) W

+ [5 H9 f: ^! ~5 T9 ?& {" \                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )) x! a, F/ Y8 D
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* j/ M4 z& \$ ]' u) C0 H0 `
. @. W9 V3 ?2 Z! s
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 @) ?1 S, v, p1 U2 `6 a0 R

% N! b0 j+ @& ]: \8 N- ~2 j! t) ?( B; S0 ?! b9 Y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-2 05:40 , Processed in 0.066849 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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