Hey Leute, habe folgendes Problem bei diesen defines
wollte fragen ob mir wer eben die __NEW_PROP_PARAMETER defines entfernen kann, da ich diese nicht use und so etliche errors bekomme.
schonmal danke für euere hilfe.
mfg. Crowley
Code:
// mulcom END100125 À̺¥Æ®¿ë ¸®½ºÅ³ ¹× À̺¥Æ®¿ë ¸®½ºÅׯ® »ç¿ë ³»¿ª¿¡ ´ëÇÑ ·Î±× Ãß°¡
//////////////////////////////////////////////////////////////////////////
}
}
}
break;
#ifdef __NEW_PROP_PARAMETER
case IK2_ONCE:
{
int nResult = 0;
nResult = DoUseItemOnce( pItemProp, pItemElem, nPart );
{
if( 0 < nResult )
{
if( nResult == 2 )
{
((CUser*)this)->AddDefinedText( TID_GAME_LIMITED_USE, "" ); // »ç¿ëÁßÀ̾î¼* »ç¿ëÇÒ¼ö ¾øÀ½
}
else if( nResult == 3 )
{
((CUser*)this)->AddDefinedText( TID_GAME_NOTOVERLAP_USE, "" ); // ÀÌ ¾ÆÀÌÅÛ°ú´Â Áߺ¹ÇÏ¿© »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù
}
return FALSE;
}
}
}
break;
case IK2_KEEP:
{
#ifndef __NEW_STACKABLE_AMPS
int nResult = 0;
nResult = DoUseItemSystem( pItemProp, pItemElem, nPart );
{
if( 0 < nResult )
{
if( nResult == 2 )
{
((CUser*)this)->AddDefinedText( TID_GAME_LIMITED_USE, "" ); // »ç¿ëÁßÀ̾î¼* »ç¿ëÇÒ¼ö ¾øÀ½
}
else if( nResult == 3 )
{
((CUser*)this)->AddDefinedText( TID_GAME_NOTOVERLAP_USE, "" ); // ÀÌ ¾ÆÀÌÅÛ°ú´Â Áߺ¹ÇÏ¿© »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù
}
return FALSE;
}
}
#else // __NEW_STACKABLE_AMPS
int nResult = 0;
nResult = DoUseItemKeep( pItemProp, pItemElem, nPart );
{
if( 0 < nResult )
{
if( nResult == 1 )
{
CString str;
str.Format( "%d - %d", pItemProp->nMinLimitLevel, pItemProp->nMaxLimitLevel );
((CUser*)this)->AddDefinedText( TID_GAME_EXP_NOTUSELEVEL, "\"%s\"", str ); //
return FALSE;
}
else if( nResult == 2 )
{
((CUser*)this)->AddDefinedText( TID_GAME_LIMITED_USE, "" ); // »ç¿ëÁßÀ̾î¼* »ç¿ëÇÒ¼ö ¾øÀ½
return FALSE;
}
else if( nResult == 3 )
{
CString str;
str.Format( "%d", GetLevel());
CString szMaxBuf;
szMaxBuf.Format( "%d", pItemProp->nMaxDuplication );
((CUser*)this)->AddDefinedText( TID_GAME_EXP_NOTUSE, "\"%s\" \"%s\"", str, szMaxBuf ); //
//((CUser*)this)->AddDefinedText( TID_GAME_NOTOVERLAP_USE, "" ); // ÀÌ ¾ÆÀÌÅÛ°ú´Â Áߺ¹ÇÏ¿© »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù
return FALSE;
}
else if( nResult == 4 )
{
int nExtraEXP = 0;
for( MAPBUFF::iterator i = m_buffs.m_mapBuffs.begin(); i != m_buffs.m_mapBuffs.end(); ++i )
{
ItemProp* pAmpProp = prj.GetItemProp( i->second->GetId());
if( pAmpProp )
{
if( pAmpProp->dwItemKind3 == IK3_EXP_RATE )
{
nExtraEXP += pAmpProp->nEffectValue;
}
}
}
CString strTemp;
strTemp.Format( "%s %d%% %s", prj.GetText( TID_GAME_EXPITEM_TOOLTIP ), nExtraEXP, prj.GetText( TID_GAME_EXPITEM_TOOLTIP1 ) );
((CUser*)this)->AddText( strTemp ); //
}
}
}
#endif // __NEW_STACKABLE_AMPS
}
break;
#endif // __NEW_PROP_PARAMETER
Code:
#ifdef __NEW_PROP_PARAMETER
int CMover::DoUseItemOnce( ItemProp* pItemProp, CItemElem* pItemElem, int nPart)
{
int nResult = 0;
#ifdef __WORLDSERVER
if( HasBuffByIk3( pItemProp->dwItemKind3 ))
nResult = 2;
else
DoApplySkill( (CCtrl*)this, pItemProp, NULL );
#endif // __WORLDSERVER
return nResult;
}
int CMover::DoUseItemKeep( ItemProp* pItemProp, CItemElem* pItemElem, int nPart)
{
#ifdef __WORLDSERVER
#ifdef __NEW_STACKABLE_AMPS
// First Check how many Amps are currently active.
int nAmount = 0;
for( MAPBUFF::iterator i = m_buffs.m_mapBuffs.begin(); i != m_buffs.m_mapBuffs.end(); ++i )
{
ItemProp* pItemProp = prj.GetItemProp( i->second->GetId());
if( pItemProp )
{
if( pItemProp->dwItemKind3 == IK3_EXP_RATE )
{
nAmount++;
}
}
}
// Cant hold more Amps
if( nAmount >= MAX_AMP_STACK_COUNT )
{
return 2;
}
// Check Level
if( GetLevel() < pItemProp->nMinLimitLevel || GetLevel() > pItemProp->nMaxLimitLevel )
{
return 1;
}
// Can hold more Amps. Try activating scroll
if( HasBuff( BUFF_ITEM, (WORD) ( pItemProp->dwID )))
{
MAPAMPSTORE::iterator i = prj.m_mapAmpStore.find( pItemProp->dwID );
if( i != prj.m_mapAmpStore.end() )
{
AMP_STORE_INFO* info = i->second;
if( HasBuff( BUFF_ITEM, (WORD)(info->dwIDSecond)))
{
if( HasBuff( BUFF_ITEM, (WORD)(info->dwIDThird)))
{
if( HasBuff( BUFF_ITEM, (WORD) (info->dwIDFourth)))
{
if( HasBuff( BUFF_ITEM, (WORD) (info->dwIDFifth)))
{
return 2;
}
else
{
if( pItemProp->nMaxDuplication >= 5 )
{
ItemProp* pAmpProp = prj.GetItemProp( info->dwIDFifth );
DoApplySkill( (CCtrl*)this, pAmpProp, NULL );
return 4;
}
}
}
else
{
if( pItemProp->nMaxDuplication >= 4 )
{
ItemProp* pAmpProp = prj.GetItemProp( info->dwIDFourth );
DoApplySkill( (CCtrl*)this, pAmpProp, NULL );
return 4;
}
}
}
else
{
if( pItemProp->nMaxDuplication >= 3 )
{
ItemProp* pAmpProp = prj.GetItemProp( info->dwIDThird );
DoApplySkill( (CCtrl*)this, pAmpProp, NULL );
return 4;
}
}
}
else
{
if( pItemProp->nMaxDuplication >= 2 )
{
ItemProp* pAmpProp = prj.GetItemProp( info->dwIDSecond );
DoApplySkill( (CCtrl*)this, pAmpProp, NULL );
return 4;
}
}
}
}
else
{
// DoApplySkill( (CCtrl*)this, pItemProp, NULL );
Error( "%d", (DWORD)pItemProp->dwSkillTime );
AddBuff( BUFF_ITEM, (WORD)(pItemProp->dwID), 0, pItemProp->dwSkillTime, GetId() );
return 4;
}
#endif // __NEW_STACKABLE_AMPS
#endif // __WORLDSERVER
return 3;
}
#endif // __NEW_PROP_PARAMETER
schonmal danke für euere hilfe.
mfg. Crowley