飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16347|回复: 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
$ X' J$ O  x' i7 e) HI posted this because someone kinda posted a youtube thingy about it :O.
* Q# W0 V" f$ `: D
5 C# v9 z0 D$ ZFind this in DPSrv.cpp @ worldserver3 ^, u" p0 z  o) e! U* D1 H( v4 b
  h+ v; H3 X) P
Code:
4 \) T1 h4 q9 |6 ?/ _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 J: P: ?3 N( r# g/ o
{
) y/ y1 D& S; @) o( u% T4 Y0 |        DWORD nId;
8 h  o6 z( {1 X        int nPart;. J& b6 c! f; _0 }9 K7 `1 m

1 @/ E! s8 T0 t9 K5 l9 n        ar >> nId;$ V. d; Z6 I; d, e8 b! Q+ W( H
        ar >> nPart;                4 Y" \1 O. S8 H) [. ?+ A  p& T* ^
        & {0 a3 ]( @) b
        if( nPart >= MAX_HUMAN_PARTS )       
: Y* d% _4 x, H                return;1 X5 z7 c' [; J: [2 ]% b
" v) x1 v2 a! Z0 j
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) C2 }( H8 f) U: \* o
* |$ e- x! k5 T2 p- f
2 h/ b6 ^7 L( a0 R5 H1 Q
Code:8 g0 n! g0 a$ H
#ifdef __QUGET_SWAP_FIX( m# c- j- [  W+ B. P
1 b' N. u0 K% ]
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
* [' _$ A# J" l! S                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( H( J2 b, _, X+ A; u

. Y+ y4 u9 ?+ `& ?                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
: \$ I- _  {) F0 p3 I) |                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 K/ H; |7 D  K, k% ^" r9 V
" _) u! d5 u9 D# _                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
: Y: E  \8 X& k* q/ ~                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& G! X8 g/ @  y* Y! U4 Y+ [) e

* d: a. r3 s, f( P#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 i4 r& V  U0 k! `and add under
0 O* h7 C, ^5 X9 t  z- I4 J6 n, N7 U4 o! i
Code:
& W% E+ R8 Z5 y1 M, L" Jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ k8 ]" ~7 E( [$ L0 ?( v0 A                        {
$ [3 r$ \8 u* d2 s9 b6 T& l                                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 );5 _7 T2 O' F  I2 j
                        }this% s& R$ C9 C4 |: k; Q

+ R8 y6 {. k/ U) JCode:
6 z) R4 `& |+ w( y#ifdef __QUGET_SWAP_FIX
$ e2 N7 J9 W$ h6 S2 [                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ), `( W6 ?: u* t6 F
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. S. j1 Y! G/ K! a6 F% ?( e

4 ?; S# J" k% ]+ N                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
! V% F/ c- ~! s5 D. |  `                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" s4 ~) j! E6 E, h. ]+ q

' n$ j2 K6 W6 v3 g; \                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
7 e4 z( x; |- |5 F5 o2 A' F7 x, F, _                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ D0 @  v5 e+ E. }
3 p( \( ~4 a8 Q7 w/ {: g2 N#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : e) J6 W0 T. f$ U9 Y' W( a/ f, W

+ \2 j) k7 E/ d# y. G9 W- G. m7 r+ u1 E% b( ^

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-6 13:08 , Processed in 0.067102 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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