飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1054

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1054
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
: p7 y0 B/ \: |: r2 y0 w7 S+ \I posted this because someone kinda posted a youtube thingy about it :O.' f: a- s7 l' F
: L* f7 n, _3 }+ q1 J
Find this in DPSrv.cpp @ worldserver
2 C1 W  B+ K+ C" K9 J/ Q$ [4 {0 a, Y, s# }/ Q8 x! L
Code:3 [4 E! T6 U5 p! ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 e. @/ \% _: e+ g7 C8 }6 x' p) Z% U{4 R* a( d& z, v- X
        DWORD nId;, ]$ ~' V+ T+ X8 _
        int nPart;
+ Y# _/ S+ v# ^* `1 r$ W& `
" }/ c9 ]0 M3 C4 Z5 Z$ z  n: ^  r        ar >> nId;% ?; O4 k/ [) [
        ar >> nPart;                . |' h: V; y; f4 I# F
       
! u4 w: [. \/ ~' k9 G: U9 X- `        if( nPart >= MAX_HUMAN_PARTS )        $ I' N( f4 Y0 t& l" h+ l& v. `
                return;+ c7 e! N$ o# n. L$ Y6 R8 n5 W& J

0 f# a  V# e. p' ?        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 J/ _8 {  X0 J" ]. j9 X% A  N. J0 l

4 t) Y0 H9 K! ^' oCode:
+ _4 Y+ c& c9 E; L3 h' `3 I" p#ifdef __QUGET_SWAP_FIX
4 A8 ?/ `2 `5 s/ q, h
* r& d. ~6 g! }% M+ g                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
+ m0 Z* Z& w$ T  B$ _' H                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ ^# u* s: N; C" W% z: n. U  o8 U) R( ^( S
7 i+ U. h; U) P+ i/ {7 H
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- }  r( F! a3 b2 @" A
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 Y  h; F3 ]' F5 m+ w, \& e. X) A

3 q! D8 @( F7 w- Y* V                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )6 N! b* ~6 ]' V' l% R9 E
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" g% e* K& \' N9 V0 }2 [2 j; j% ~
3 |. f" k  M) G$ U: }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
# `" [* @# e. Z5 ~- _' x; _) P0 d4 fand add under; g5 d- P, k  K2 C  E; p

! d) P& J! q" sCode:
8 }" d* H, y0 `% [4 xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( C) }7 B0 f0 E# A                        {
4 ~. p; K. x! H                                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 r% }9 b9 s- E( C* T3 T                        }this4 O% [& L# s6 c/ d8 w# x: |+ w/ P
# b( h+ P9 Z4 y2 g
Code:: q7 Y( X5 w6 @0 g8 E7 ]5 s
#ifdef __QUGET_SWAP_FIX
. ~) r7 }+ @. u- k                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )( J2 j+ ~# ]" f, x6 d
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( B3 W0 W" J) y& l+ V2 H# x0 k/ Q& p& f2 ~. t- |
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
( [( c9 ^8 \" i4 S1 a% F7 a                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ P/ N' G" K+ n+ Y0 s3 a
  I) D% I" q! q                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
: T9 k! a) }9 y! }# D3 Z9 |                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ b; W0 u0 W( O: N
  A. O8 x  h7 q# V! x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* a  {8 e7 Z. u6 s
4 w- n# T) B) ?8 m5 z
2 L" D! t, E6 y0 N. \( \& E* H

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-23 02:22 , Processed in 0.059400 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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