飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17107|回复: 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 * W9 Z! |* O  }  q" b& i* [. I, m
I posted this because someone kinda posted a youtube thingy about it :O." i9 v2 H; u3 b6 e' W; S

# c" y- u5 g4 v/ h, o- f: n" [7 s2 s, GFind this in DPSrv.cpp @ worldserver
- ~5 |  u! l, p& `0 ^& S" @
) Q+ L! |7 F7 H% Z; }& CCode:4 a; F6 j9 ^8 Y& ?7 `) ^
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( Z/ m' j+ _( O6 v* z& P
{
: S; r: s; s3 v: Q0 F" a2 e        DWORD nId;
4 `0 _3 T- \9 @# z) h" Z6 A        int nPart;% I, p5 t. Y6 h9 F8 S& n! U

3 K  b, l1 b; F3 E  W        ar >> nId;" J& @% e' V8 O9 [8 Y( j( J/ S
        ar >> nPart;                " B( r: H; y7 X3 k( \0 P- J
       
4 o; F  u9 J  j. q* ]7 M        if( nPart >= MAX_HUMAN_PARTS )       
# |2 s: F3 v# _% H                return;
: X- d" E7 a) P* v$ Q: H7 l% a. w+ Z0 r1 R9 t$ {8 a  w# B
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it* s/ `8 X# j# n4 ]7 M6 _0 j+ {$ [8 I
, {+ r9 U) Q  w$ G/ E6 D

- {; |7 _, ^4 r$ f# h) hCode:
* C- i1 o" z4 E4 J) z* w8 M5 S) j% q#ifdef __QUGET_SWAP_FIX
2 q2 e. _4 j1 M2 |3 x
( Q$ c; ]  V. ^8 N' |) s                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' L7 Z4 E$ z- [+ A6 N                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
" f/ [$ R0 R" b- X  X) _7 b: a" R: K, X
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )* j+ {) q6 \9 u7 e
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 L' B  B( }, _% a6 {8 g/ a- @
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
0 e5 i: B8 S5 V$ ?                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# O5 c( ~, J9 _8 o+ I$ x& Z) `. B1 y5 _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 T1 R8 l6 R$ _3 |! J* c" M% X
and add under" c4 q) O6 v, L! d( G$ y
& P- N, ]+ T* I9 B+ o
Code:
5 ]. |1 x" z3 M# W, U: kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; x" L- b+ `) p0 @( k" T- K* a: p                        {. c7 C1 A; x6 g! 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 );
3 j( p# Z9 m# r+ ~3 N                        }this
0 }4 ?0 T7 v9 g
3 X4 P+ p0 W5 hCode:
; x: I4 Y) x$ p1 I#ifdef __QUGET_SWAP_FIX
; G' T1 H/ f4 k# H                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )/ j$ r# I8 o/ R# n; Z! }7 u; q
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' c) I) v3 f2 c- K7 K, a$ w5 x7 q3 _
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( @1 U. D9 R, ?% l1 E# Y6 u
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. R7 \' I: S9 c- |7 R0 l
: o1 \) R1 c4 }; M; `
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )" V4 R( j/ @7 L5 y! _! X
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ i, l1 N' A, M2 S1 S
7 `3 u# I& }5 m4 f2 W: Y4 \% L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 I; B! |5 ^0 m4 t# n
- i6 b9 C4 j$ a. ?0 l
# p* b4 D2 M9 e' s2 ^: S

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-21 22:14 , Processed in 0.058844 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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