管理员 发表于 2018-6-17 14:45:53

全民免费飞飞武器发光效果自由选择

主要修改WndTitle.cpp文件,具体位置自己定,不要插到其他函数(方法)内即可。
CWndSelectChar::Ondraw
pModel->Render( p2DRender->m_pd3dDevice, &matWorld );
#ifdef __LOGIN_GLOW


ItemProp * pItemProp2 = prj.GetItemProp(g_Neuz.m_apPlayer->m_aEquipInfo.dwId);
ItemProp * pItemProp3 = prj.GetItemProp(g_Neuz.m_apPlayer->m_aEquipInfo.dwId);
DWORD dwItemKind3Right = 0;
DWORD dwItemKind3Left = 0;

if(pItemProp2 && pItemProp2->dwItemKind3)
dwItemKind3Right = pItemProp2->dwItemKind3;

if(pItemProp3 && pItemProp3->dwItemKind3)
dwItemKind3Left = pItemProp3->dwItemKind3;

int nAttr    = (g_Neuz.m_apPlayer->m_aEquipInfo.nOption & 0x00FF0000) >> 16;
int nAttrLevel = (g_Neuz.m_apPlayer->m_aEquipInfo.nOption & 0xFF000000) >> 24;
int nLevel = g_Neuz.m_apPlayer->m_aEquipInfo.nOption & 0xFF;

nLevel <<= 24;

int nAttr2    = (g_Neuz.m_apPlayer->m_aEquipInfo.nOption & 0x00FF0000) >> 16;
int nAttrLevel2 = (g_Neuz.m_apPlayer->m_aEquipInfo.nOption & 0xFF000000) >> 24;
int nLevel2 = g_Neuz.m_apPlayer->m_aEquipInfo.nOption & 0xFF;

nLevel2 <<= 24;

DWORD dwItemFire = XE_ITEM_FIRE;
DWORD dwItemElec = XE_ITEM_ELEC;
DWORD dwItemWater = XE_ITEM_WATER;
DWORD dwItemWind = XE_ITEM_WIND;
DWORD dwItemEarth = XE_ITEM_EARTH;
DWORD dwItemNone = XE_ITEM_GEN;

switch( nAttr )
{
#if __VER >= 9 // __Y_ADV_ENCHANT_EFFECT
case 0: pModel->SetEffect( PARTS_RWEAPON, dwItemNone| nLevel ); break;
#endif //__Y_ADV_ENCHANT_EFFECT
case SAI79::FIRE: pModel->SetEffect( PARTS_RWEAPON, dwItemFire | nLevel ); break;
case SAI79::ELECTRICITY: pModel->SetEffect( PARTS_RWEAPON, dwItemElec | nLevel ); break;
case SAI79::WATER: pModel->SetEffect( PARTS_RWEAPON, dwItemWater | nLevel ); break;
case SAI79::WIND: pModel->SetEffect( PARTS_RWEAPON, dwItemWind | nLevel ); break;
case SAI79::EARTH: pModel->SetEffect( PARTS_RWEAPON, dwItemEarth | nLevel ); break;
}

switch( nAttr2 )
{
#if __VER >= 9 // __Y_ADV_ENCHANT_EFFECT
case 0: pModel->SetEffect( PARTS_LWEAPON, dwItemNone| nLevel2 ); break;
#endif //__Y_ADV_ENCHANT_EFFECT
case SAI79::FIRE: pModel->SetEffect( PARTS_LWEAPON, dwItemFire | nLevel2 ); break;
case SAI79::ELECTRICITY: pModel->SetEffect( PARTS_LWEAPON, dwItemElec | nLevel2 ); break;
case SAI79::WATER: pModel->SetEffect( PARTS_LWEAPON, dwItemWater | nLevel2 ); break;
case SAI79::WIND: pModel->SetEffect( PARTS_LWEAPON, dwItemWind | nLevel2 ); break;
case SAI79::EARTH: pModel->SetEffect( PARTS_LWEAPON, dwItemEarth | nLevel2 ); break;
}

pModel->RenderEffect( p2DRender->m_pd3dDevice, &matWorld, dwItemKind3Left, dwItemKind3Right, nAttrLevel2,nAttrLevel);
#endif

CWndSelectChar::UpdateCharacter()
#ifdef __LOGIN_GLOW
CMover::UpdateParts( pMover->GetSex(), pMover->m_dwSkinSet, pMover->m_dwFace, pMover->m_dwHairMesh, pMover->m_dwHeadMesh, pMover->m_aEquipInfo, m_pBipedMesh[ i ], NULL, 1, NULL );
#else
CMover::UpdateParts( pMover->GetSex(), pMover->m_dwSkinSet, pMover->m_dwFace, pMover->m_dwHairMesh, pMover->m_dwHeadMesh, pMover->m_aEquipInfo, m_pBipedMesh[ i ], NULL/*&pMover->m_Inventory*/ );
#endif

DPLoginClient.cpp
void CDPLoginClient::OnPlayerList( CAr & ar )
g_Neuz.m_apPlayer->m_aEquipInfo.dwId = dwItemId;
#ifdef __LOGIN_GLOW
int nOption = 0;
ar >> nOption;
g_Neuz.m_apPlayer->m_aEquipInfo.nOption = nOption;
#endif

DBManager.cpp
void CDbManager::SendPlayerList( CQuery* qry, LPDB_OVERLAPPED_PLUS lpDbOverlappedPlus )
if( pItemProp->dwParts == i || pItemProp->dwPartsub == i ||
( pItemProp->dwParts == PARTS_RWEAPON && i == PARTS_LWEAPON ) )
{
arbuf << i;
arbuf << pItemElem->m_dwItemId;
#ifdef __LOGIN_GLOW
int nRet = pItemElem->GetOption();
int nAttr = (int)pItemElem->m_bItemResist;
int nOption = pItemElem->m_nResistAbilityOption;

nRet |= (nAttr << 16);
nRet |= (nOption << 24);

arbuf << nRet;
#endif

ModelObject.cpp
void CModelObject::RenderEffect( LPDIRECT3DDEVICE9 pd3dDevice, const D3DXMATRIX *mWorld, DWORD dwItemKind3, int nLevelL, int nLeveR )
#ifndef __LOGIN_GLOW
if( CObj::GetActiveObj() )
#endif

最后在Neuz和DbServer中定义宏
define __LOGIN_GLOW
V17上正常工作,V15上需要再次登录游戏可见





页: [1]
查看完整版本: 全民免费飞飞武器发光效果自由选择