飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16503|回复: 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
; @- n* w; w" x. S6 j' dI posted this because someone kinda posted a youtube thingy about it :O.
0 y. g1 `8 J" ]7 r
- u- F5 }/ M; \& w! X+ x. kFind this in DPSrv.cpp @ worldserver
6 [* v  X/ e. B. ]* M1 n2 M
& `) i  P, l5 J2 SCode:
! b5 Q9 G4 v# p0 k3 g2 {- p8 @& uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# J0 |7 x5 x; N# N3 A' }& O
{( L9 e. o4 B. n
        DWORD nId;
; g! B/ K) f# M5 P) h; T; r5 A        int nPart;7 T  f" D/ ]' b9 U: v
- E% v( Z! l; U
        ar >> nId;3 z* y  ]4 ~" |, J7 H- H
        ar >> nPart;                6 a8 d  i. d7 ?% l: R3 S# u
       
' u& v+ S, w2 ^        if( nPart >= MAX_HUMAN_PARTS )       
& z( Y& S$ N* R; H                return;+ A$ f, X+ w+ {9 I  |/ k3 i2 i
& m* d/ W6 B" `$ l. j
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ A8 F2 @+ w$ R" \% H8 ^; s; J

6 T, J7 |1 N% k7 `2 u3 `3 O; n" u" I5 D* [! |( l" K5 K- z3 U
Code:' t, p6 x0 ~* A! i, L
#ifdef __QUGET_SWAP_FIX0 L; R0 v$ a: `9 H4 p

8 X( R( y" z  v* }                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )8 {( E8 n" G, N  ~5 S" ]6 B3 q
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());/ ]) |3 o8 h1 {% o# |9 |, {
- {- u$ d6 h2 w9 H; I
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
; J. N5 v9 S! j! `                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );) `" N, m  b: m- j0 O
, j/ z. c) T" a4 `+ f; @* s' D  I& {
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
; d4 ^* ]& r5 M4 c7 ?- S0 a                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 P7 l- z0 G2 X* w8 z
6 i  r, Q6 Q' I( m* I% t1 }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
& J7 f; X. ~1 ~3 jand add under
( h3 p7 b4 l- q8 Z  |" P; s
7 B' f( }7 j! ^, l+ r1 n) pCode:
, T7 g, W5 P" I; {  N* M% yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( d7 V3 ?: |* z! |  G, U: K8 x
                        {, o7 Y( M/ ^/ w5 j5 e; V0 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 );( U; I4 a; P1 c  x8 T- `7 Y
                        }this( m( Z' L: u; B/ v( i+ X; R
, T9 a3 Y& m6 D$ W( V) S2 D2 T
Code:
3 s0 U- ]7 J' b' L' L#ifdef __QUGET_SWAP_FIX
) j" i7 w9 M1 _3 Y( K                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
. ^) Q8 w4 a+ Q6 K( v                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 O9 u. ^% a( M3 @+ f1 q6 ^# i
7 P/ H  F, h5 N7 [6 I0 A. ~; B% ~                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )6 q: D& U5 N7 n5 {, k4 {
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ P1 \, t, |2 O2 W: z9 Q
1 h. o: O7 A" }3 x; [                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% Z; @! N, l% u3 ]9 f6 h
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 W: k5 E+ S8 z8 W! e) Z
. ^; v5 ?4 B& o$ W5 a5 _% t' I#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 j, ]/ _3 A5 e
. v- O" A" M9 V' E+ f* r

3 @  o4 j1 ^0 S% u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-15 16:03 , Processed in 0.063768 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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