飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16479|回复: 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 ! q- ]. i% V; }" u) _
I posted this because someone kinda posted a youtube thingy about it :O.
" e4 t! x/ I' N+ P0 i. n% l0 Z& V% Z$ r" z- Z
Find this in DPSrv.cpp @ worldserver
" q$ ]2 ^1 Y: U" Y3 E+ T
- s- ^% c( }3 T6 LCode:6 |  c. A% H. z2 }
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ v: c) W4 a3 j  {8 V' K6 L
{
* T7 _' t0 z( \  B5 n  `, l        DWORD nId;4 a  M% b+ j6 N7 }( z6 p
        int nPart;
5 p! I% |2 x7 E2 l
; `% S, I* E! Z$ ~  Z' {: m; I        ar >> nId;
6 f( s/ J. D$ x: J3 N6 {! O        ar >> nPart;               
+ |, l" B; j  Y" O$ D$ a. |: a3 K" \        3 p* p: D2 i* T0 p
        if( nPart >= MAX_HUMAN_PARTS )       
- N* l5 J9 I; p1 I( v                return;
9 Q. }7 \4 B5 J, m+ `- L
2 N1 n8 Z  L  r        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it  D$ H, p+ k8 F) {
# Y  Y& W9 H! W

$ w- r/ p' P: [Code:
! A+ a% c7 z" S! t* r#ifdef __QUGET_SWAP_FIX. r9 e+ B( Y4 R" N- S  H) l
' N' v, N0 U! O. b# Q4 r
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )! g* F4 k( d  g* w* u( o
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 b7 k3 [! |7 n7 s" E' x8 S0 ~" D& p5 R
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )$ j+ D  _$ [# |, q4 g: v+ o
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );; X. k9 V" a6 F) {
6 b" p3 l/ P! t' _, q/ x" _$ W
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
7 S3 v' S3 ~* e* J0 j                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) e% f0 B: R! a: }- L( \
$ _/ M8 J: _2 g  S% g1 B& R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp/ e/ ?6 K& x8 w1 {* A0 h
and add under
6 p( {+ p* ~# T: A. [8 d
* r3 i; ~' j7 ^3 y" S2 XCode:
, d8 G7 m+ N9 ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& M/ t0 W$ ], K2 E2 G7 L1 V
                        {
4 `- B2 @& b3 S, [; 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 );. R2 }  r$ v; W1 O7 Z5 g3 ?& A
                        }this( \% |. n6 k, J& p

: s% x6 [% T+ c' x' YCode:
1 I: i1 q6 t* b  N$ o/ H#ifdef __QUGET_SWAP_FIX) J# V( I+ s) Z, l- B9 }' E8 O' O
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
% }2 b: N" P$ D" K3 o9 W2 K                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. A+ W) f1 u3 W: x% b4 _8 b

- ~1 ~/ Y6 L. p# U: O* O3 ~                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
; I& U" E, _8 ^. `- A; [                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' i: n. a# {9 k) r

6 |! C- z( w- i2 {5 |3 s6 W                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
  e- D) s% K1 m; ~2 X! ?4 p) N                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) g& G' \+ {4 [1 G' u
5 }4 g& N) U3 H6 z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 k4 s) d- h% ]
& Q0 \; ~; ]: M1 P( h1 s0 C0 g, I7 g" N1 G4 Y. w3 b' y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-13 20:14 , Processed in 0.067352 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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