飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16941|回复: 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 A2 E0 e$ n0 O$ `; _I posted this because someone kinda posted a youtube thingy about it :O.) |  V' o8 ]7 h6 T+ i1 [1 c
+ ?8 c7 m2 Z3 v- O7 k2 u- S
Find this in DPSrv.cpp @ worldserver% c0 X5 {& y0 p+ J$ M: l/ K" R

6 ]3 z* b8 `8 R& r5 a9 ZCode:  `9 [* N8 X" A( t* @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& H5 q$ d) r! u5 Y) @2 w{: M* G8 a3 Y! D# K5 v% m
        DWORD nId;
+ K% t' w; ?& h' X        int nPart;; y2 ~8 Y2 u! l0 J  ^

" ]1 r8 q0 F; s        ar >> nId;) Z# _% q/ _1 v" J" m: T- ^
        ar >> nPart;               
5 E8 A+ N8 W. o$ O       
5 w/ Y% G% I4 k* j        if( nPart >= MAX_HUMAN_PARTS )       
- H, J/ S" a* t. u% N7 ~  l  F                return;
; N" {' }, C7 K) d; I) G. O* Z; F0 B9 y
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( X+ m) Q; Q/ V! W. e) ]$ C/ ^2 U
$ ~0 a8 |  c' \, t
/ ~1 e% `6 @. I* r; ZCode:% |4 S2 S; Z. S' G, c) T+ l
#ifdef __QUGET_SWAP_FIX
8 w: M; F* S$ n; E
' V' S% Z1 w2 u1 _                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
5 z% J; E. W% E  ^$ m                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
: K5 v4 N4 R, y3 f
5 v; E1 [7 }# u5 J: G2 U" F; R& n& t" Z                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
8 ^( j! B5 c' e! r9 x                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: C: b$ U" p5 ^' ~" G3 J. y$ M
0 X1 f7 `" N& T9 x0 l6 l( i4 Z                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
6 j: ?) W  c% e# l$ W* ?: z' D9 ?                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ T) @! d+ l. d. i( ~  B: E# x- M, y! k2 ]2 `# l3 m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" D7 Z* g6 @7 N6 ^# W3 sand add under; ^+ D4 m& l2 l. b# v
- D1 [3 e$ M) m& f
Code:& j, O" H5 ]) o9 B
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 w; n1 n8 N& `  {. o; `) [4 I4 Q                        {
) l; c( F; i) c                                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 );
  @* r+ x+ V- H( }# ?                        }this( z  w. u' t2 [. o+ @
; j- E7 ]0 M1 `6 {4 L6 \1 `
Code:
; G$ R1 ^1 G; H#ifdef __QUGET_SWAP_FIX
# h( P& h4 o2 C: u                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )+ l; P+ _2 ?) i! R' x* A! H7 s! \( g
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 x& s6 k9 g* u. c

0 x" D- W: l2 j+ _+ n                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( ^' G6 q+ L- i: f8 L+ a" X+ x# |- b
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& I9 o4 \: M- y! [7 M% \' k0 m& v4 l2 o) P5 {8 I+ v
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )$ G$ k  n5 a" K& [/ ]0 B8 k; A
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% a) I$ u) t' \' n1 w7 m

4 w7 Z) L4 C  n6 N9 O4 E#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + ^! J2 d: B* j2 v8 x3 o) w) O
% k! V2 }/ [$ {8 M6 M2 ^* B

$ X( D/ z* g3 ~* n

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-14 02:26 , Processed in 0.078970 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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