飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17310|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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
+ v; W( ~' N' eI posted this because someone kinda posted a youtube thingy about it :O.
6 L% u( O4 {! H8 T  d
% S( k4 c1 u, x0 R6 p6 UFind this in DPSrv.cpp @ worldserver
+ n; J( I8 h3 ^0 O# b4 I# G- X% j; C. ]
Code:
/ l7 ]7 e& e$ h6 o2 Q& H3 I2 Svoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& n' S, Y' ?6 q/ u; C{
: L6 t& S) n( A4 {        DWORD nId;+ p# y0 ^1 h' W$ x: r: U* U0 w
        int nPart;
7 V4 K* e, p# A% u% ~& ^" P
+ a5 O# p( W! e2 i        ar >> nId;
% d) v0 d! a8 k% u& f        ar >> nPart;               
& F6 d& x9 F: Y! R& t" v4 C/ I! L        0 v3 z4 L* ]0 {' t
        if( nPart >= MAX_HUMAN_PARTS )       
' A9 U  F. M* G+ f+ i" Z& U9 f4 ]* e5 s                return;5 u( Q4 z. }4 O# O( @

& d# f% S; ?8 F9 r4 j        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 D" t1 [& E6 I$ h9 a2 m% b5 |: W  g4 {7 O" h

- H0 {1 C, A& S' \5 c6 m2 cCode:& I" o: C' l% u8 j7 k" L
#ifdef __QUGET_SWAP_FIX3 ?. g& l2 v3 K0 `: G
3 K8 }& e- Q: i& T* W, ^0 S
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )9 b2 i# _( o/ `8 d( T; x
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ \' w* |+ c$ Y3 Q9 c
2 }. M; [9 J# v% D: u/ t
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )( B1 j: f& J6 h* P1 q* Q5 S  i
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) Y# E( n+ |- [* p9 a1 c7 R2 u, H3 M/ i: `. [
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 x( j0 c" N) \- g5 A( t+ p
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( n6 Y' Z! }$ {; i- t( E) G; N% M! _3 L
0 @5 y% \( Z+ n: ^#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" x& [2 L+ _3 Q5 Y4 W# Q. b/ l% Z4 j( L1 rand add under) O: ^( }5 r& E- F7 f" ^1 ~3 @# z! i
, m% @1 c- W: I' a
Code:
( o4 S2 l& k+ B4 a* E# Hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 G- A" r( {2 x' @, E3 B
                        {- V- E: x, X+ N" A6 ^. o
                                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 );  U5 O1 Y7 p4 H$ r) V4 y
                        }this
, T" r. Q4 O& r  }* x0 e8 ^0 p, S$ U0 O* l7 g; F) |/ S  _6 L7 \
Code:
( G  j& H5 Z  x7 F% @#ifdef __QUGET_SWAP_FIX
% z- c7 l$ {% j6 s                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ), n* {7 d2 Q( B4 `; }
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 c0 D8 P# f1 U* e2 v9 H2 W' R' i
& V( E4 o) E& Y8 O
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
2 x/ ]3 J$ `# y2 X% b& m: m9 e                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ \% ]/ r4 Y$ u6 d; d. m
8 u3 {+ D1 V- [+ G* v5 |
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
% V3 y3 J( [4 E! X                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 y  a& N% T: k, M+ D; k
, a. U, ]. ?, t% C; |, A2 w' l#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( `) S* X1 e+ Q
& R$ y, P% d# g
4 J) i$ x8 q4 u1 ^6 B* k

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-28 09:58 , Processed in 0.066942 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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