飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16245|回复: 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
/ F2 I. F. P3 {4 m2 \5 XI posted this because someone kinda posted a youtube thingy about it :O.) c3 t0 N. p+ E+ Q* s
$ e, m% H; o. r" [
Find this in DPSrv.cpp @ worldserver
, E4 n7 N# ?. N) K2 l" ~6 W7 v% `/ c
Code:
! H3 |0 Q% E5 W/ l# Y8 Z( c* qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; |% ~/ E4 A7 q9 a) M{4 w: c7 S( a0 {( q# Q% D, I
        DWORD nId;
  V, G6 C4 T$ D1 k& {! W        int nPart;  R. Q" X) V1 N  H) q/ }
- W. F3 f% y9 Q5 Y. H  x
        ar >> nId;* ?7 j5 x! P/ i4 {* T, h3 p
        ar >> nPart;                . E3 J& t: l7 S) ^1 `/ [8 u. s
       
/ |2 @1 `# m6 |9 W& [8 A        if( nPart >= MAX_HUMAN_PARTS )       
9 `0 z2 P% s' B3 S/ F                return;
0 k8 W/ E$ `, [! n* K8 U2 d, x; X/ ?- F. y1 Z+ |2 C# k: N! T2 R
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 t  ]1 m) @) p  }9 z; G$ @

* d$ w6 z8 e* ]8 V6 A- I( t/ h3 t1 }! y) U
Code:* p3 I. w  P) ]& m& i6 g' F
#ifdef __QUGET_SWAP_FIX
( ~+ P& F" v0 W& V& u
9 K4 N) y0 p; Z. |/ D                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ I7 B- Q! i4 r' q1 D. ^! g
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());. [1 H0 x; F. q4 q4 s) {& a# o

* b3 P# W* I; |3 \# O5 c& R+ j8 v# x                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
/ {7 j+ ?& e8 \5 N; B7 z3 V                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( ]0 S( O# M. o' W3 V5 w8 S+ X* c$ a$ F5 Z" ?4 |7 e5 y
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 Z" n" {) B8 D/ U* h
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) f' X7 D7 p: G$ |- q
- q2 X9 A7 I: U2 {. P#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 {/ s# k+ }5 {/ A* Y6 Y
and add under
( e0 P9 O- j; v% _" q' G3 n" y4 Q- E( o
Code:
# z. R% S8 L$ U  Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% |; o8 x! y# h: \                        {5 l3 u# k7 U( g/ ?5 {- V
                                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 );
+ E: x9 j2 D7 ^' n. j* G% M4 z- [. j                        }this
! k" i) Y" E3 y2 I! \1 G* b  _  q: g5 n' y5 f# s
Code:* s  v3 L6 _" [6 q# {; A
#ifdef __QUGET_SWAP_FIX6 l7 V& S2 ^3 p. u, l
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
/ L7 W! a/ B2 z2 c                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 |' B! g+ A% K3 S
' q% q- l' }: G1 H8 V1 i& r
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
& }$ D" D. M  a3 ^$ z  I! M( s                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
  G# `+ r+ u2 r% F; [' F
' v. n0 B5 A9 h" m# F0 s                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
( g* W9 [/ C, h7 Q4 z7 m                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 P. d+ X5 `& r( D
5 X9 ~* [: j  r% F8 G#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 K* Y- E+ H! x) g: @7 U: _/ ~+ z- E& c8 J
' y2 ~4 b. s! S* M, s

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-29 22:57 , Processed in 0.104027 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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