- Joined
- Jul 13, 2013
- Messages
- 313
- Reaction score
- 54
Optional Source Code Functions
find :
change to :
2.RANPARAM.cpp
3. RANPARAM.h
4. param.ini
[/QUOTE]
[/CODE]
GLCharacter.cpp
GLCharclient.cpp
Optional Source Code Functions
Credits:
/*To All Who Work With Juver Source Code&&Episode 7 Source Code
To All Who I chatted exchanged information , Trial and errors
Note: Some Code I Cannot Share But I Can Tell You What or
where to edit it . (Respect To The One Who Coded It) */
==========================================================
ramispo's Guide For Ep8 Source Code: <ClickMe>
geger009's Guide; How To Add Source Code Funtions: <ClickMe>
AsenDURE's Guide; How To Add RCC Password To Param.ini
Credits:
/*To All Who Work With Juver Source Code&&Episode 7 Source Code
To All Who I chatted exchanged information , Trial and errors
Note: Some Code I Cannot Share But I Can Tell You What or
where to edit it . (Respect To The One Who Coded It) */
==========================================================
ramispo's Guide For Ep8 Source Code: <ClickMe>
geger009's Guide; How To Add Source Code Funtions: <ClickMe>
AsenDURE's Guide; How To Add RCC Password To Param.ini
Code:
[QUOTE="AsenDURE, post: 0"]Add default RCC password into param.ini
[B]1. Unzipper.cpp[/B]
[CODE]
#include "stdafx.h"
#include "./Unzipper.h"
#include "../../=ZLib/iowin32.h"
[COLOR=#FF0000]#include "RANPARAM.h" <-- add this [/COLOR]
find :
Code:
if( IsEncrypted( info.dwFlags ) ) // MEMO : 鞠龋拳 等 颇老捞搁...
{
[COLOR=#FF0000]if( unzOpenCurrentFilePassword(m_uzFile, "龋免窍绰 何盒俊辑 皋葛府 秦力") != UNZ_OK )[/COLOR]
return UINT_MAX;
}
else
{
if( unzOpenCurrentFile(m_uzFile) != UNZ_OK )
return UINT_MAX;
}
change to :
Code:
if( IsEncrypted( info.dwFlags ) ) // MEMO : 鞠龋拳 等 颇老捞搁...
{
[COLOR=#FF0000]if( unzOpenCurrentFilePassword(m_uzFile, RANPARAM::RCCPassword) != UNZ_OK )[/COLOR]
return UINT_MAX;
}
else
{
if( unzOpenCurrentFile(m_uzFile) != UNZ_OK )
return UINT_MAX;
}
2.RANPARAM.cpp
Code:
TCHAR HelpAddress[STRING_NUM_128] = _T("\\data\\help\\help.htm");
// 吝惫 : http://2046.5u56.com/gameshop/gameshop.html
TCHAR ItemShopAddress[STRING_NUM_128] = _T("about:blank");
TCHAR RPFDataPath[STRING_NUM_128] = _T("\\package\\data.rpf");
[COLOR=#FF0000]TCHAR RCCPassword[STRING_NUM_128] = _T("AsenDURE"); <-- add this [/COLOR]
Code:
cFILE.getflag_sz( "ETC OPTION", "ItemShopAddress", 0, 1, ItemShopAddress, STRING_NUM_128 );
cFILE.getflag_sz( "ETC OPTION", "RPFDataPath", 0, 1, RPFDataPath, STRING_NUM_128 );
[COLOR=#FF0000]cFILE.getflag_sz( "ETC OPTION", "RCCPassword", 0, 1, RCCPassword, STRING_NUM_128 ); <-- add this [/COLOR]
3. RANPARAM.h
Code:
extern TCHAR ItemShopAddress[STRING_NUM_128];
extern TCHAR RPFDataPath[STRING_NUM_128];
[COLOR=#FF0000]extern TCHAR RCCPassword[STRING_NUM_128]; <-- add this [/COLOR]
4. param.ini
Code:
ItemShopHPAddress = http://ran.myrosso.com/en/shop/item.asp
EventPageAddress = http://ran.myrosso.com/en/index.asp
RPFDataPath = /package/data.rpf
[COLOR=#FF0000]RCCPassword = your-default-rcc-password <-- add this [/COLOR]
[/CODE]
Lightning Effects; from my old source
CPS:
DxChasham.cppCPS:
To view the content, you need to sign in or register
Code:
HRESULT DxCharSham::UpdateSuit ()
{
GASSERT(m_pd3dDevice);
if ( !m_pSkinChar )
return S_FALSE;
EMCHARINDEX emIndex = CharClassToIndex(m_emClass);
DxSkinCharData* pSkinChar = DxSkinCharDataContainer::GetInstance().FindData ( GLCONST_CHAR::szCharSkin[emIndex] );
if ( !pSkinChar ) return E_FAIL;
const GLCONST_CHARCLASS &sCONST = GLCONST_CHAR::cCONSTCLASS[emIndex];
if ( sCONST.dwHEADNUM > m_wFace )//add abl
{
std::string strHEAD_CPS = sCONST.strHEAD_CPS[m_wFace];
PDXCHARPART pCharPart = NULL;
pCharPart = m_pSkinChar->GetPiece(PIECE_HEAD); // ÇöÀç ÀåÂø ½ºÅ².
if ( pCharPart && strcmp(strHEAD_CPS.c_str(),pCharPart->m_szFileName) )
{//add abl
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( strHEAD_CPS.c_str() , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, 0x0, 0, TRUE );
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, pPieceDataRoot->GetType()
, 0x0
, 0
, TRUE );
}else{
m_pSkinChar->SetPiece ( strHEAD_CPS.c_str(), m_pd3dDevice, 0x0, 0, TRUE );
}
}
}
if ( sCONST.dwHAIRNUM > m_wHair )
{//add abl
std::string strHAIR_CPS = sCONST.strHAIR_CPS[m_wHair];
PDXCHARPART pCharPart = NULL;
pCharPart = m_pSkinChar->GetPiece(PIECE_HAIR); // ÇöÀç ÀåÂø ½ºÅ².
if ( pCharPart && strcmp(strHAIR_CPS.c_str(),pCharPart->m_szFileName) )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( strHAIR_CPS.c_str() , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, 0x0, 0, TRUE );
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, pPieceDataRoot->GetType()
, 0x0
, 0
, TRUE );
}else{
m_pSkinChar->SetPiece ( strHAIR_CPS.c_str(), m_pd3dDevice, 0x0, 0, TRUE );
}
}
}
// Çì¾îÄ÷¯ ¼¼ÆÃ
m_pSkinChar->SetHairColor( m_wHairColor );
for ( int i=0; i<SLOT_NSIZE_S_2; i++ )
{
// ÇöÀç ÀåÂøÁßÀÎ ¹«±â°¡ ¾Æ´Ï¸é ³Ñ¾î°£´Ù.
if( !IsCurUseArm( EMSLOT(i) ) ) continue;
SITEMCUSTOM &ItemCustom = m_PutOnItems[i];
SNATIVEID nidITEM = ItemCustom.nidDISGUISE;
if ( nidITEM==SNATIVEID(false) ) nidITEM = ItemCustom.sNativeID;
if ( !m_bVehicle && i == SLOT_VEHICLE ) nidITEM = SNATIVEID(false);
if ( nidITEM == SNATIVEID(false) )
{
// Note : ±âº» ½ºÅ²°ú Áö±Ý ÀåÂøµÈ ½ºÅ²ÀÌ Æ²¸± °æ¿ì.
// SLOT->PIECE.
PDXSKINPIECE pSkinPiece = NULL; // ±âº» ½ºÅ².
PDXCHARPART pCharPart = NULL; // ÇöÁ¦ ÀåÂø ½ºÅ².
EMPIECECHAR emPiece = SLOT_2_PIECE(EMSLOT(i));
if ( emPiece!=PIECE_SIZE )
{
pSkinPiece = pSkinChar->GetPiece(emPiece); // ±âº» ½ºÅ².
pCharPart = m_pSkinChar->GetPiece(emPiece); // ÇöÁ¦ ÀåÂø ½ºÅ².
}
if ( pSkinPiece )
{
if ( pCharPart && strcmp(pSkinPiece->m_szFileName,pCharPart->m_szFileName) )
{//add abl
//MessageBox(0,pSkinPiece->m_szFileName,pCharPart->m_szFileName,0);
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pSkinPiece->m_szFileName , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, 0X0, 0, TRUE );
}
else
{
EMPIECECHAR emPiece_a = SLOT_2_PIECE(EMSLOT(i));
PDXSKINPIECE pSkinPiece_a = NULL;
if ( emPiece_a!=PIECE_SIZE )
{
pSkinPiece_a = pSkinChar->GetPiece(emPiece_a ); //
}
m_pSkinChar->SetPiece ( pSkinPiece_a->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, pPieceDataRoot->GetType()
, 0x0
, 0
, TRUE );
}
else
{
m_pSkinChar->SetPiece ( pSkinPiece->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
m_pSkinChar->ResetABL ( emPiece ); //clear abl when you remove an item
}
}
[COLOR=#ff0000] if ( emPiece == PIECE_UPBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_UPBODY);
}
else if ( emPiece == PIECE_LOBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_LOBODY);
}
else if ( emPiece == PIECE_GLOVE )
{
m_pSkinChar->ResetPiece(PIECE_EFF_GLOVE);
}
else if ( emPiece == PIECE_FOOT )
{
m_pSkinChar->ResetPiece(PIECE_EFF_FOOT);
}[/COLOR]
else
{
m_pSkinChar->ResetABL ( emPiece ); //clear abl when you remove an item
}
}
else
{
if ( pCharPart )
{
if ( m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece != PIECE_LHAND )
{
m_pSkinChar->ResetPiece(emPiece);
}
else
{
if ( emPiece != PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
if ( !m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece == PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
}
[COLOR=#ff0000] if ( emPiece == PIECE_UPBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_UPBODY);
}
else if ( emPiece == PIECE_LOBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_LOBODY);
}
else if ( emPiece == PIECE_GLOVE )
{
m_pSkinChar->ResetPiece(PIECE_EFF_GLOVE);
}
else if ( emPiece == PIECE_FOOT )
{
m_pSkinChar->ResetPiece(PIECE_EFF_FOOT);
}[/COLOR]
}
}
}
// À¯È¿Çϸé
else
{
SITEM* pItem = GLItemMan::GetInstance().GetItem ( nidITEM );
if ( pItem )
{
EMCHARCLASS emSex = CharClassGetSex( emIndex );
EMCPSINDEX emLeft = CPSIND_NULL;
EMCPSINDEX emRight = CPSIND_NULL;
if ( emSex == GLCC_MAN )
{
emLeft = CPSIND_M_LEFT;
emRight = CPSIND_M_RIGHT;
}else{
emLeft = CPSIND_W_LEFT;
emRight = CPSIND_W_RIGHT;
}
//if ( emRight != CPSIND_NULL )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pItem->GetCpsFile(emRight) , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
else
{
m_pSkinChar->ResetCPS ( PIECE_RHAND );//remove existing cps when the abl data dont have cps
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, (DWORD) PIECE_RHAND
, NULL
, ItemCustom.GETGRADE_EFFECT()
, TRUE );
m_pSkinChar->Clear( PIECE_LHAND );
}else{
m_pSkinChar->SetPiece ( pItem->GetCpsFile(emRight), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
}
//if ( emLeft != CPSIND_NULL )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pItem->GetCpsFile(emLeft) , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
{
m_pSkinChar->ResetCPS ( PIECE_LHAND );//remove existing cps when the abl data dont have cps
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, (DWORD) PIECE_LHAND
, NULL
, ItemCustom.GETGRADE_EFFECT()
, TRUE );
}else{
m_pSkinChar->SetPiece ( pItem->GetCpsFile(emLeft), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
}
//if ( !m_pSkinChar->m_pSkinCharPiece[ PIECE_LHAND ] && !m_pSkinChar->m_pSkinCharPiece[ PIECE_RHAND ] )
{
if ( pItem->sBasicOp.emItemType != ITEM_VEHICLE )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pItem->GetWearingFile(emIndex) , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
else
{
EMPIECECHAR emPiece_a = SLOT_2_PIECE(EMSLOT(i));
PDXSKINPIECE pSkinPiece_a = NULL;
if ( emPiece_a!=PIECE_SIZE )
{
pSkinPiece_a = pSkinChar->GetPiece(emPiece_a ); //
}
m_pSkinChar->SetPiece ( pSkinPiece_a->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, pPieceDataRoot->GetType()
, NULL
, ItemCustom.GETGRADE_EFFECT()
, TRUE );
}else{
m_pSkinChar->SetPiece ( pItem->GetWearingFile(emIndex), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
}
else{
m_pSkinChar->SetPiece ( pItem->GetWearingFile(emIndex), m_pd3dDevice, NULL, ItemCustom.GETGRADE_EFFECT(), TRUE );
}
}
}
}
}
return S_OK;
}
Code:
if ( pSkinPiece )
{
if ( pCharPart && strcmp(pSkinPiece->m_szFileName,pCharPart->m_szFileName) )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pSkinPiece->m_szFileName , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, 0X0, 0, TRUE );
}
else
{
EMPIECECHAR emPiece_a = SLOT_2_PIECE(EMSLOT(i));
PDXSKINPIECE pSkinPiece_a = NULL;
if ( emPiece_a!=PIECE_SIZE )
{
pSkinPiece_a = pSkinChar->GetPiece(emPiece_a ); //
}
m_pSkinChar->SetPiece ( pSkinPiece_a->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, pPieceDataRoot->GetType()
, 0x0
, 0
, TRUE );
}
else
{
m_pSkinChar->SetPiece ( pSkinPiece->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
m_pSkinChar->ResetABL ( emPiece ); //clear abl when you remove an item
}
}
else
//
[COLOR=#ff0000] if ( emPiece == PIECE_UPBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_UPBODY);
}
else if ( emPiece == PIECE_LOBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_LOBODY);
}
else if ( emPiece == PIECE_GLOVE )
{
m_pSkinChar->ResetPiece(PIECE_EFF_GLOVE);
}
else if ( emPiece == PIECE_FOOT )
{
m_pSkinChar->ResetPiece(PIECE_EFF_FOOT);
}//[/COLOR]
{
m_pSkinChar->ResetABL ( emPiece ); //clear abl when you remove an item
}
}
else
{
if ( pCharPart ) //add abl
{
if ( m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece != PIECE_LHAND )
{
m_pSkinChar->ResetPiece(emPiece);
}
else
{
if ( emPiece != PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
EMSLOT emRHand = GetCurRHand();
SITEM* pRHAND = GET_SLOT_ITEMDATA ( emRHand );
if ( pRHAND )// dual cps fix
{
EMCHARCLASS emSex = CharClassGetSex( emIndex );
EMCPSINDEX emLeft = CPSIND_NULL;
if ( emSex == GLCC_MAN )
{
emLeft = CPSIND_M_LEFT;
}else{
emLeft = CPSIND_W_LEFT;
}
if (strcmp(pRHAND->GetCpsFile(emLeft), "") == 0)
{
m_pSkinChar->ResetPiece(emPiece);
}
}
else
{
if ( !m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece == PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
}
[COLOR=#ff0000] //
if ( emPiece == PIECE_UPBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_UPBODY);
}
else if ( emPiece == PIECE_LOBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_LOBODY);
}
else if ( emPiece == PIECE_GLOVE )
{
m_pSkinChar->ResetPiece(PIECE_EFF_GLOVE);
}
else if ( emPiece == PIECE_FOOT )
{
m_pSkinChar->ResetPiece(PIECE_EFF_FOOT);
}[/COLOR]
}//
}
}
}
// À¯È¿Çϸé
else
{
SITEM* pItem = GLItemMan::GetInstance().GetItem ( nidITEM );
if ( pItem )
{
EMCHARCLASS emSex = CharClassGetSex( emIndex );
EMCPSINDEX emLeft = CPSIND_NULL;
EMCPSINDEX emRight = CPSIND_NULL;
[COLOR=#ff0000] {//
if ( EMSLOT(i) == SLOT_UPPER )
{
m_pSkinChar->SetGradeEffect(0,emIndex,ItemCustom.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
if ( EMSLOT(i) == SLOT_LOWER )
{
m_pSkinChar->SetGradeEffect(1,emIndex,ItemCustom.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
if ( EMSLOT(i) == SLOT_HAND )
{
m_pSkinChar->SetGradeEffect(2,emIndex,ItemCustom.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
if ( EMSLOT(i) == SLOT_FOOT )
{
m_pSkinChar->SetGradeEffect(3,emIndex,ItemCustom.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
}//[/COLOR]
if ( emSex == GLCC_MAN )
{
emLeft = CPSIND_M_LEFT;
emRight = CPSIND_M_RIGHT;
}else{
emLeft = CPSIND_W_LEFT;
emRight = CPSIND_W_RIGHT;
}
Code:
if ( pSkinPiece )
{//add abl
if ( pCharPart && strcmp(pSkinPiece->m_szFileName,pCharPart->m_szFileName) )
{
//MessageBox(0,pSkinPiece->m_szFileName,pCharPart->m_szFileName,0);
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pSkinPiece->m_szFileName , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, 0X0, 0, TRUE );
}
else
{
EMPIECECHAR emPiece_a = SLOT_2_PIECE(EMSLOT(i));
PDXSKINPIECE pSkinPiece_a = NULL;
if ( emPiece_a!=PIECE_SIZE )
{
pSkinPiece_a = pSkinChar->GetPiece(emPiece_a ); //
}
m_pSkinChar->SetPiece ( pSkinPiece_a->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, pPieceDataRoot->GetType()
, 0x0
, 0
, TRUE );
}
else
{
m_pSkinChar->SetPiece ( pSkinPiece->m_szFileName, m_pd3dDevice, 0X0, 0, TRUE );
m_pSkinChar->ResetABL ( emPiece ); //clear abl when you remove an item
}
}
[COLOR=#ff0000] //
if ( emPiece == PIECE_UPBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_UPBODY);
}
else if ( emPiece == PIECE_LOBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_LOBODY);
}
else if ( emPiece == PIECE_GLOVE )
{
m_pSkinChar->ResetPiece(PIECE_EFF_GLOVE);
}
else if ( emPiece == PIECE_FOOT )
{
m_pSkinChar->ResetPiece(PIECE_EFF_FOOT);
}[/COLOR]
else
{
m_pSkinChar->ResetABL ( emPiece );//clear abl when you remove an item
}
}
else
{//add abl
if ( pCharPart )
{
if ( m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece != PIECE_LHAND )
{
m_pSkinChar->ResetPiece(emPiece);
}
else
{
if ( emPiece != PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
//if ( !m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece == PIECE_LHAND )
// m_pSkinChar->ResetPiece(emPiece);
//
[COLOR=#ff0000] if ( emPiece == PIECE_UPBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_UPBODY);
}
else if ( emPiece == PIECE_LOBODY )
{
m_pSkinChar->ResetPiece(PIECE_EFF_LOBODY);
}
else if ( emPiece == PIECE_GLOVE )
{
m_pSkinChar->ResetPiece(PIECE_EFF_GLOVE);
}
else if ( emPiece == PIECE_FOOT )
{
m_pSkinChar->ResetPiece(PIECE_EFF_FOOT);
}[/COLOR]
EMSLOT emRHand = GetCurRHand();
SITEM* pRHAND = GET_SLOT_ITEMDATA ( emRHand );
if ( pRHAND )// dual cps fix
{
EMCHARCLASS emSex = CharClassGetSex( emIndex );
EMCPSINDEX emLeft = CPSIND_NULL;
if ( emSex == GLCC_MAN )
{
emLeft = CPSIND_M_LEFT;
}else{
emLeft = CPSIND_W_LEFT;
}
if (strcmp(pRHAND->GetCpsFile(emLeft), "") == 0)
{
//MessageBox (NULL,"empty",0,0);
//if ( !m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece == PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
}
else
{
//MessageBox (NULL,"not empty",0,0);
}
}
else
{
if ( !m_pSkinChar->m_pSkinCharPiece[PIECE_RHAND] && emPiece == PIECE_LHAND )
m_pSkinChar->ResetPiece(emPiece);
}
}
}
}
}
else
{
SITEM* pItem = GLItemMan::GetInstance().GetItem ( nidITEM );
if ( pItem )
{//add abl
EMCHARCLASS emSex = CharClassGetSex( emIndex );
EMCPSINDEX emLeft = CPSIND_NULL;
EMCPSINDEX emRight = CPSIND_NULL;
/* int PlusItem = ItemCustom.GETGRADE(EMGRINDING_NUNE);// remove if bug trap
if (PlusItem == 10 && emSex == GLCC_MAN && pSkinPiece->m_emType == PIECE_UPBODY)
{
pChar->GetCharSkin ( "m_bs_body_enchent+7.cps", m_pd3dDevice, 0X0, 0, TRUE );
}// remove if bug trap */
[COLOR=#ff0000] { //
if ( EMSLOT(i) == SLOT_UPPER )
{
m_pSkinChar->SetGradeEffect(0,emIndex,ItemClient.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
if ( EMSLOT(i) == SLOT_LOWER )
{
m_pSkinChar->SetGradeEffect(1,emIndex,ItemClient.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
if ( EMSLOT(i) == SLOT_HAND )
{
m_pSkinChar->SetGradeEffect(2,emIndex,ItemClient.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
if ( EMSLOT(i) == SLOT_FOOT )
{
m_pSkinChar->SetGradeEffect(3,emIndex,ItemClient.GETGRADE_EFFECT(),m_pd3dDevice,TRUE);
}
}[/COLOR]
if ( emSex == GLCC_MAN )
{
emLeft = CPSIND_M_LEFT;
emRight = CPSIND_M_RIGHT;
}else{
emLeft = CPSIND_W_LEFT;
emRight = CPSIND_W_RIGHT;
}
//if ( emRight != CPSIND_NULL )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pItem->GetCpsFile(emRight) , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, NULL, ItemClient.GETGRADE_EFFECT(), TRUE );
}
else
{
m_pSkinChar->ResetCPS ( PIECE_RHAND );//remove existing cps when the abl data dont have cps
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, (DWORD) PIECE_RHAND
, NULL
, ItemClient.GETGRADE_EFFECT()
, TRUE );
m_pSkinChar->Clear( PIECE_LHAND );
}else{
m_pSkinChar->SetPiece ( pItem->GetCpsFile(emRight), m_pd3dDevice, NULL, ItemClient.GETGRADE_EFFECT(), TRUE );
}
}
//if ( emLeft != CPSIND_NULL )
{
DxSkinPieceRootData* pPieceDataRoot;
pPieceDataRoot = DxSkinPieceRootDataContainer::GetInstance().LoadData( pItem->GetCpsFile(emLeft) , m_pd3dDevice , TRUE );
if ( pPieceDataRoot )
{
if ( pPieceDataRoot->GetUseCPS() )
{
m_pSkinChar->SetPiece( pPieceDataRoot->GetCpsName().c_str(), m_pd3dDevice, NULL, ItemClient.GETGRADE_EFFECT(), TRUE );
}
else
{
m_pSkinChar->ResetCPS ( PIECE_LHAND );//remove existing cps when the abl data dont have cps
}
m_pSkinChar->SetCharPieceData( pPieceDataRoot->GetData()
, m_pd3dDevice
, pPieceDataRoot->GetBoneLink()
, pPieceDataRoot->GetWeaponSlot()
, (DWORD) PIECE_LHAND
, NULL
, ItemClient.GETGRADE_EFFECT()
, TRUE );
}
else
{
[COLOR=#ffa500] m_pSkinChar->SetPiece ( pItem->GetCpsFile(emLeft), m_pd3dDevice, NULL, ItemClient.GETGRADE_EFFECT(), TRUE );
EMPIECECHAR emPiece;
if ( ( emPiece == PIECE_UPBODY || emPiece == PIECE_LOBODY || emPiece == PIECE_GLOVE || emPiece == PIECE_FOOT ) )
{
switch (emPiece)
{
case PIECE_UPBODY: m_pSkinChar->ResetPiece(PIECE_ELE01); break;
case PIECE_LOBODY: m_pSkinChar->ResetPiece(PIECE_ELE02); break;
case PIECE_GLOVE: m_pSkinChar->ResetPiece(PIECE_ELE03); break;
case PIECE_FOOT: m_pSkinChar->ResetPiece(PIECE_ELE04); break;
}
BYTE PlusItem = ItemClient.cGRADE;
if (PlusItem == 10 )
{
CString strEle, strSex, strPiece;
if ( emSex == GLCC_MAN )
{
strSex = "m";
}
else
{
strSex = "w";
}
switch (emPiece)
{
case PIECE_UPBODY: strPiece = "body"; break;
case PIECE_LOBODY: strPiece = "leg"; break;
case PIECE_GLOVE: strPiece = "hand"; break;
case PIECE_FOOT: strPiece = "foot"; break;
}
//strEle.Format("%s_bs_%s_enchent+%d.cps", strSex, strPiece, ItemCustom.GETGRADE_EFFECT()) ;
m_pSkinChar->SetPiece ( strEle, m_pd3dDevice, NULL, 0, TRUE );
DxSkinCharData* pSkinChar = DxSkinCharDataContainer::GetInstance().LoadData( "%s_bs_%s_enchent+%d.cps", m_pd3dDevice, TRUE );
}
}[/COLOR]
}
}
updating this week. . .
Last edited:

