飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16238|回复: 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 * g. y) ]. r" J, u2 e, A6 ]
I posted this because someone kinda posted a youtube thingy about it :O.
$ g6 ^* D' l9 v: h$ j1 U3 i; Z: s! D; a1 b
Find this in DPSrv.cpp @ worldserver; s0 S7 W" I6 J0 d
8 _/ o* A: e6 R5 Q' S" P
Code:# g- S3 r# v* b$ [/ j" H5 Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' \6 u$ a+ N1 k$ G! Z9 {{5 \' y- H, [5 r3 g; Z
        DWORD nId;9 G0 }4 |) C* i" m/ U' P9 }7 {
        int nPart;) F# @- Y4 Z+ n' a# b
% a' X" ?: I' n& i# I$ v4 D
        ar >> nId;* E; _9 ~& P! u6 R! ~
        ar >> nPart;               
8 K4 }! t1 \% h. T3 n! s+ r1 P* f          F& Y# I) o; u2 ]+ l! }  E
        if( nPart >= MAX_HUMAN_PARTS )       
& ~' d( g( L. I: K* E+ x) e                return;
1 t9 D7 m/ a7 n4 Z* C: d
% j4 M- H" m7 N# h- c        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 t4 C/ @; X& J# E8 V# j: I
1 C! I* @5 \6 I
5 Q: \( e! }, A! J, X! A- F1 R3 |Code:
* n  J% d3 S3 s#ifdef __QUGET_SWAP_FIX
: {) @& q5 `  l6 P5 a6 q) S+ C9 c& ~9 A" d$ ]& t7 a9 c! e* ^
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
4 Z* X! c2 |* a$ e                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! `) ~1 p% h9 w' R
* ]% Y) ]% Z$ ?6 x) P
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ). E% w7 r7 `: }" D
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* [% v! f. I4 N3 L# v! t4 r; a; ~* [# g# j3 d( s/ w
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )! e+ a# d, J' C% }
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' |1 N4 t# J* K) F- Z4 p8 k. j/ @9 Z6 n: a3 v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% k# A6 c$ l5 A9 G7 Yand add under: s8 q, v1 B$ T# V
$ V# ^  s( |/ U" q" m0 H5 V
Code:
( B9 u2 |/ l% Z8 F3 nif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 J8 L: d9 f2 C; D: w                        {; `" g  F2 F* a0 s: M
                                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 );4 ]4 t+ `& N. x' V4 q3 T! j
                        }this
+ G. J# ]0 q; S) v- G1 z! s* R' S, R+ k6 W% O$ y
Code:
  p4 d# j3 F9 y: c  O3 j: v! G8 ?#ifdef __QUGET_SWAP_FIX
; J3 Y, B, @, P/ f+ S                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 q/ ?( Z% ]: D' {
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 }6 l$ m& w1 V# K+ T& j$ Y8 \4 _2 ]6 D6 `9 q7 F
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )' @8 N3 d+ E2 v& Z- E
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( z+ y: _, P! N
/ ^  S3 a0 Y9 b+ [; b  ~                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
7 X: X$ \) {* @                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. h; L$ a  d# n! R8 X, X, N
* l0 Y: s. i  y" f
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. y6 m) I0 Y) N' a: C2 H9 E2 u' r& i% I* z- X
. A$ o. I' s8 C6 K+ C. S

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-29 10:50 , Processed in 0.062892 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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