飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16932|回复: 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 9 q: H9 L! u/ D
I posted this because someone kinda posted a youtube thingy about it :O.. D* I6 U( T0 @& N, ?" d
; o* {9 K6 C* K) e0 C4 V2 A
Find this in DPSrv.cpp @ worldserver* U) j/ i8 f7 Q% P, J% r
7 j; D( q% }6 A# v" q# g
Code:
6 I- i5 o4 a8 {5 N, k0 L" m' v3 ~void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! I4 {9 O  C% W" f) J1 j
{2 ^' i- A! g% ^/ o' v, g
        DWORD nId;2 W3 {( j& k/ U- n% [
        int nPart;, G0 ?$ w) }3 X2 z

6 r, Y; v$ n2 T# w; U# G        ar >> nId;
$ m0 ?) K2 ^6 A+ q8 w$ L# a        ar >> nPart;               
& J2 E5 j, ^6 n* ]5 z9 G; [( F2 B( b7 `        9 x" ?, F/ U  l3 M2 B% j
        if( nPart >= MAX_HUMAN_PARTS )       
6 G2 c. V$ `$ g- S# n7 m                return;) h4 k% ^: i+ t; d1 t2 z
% i8 i) y: D; B4 v& L/ T
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 ^4 t2 ~$ D5 Z) z3 x; z8 Z; }! J3 a% y/ D6 H! i& l

6 D) T3 L- k3 S0 P5 nCode:% ]( X9 z! ?* j% {0 d! C' @- V
#ifdef __QUGET_SWAP_FIX
+ Z9 n4 \! Z2 H6 U$ K. j
! g  b; ]* o3 `3 X0 f/ u- B                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
$ ^8 i+ T8 F& A+ s3 w- l" y1 Q                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 m  ^" i& d3 S2 @# m* A" A' s( r+ |, S
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
! P: M' T: [' n' L2 F) \                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 Q9 V1 |" M+ s: z

( ?- x  S/ A, u! S9 L# q" s7 e% g                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
( m3 Z& g1 B: \                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, X: L' o" I# ]- P3 N, M; }- z2 X0 [- {) K  v/ i( U% M
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  |4 M% W0 Q  ?; Y  V- ~! k/ f  s# Y
and add under
7 R! `  b+ Z7 s& v# h
* n4 f& }4 |9 Q2 @2 K) ACode:% z; s+ _! h8 l& Z) _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 I+ O6 F) O% D0 {% x                        {
  n3 R6 f* F0 z3 n# r                                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 );  w# I1 L. l) x" V
                        }this% X6 ]) }2 K. z: x
* I! i: p4 Q  _: ]
Code:" B% q7 L+ N0 G5 V; ~
#ifdef __QUGET_SWAP_FIX
: u: S5 z) J7 @9 D/ R9 y                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )% u- }4 m( g  @% |. }$ y
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- s# S' j$ n: R! a
- A  Y9 G: b  d4 [; v3 ^) P6 `                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
; {0 t' R$ }0 Y) h, R2 f9 J* e4 a                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: G4 R' S' V* s5 g/ A5 m9 ?6 f

! U$ S  T5 M2 G; T/ z                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
  x! |8 `1 @8 b/ h; P                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 }" u; s; Z6 p* ^, B1 E1 R6 D
/ ?! P) j* {" S, E4 U  @: p
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . G7 n3 o1 N/ o* F0 r9 S5 J1 J

( y" R! `- z8 O) ]  u% q; W9 Q+ E! F2 j, n' H, _

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-13 15:00 , Processed in 0.059342 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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