飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16992|回复: 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
; n2 P0 I- X4 u+ b8 k& P; I  ?I posted this because someone kinda posted a youtube thingy about it :O.9 T7 e3 l% ?9 G* n4 P5 [

. y! I( ?- }' \" v) z/ i+ q3 AFind this in DPSrv.cpp @ worldserver
. }0 V, U! Q, `5 W7 M6 L/ r1 N- m& ]
Code:
' p  _( o2 B* yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( l0 }- X! H  u0 z( c5 c- ?  B
{% h' A4 P* _4 Y2 {; e' U2 V
        DWORD nId;
  y# w' b5 p4 h8 ?# F        int nPart;
# W) Z& |3 ?1 B: }6 V
' ?3 E  M$ |* |; ~        ar >> nId;4 c' a  w; `; e  Y! M$ l
        ar >> nPart;               
4 o* L+ J" T2 o       
2 H0 T! p  n3 f# Y( @8 D( v        if( nPart >= MAX_HUMAN_PARTS )       
" H0 f- x8 J) v                return;1 K' f% d$ ~1 E: [
3 Y5 R* N4 E0 f8 ^; a4 j
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; [) `3 f3 U/ Q& x
1 ^: M4 k6 d" X: q1 h5 U. e. l" O, G2 K
Code:! r1 q$ A; n! M
#ifdef __QUGET_SWAP_FIX" `7 l9 [+ o4 ^/ I+ S* w3 j

2 ]8 T4 E/ t3 I% R$ T& p& j                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' `( M9 W9 \. D1 |; O                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());" D& G, G# G- m3 B4 O0 w
, ~( `4 v6 \$ Y* \" E' P
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )5 m1 |0 U) {- E( a
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );  A+ V; M: c- W+ L7 Q

' L9 p& @5 Z7 P# K3 o                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" F! {/ a$ U& y5 |) H8 q                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) l  t4 Y  g8 g. q
, c# y7 F* |( j#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# M: Y# ~4 S) d
and add under
! m/ w1 J4 y/ n# z1 ^( I" @; c3 N. Q2 g) q# W. d* F
Code:; l6 V) {; G) h/ H- z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ r/ J" K1 g2 G; h0 C  k! G7 Z                        {
# a  n" t" M4 ]: R/ t( ^- Y                                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 );/ Z  s" Y6 J+ R: k7 z% J
                        }this
$ c5 N4 N( u; S# v  f& M; l& j
4 U" q! L* ~# e) ^( J" kCode:: D' |  g% H$ O7 {& s* S' D1 e2 Q
#ifdef __QUGET_SWAP_FIX- k2 f, T2 f" U) @  ^
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )$ @" o0 O2 T. T8 ]+ q- u
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 n' @* I2 V6 \; [! q
0 \# K' [6 J8 u9 o: N( A4 i$ D9 h
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ): ^) j, f6 T+ Y3 m( p4 ^
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 X$ i9 O5 a6 Q& S
  d1 s4 v% s7 M: O  Z
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ), l1 x% ]! q/ J+ J
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 {7 E& M+ @: E8 w4 H
) n4 B/ s3 |  B- @5 z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & m7 \& W' A/ K/ o$ t* e! c2 Z% x
* N2 @8 v0 s1 _$ k
2 {. i- S3 ^! {0 u& `

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-16 22:22 , Processed in 0.061055 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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