lk1986
骑士
骑士
  • UID64
  • 注册日期2019-03-04
  • 最后登录2020-08-21
  • 粉丝1
  • 关注0
  • 发帖数81
  • QQ15151515
  • 铜币94枚
  • 威望396点
  • 银元0个
  • 社区居民
  • 原创写手
阅读:1426回复:0

《飞飞》赏金系统恢复

楼主#
更多 发布于:2019-03-06 09:28
Mover.cpp

 
找到函数
int    CMover::SubPK( CMover *pAttacker, int nReflect )
整段函数体替换为以下

Code:
int    CMover::SubPK( CMover *pAttacker, int nReflect )
{
if( !g_eLocal.GetState( EVE_PK )
#ifdef __JEFF_11_4
|| GetWorld()->IsArena()
#endif    // __JEFF_11_4
)
return 1;
#if __VER >= 8 // __S8_PK
if( GetWorld()->GetID() == WI_WORLD_GUILDWAR && g_GuildCombatMng.m_nState != CGuildCombat::CLOSE_STATE )
return 1;
    if( pAttacker->GetWorld()->GetID() == WI_WORLD_GUILDWAR && g_GuildCombatMng.m_nState != CGuildCombat::CLOSE_STATE )
return 1;
#if __VER >= 11 // __GUILD_COMBAT_1TO1
if( g_GuildCombat1to1Mng.IsPossibleUser( (CUser*)this ) && g_GuildCombat1to1Mng.IsPossibleUser( (CUser*)pAttacker ) )
return 1;
#endif // __GUILD_COMBAT_1TO1
    if( g_eLocal.GetState( EVE_PKCOST )
#ifdef __JEFF_11_4
&& GetWorld()->IsArena() == FALSE
#endif    // __JEFF_11_4
)
{
if( IsPlayer() && IsChaotic() )
{
#if !defined(__INTERNALSERVER)
if( m_dwAuthorization < AUTH_HELPER )
#endif
{
// ??àì?? μ?·ó
// - à?o¥ μ?·ó( à???o??í μ?·ó???é ?èμê - à?o¥°?°£àì o?á·???? μ?·ó?ò?? ??à? )
CHAO_PROPENSITY Propensity = prj.GetPropensityPenalty( GetPKPropensity() );
int nInvenDrop = xRandom( Propensity.nInvenDorpMin, Propensity.nInvenDorpMax + 1 );
for( int i=0; i < nInvenDrop; ++i )
{
if( DoDropItemRandom( TRUE, pAttacker ) == 0 )
break;
}
                // - à??? μ?·ó
int nEquipDrop = xRandom( Propensity.nEquipDorpMin, Propensity.nEquipDorpMax + 1 );
for( i=0; i < nEquipDrop; ++i )
{
if( DoDropItemRandom( FALSE, pAttacker, TRUE ) == 0 )
break;
}
}
}
}
    if( pAttacker->IsPlayer() )
{
m_idMurderer = pAttacker->m_idPlayer;
        CWorld* pWorld = GetWorld();
if( pWorld )
{
char szFormat[256];
strcpy( szFormat, pAttacker->GetName() );
strcat( szFormat, prj.GetText( TID_PK_REWARDNOTICE ) );
g_DPCoreClient.SendWCWantedReward( m_idPlayer, pAttacker->m_idPlayer, szFormat, pWorld->GetID(), GetPos(), GetLayer() );
}
}
    if( !pAttacker->IsPlayer() || IsNPC() )
return 1;
    BOOL bAdd = FALSE;
if( pAttacker->IsChaotic() )    // ???à?ó??
{
if( !IsChaotic() )
bAdd = TRUE;
}
else                            // ?????ó??, èù???ó??
{
if( !(IsChaotic() || IsPKPink()) )
bAdd = TRUE;
}
 
/// ???à????, ?o?aà? ??·ááü
if( bAdd && nReflect == 0
&& pAttacker != this ) // chipi_081119 á??ó?ü μ¥1ìá? ?o?3 1T°í à?á¢???é àú?ìμ??? ???àμ?′? 1?á| ??á¤...
{
if( IsPlayer() && pAttacker->IsPlayer() )
{
if( !pAttacker->IsChaotic() )
((CUser*)pAttacker)->AddPlaySound( SND_PC_CHAOS );
CString szSendMsg;
szSendMsg.Format( prj.GetText(TID_GAME_PK_DEFENDER) , pAttacker->GetName() );
((CUser*)this)->AddText( szSendMsg );
szSendMsg.Format( prj.GetText(TID_GAME_PK_ATTACKER) , GetName() );
((CUser*)pAttacker)->AddText( szSendMsg );
}
        pAttacker->SetPKValue( pAttacker->GetPKValue() + 1 );
((CUser*)pAttacker)->AddPKValue();
pAttacker->SetPKPropensity( pAttacker->GetPKPropensity() + NextPKPropensity( pAttacker->GetPKValue() ) );
g_UserMng.AddPKPropensity( pAttacker );
g_dpDBClient.SendLogPkPvp( pAttacker, this, 0, 'P' );
#if __VER >= 13 // __HONORABLE_TITLE            // ′Tà?
#ifndef __MAINSERVER
if(!pAttacker->IsPlayer())
FILEOUT( "..\\HonorError.txt", "subpk()AddHonorListAck()\n" );
#endif // __MAINSERVER
((CUser*)pAttacker)->SetHonorAdd(HS_PK_COUNT,HI_COUNT_CHECK);
#endif    // __HONORABLE_TITLE            // ′Tà?
}
#else // __VER >= 8 // __S8_PK
BOOL bChaotic = IsChaotic();
    m_idMurderer = pAttacker->m_idPlayer;    // 3ˉ ??á??·à?·? á×à?3eà? ??·1àì????àìμe?| àúà???μò.
pAttacker->m_nNumKill++;                // ?3?? á?°?
(CUser*)this)->AddDefinedText( TID_GAME_PKDEAD, "\"%s\"", pAttacker->m_szName );    // ????°? á×à?à? ′????′?à′?′ù.
    int nGap = abs( this->GetLevel() - pAttacker->GetLevel() );
if( nGap >= 80 )
ChangeFame( this );    // 80 àì?óà? ?÷àì 3ˉ °??ì, ?1?üà?à?·? ?í?o?? á?°¨
    // o??ó±Y ?3±?±a?| ??????′ù.
CWorld* pWorld = GetWorld();
if( pWorld )
{
//"%s′?àì ???ó1ü %s?| àa?? ???ó±Y %s??3??| ?ò?ú?à′?′ù."
char szFormat[256];
strcpy( szFormat, pAttacker->GetName() );
strcat( szFormat, prj.GetText( TID_PK_REWARDNOTICE ) );
g_DPCoreClient.SendWCWantedReward( m_idPlayer, pAttacker->m_idPlayer, szFormat, pWorld->GetID(), GetPos() );
}
    if( g_eLocal.GetState( EVE_PKCOST )
#ifdef __JEFF_11_4
&& ( pWorld && pWorld->IsArena() == FALSE )
#endif    // __JEFF_11_4
)
{
if( bChaotic )
{
#if !defined(__INTERNALSERVER)
if( m_dwAuthorization < AUTH_HELPER )
#endif
{
// ??3?μ?·ó
KarmaProp* pProp = prj.GetKarmaProp( m_nSlaughter );
float fRate = pProp->nDropGoldPercent / 100.0f;
int nGold = GetGold() * fRate;
 
if( nGold > 0 )
DropGold( nGold , GetPos(), TRUE );
// ??àì?? μ?·ó
for( int i=0; i<pProp->nDropItem; ++i )
{
BOOL bExcludeEquip = ( i == 0 );    // 1°3 àì??à? °??ì, à??? ??àì??ào ?3±?á? ?ê′?′ù.
                    if( xRandom( 100 ) < pProp->nDropPercent )
{
if( DoDropItemRandom( bExcludeEquip, pAttacker ) == 0 )
break;
}
}
}
}
}
    //pAttackerà? slaughter°aà? oˉ°????2′ù.
pAttacker->ChangeSlaughter( CHANGE_SLAUGHTER_KILL, this );
// á????à àˉàú′? PK·? ???á ′??ò °??ì, ???£?? μ?±Tàì ?? ′ü°è ???ó°£′ù.
if( GetSlaughterGrade() == SLAUGHTER_SEMI_CHAOTIC )
UpgradeKarma();
#endif // __VER >= 8 // __S8_PK
return 1;
}
游客

返回顶部