飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16242|回复: 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 2 Z/ G" o( @! M, ?5 V" E" ?
I posted this because someone kinda posted a youtube thingy about it :O.! F; f9 D3 Z4 T( ]: e9 ^) h1 i+ Z9 m
6 P5 T& }' B; ?% |9 d/ c
Find this in DPSrv.cpp @ worldserver
' l1 J- P: N# l7 G' R3 s2 @6 W4 u( {& e
Code:/ P5 b+ q0 W1 W0 L  r  O
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); M3 ]; m$ D+ J5 B# a' s" U, {
{. q' a6 ~( I6 |0 b( f
        DWORD nId;$ a6 g0 y- V% v( R
        int nPart;
% W' p) z. y$ f1 e* W" I! g" C0 s2 B+ _
        ar >> nId;
, q7 _3 p& b% }7 ]& y3 |        ar >> nPart;                . ^& Y& |, |% {+ U  z
       
% G" F/ r: L% l  ]        if( nPart >= MAX_HUMAN_PARTS )        , T; m' k) q: i" j0 O) l
                return;
) B" ?( U8 e# L- s. v' @
! d3 e/ I* I4 p8 h        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, a  b5 F7 b) H4 j* q- ^

/ I6 c$ ^- }" u* |. f  |
' `6 R; `3 U1 Z( S) E4 MCode:; o2 k2 w0 a3 s# I% p0 {
#ifdef __QUGET_SWAP_FIX7 j( @: Q5 d2 c2 _, n
  w- n# ?  K: L
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )1 h/ A( `0 k, N2 ^) O4 F* a
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());8 J  U" w5 R+ ^9 }5 R, {6 Y

4 H3 s; J6 V" s: S                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )! I, g1 v! q" o6 Z; i9 B1 k1 b& v
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
4 r7 ?8 e0 `+ z. N4 ~; b+ y( H, Z" ^: r" P% B
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
; Z' O% }4 X( |5 X0 o2 S- h                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! {: C) c  |9 a# \5 n
: E' q" O4 a/ a4 O1 T( U6 o9 b  {#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 ^! Q6 \+ U# S5 h  Z. uand add under4 `" z9 \3 s. _8 e6 S2 j! T

3 Q! c8 u  }( v4 A& DCode:
7 ?3 b9 e4 e2 W, Vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( J% P* Z# J- k& J8 Z8 O& B                        {5 K  ^1 U) Z0 {! K4 {. p% q: j
                                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 );2 T, b' \; X6 m" p6 P  R6 J  s
                        }this
  w- \7 C+ W7 _: E% D. m8 x7 S5 d+ l8 E
Code:
& N( w# c" s5 P9 F' ^( R2 a! B#ifdef __QUGET_SWAP_FIX0 r+ Y- p- T) x7 o8 f# X, o! L8 i
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )0 U7 M" h# e3 F1 e& ], z  m
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ Z' G. D5 C% z! O
: Q0 X' @9 M! \                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
$ ]9 Q" J; @" G5 ^# T                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 ]) \9 }9 A' z

; s* Z$ \# A: [) O! g1 U/ N                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
! b; R2 \# o9 b6 T                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 x% Z+ F( B1 r9 }7 O% x1 \  z; P; W2 R6 C
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% G- g0 {- k- S# J( n+ e" I/ A7 M
5 ^1 w, l! L4 j; T; L7 ^
, @3 g2 h) a! _7 n! Q

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-29 19:02 , Processed in 0.221267 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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