- Joined
- May 13, 2011
- Messages
- 1,497
- Reaction score
- 157
Hi ragezoners,
Yesterday i searched the net to find something that lets knights wear an Shield with an 2 handed weapon. I came accross this post from Kamote
http://forum.ragezone.com/f483/question-shields-890400/
Then i noticed that there was no tuturial about it so i decided to make one for you all.
Its rather simple to do this one. And no its not resourced controlled but source controlled.
So you need to have the source in order to do this part.
Well here we go
Open up MoverEquip.cpp
Now search for this part
if( pItemProp->dwItemKind3 == IK3_SHIELD )
In this section you need to change something to let it work for an knight or any other class with an 2 handed weapon.
After the if( pItemProp->dwItemKind3 == IK3_SHIELD ) {
We put in this
and above the (else) we put in this ( } ) to close the ( if )
So the entire part look like this
As you may notice i defined it in the versioncommon.h of the neuz and worldserver
as this
#define __2HANDED_SHIELD
Now if you want to let Jesters/Ringmaster and or every other class that wears an 2 handed weapon also be aible to wear an shield then the only thing you have to change is this line
if(pMover->GetJob() != JOB_KNIGHT && pMover->GetJob() != JOB_KNIGHT_MASTER && pMover->GetJob() != JOB_KNIGHT_HERO && pMover->GetJob() != JOB_LORDTEMPLER_HERO )
You need then to enter more jobs for it. Remember to do it like this
pMover->GetJob() != JOB_RINGMASTER <-- see this ( != ) that means if its not the same.
Now after you have changed it rebuild the neuz and the worldserver to let it work.
There have fun with it.
@Credits
Kamote for giving the jump start
Shadowdragon for giving Kamote the Tips
Me for the tutorial.
With kind regards,
Loky.
Yesterday i searched the net to find something that lets knights wear an Shield with an 2 handed weapon. I came accross this post from Kamote
http://forum.ragezone.com/f483/question-shields-890400/
Then i noticed that there was no tuturial about it so i decided to make one for you all.
Its rather simple to do this one. And no its not resourced controlled but source controlled.
So you need to have the source in order to do this part.
Well here we go
Open up MoverEquip.cpp
Now search for this part
if( pItemProp->dwItemKind3 == IK3_SHIELD )
In this section you need to change something to let it work for an knight or any other class with an 2 handed weapon.
After the if( pItemProp->dwItemKind3 == IK3_SHIELD ) {
We put in this
Code:
if(pMover->GetJob() != JOB_KNIGHT && pMover->GetJob() != JOB_KNIGHT_MASTER && pMover->GetJob() != JOB_KNIGHT_HERO && pMover->GetJob() != JOB_LORDTEMPLER_HERO )
{
and above the (else) we put in this ( } ) to close the ( if )
So the entire part look like this
#ifdef __2HANDED_SHIELD
if(pMover->GetJob() != JOB_KNIGHT && pMover->GetJob() != JOB_KNIGHT_MASTER && pMover->GetJob() != JOB_KNIGHT_HERO && pMover->GetJob() != JOB_LORDTEMPLER_HERO )
{
if( pHandItemProp && pHandItemProp->dwHanded == HD_TWO ) // ¼Õ¿¡ Áã°í ÀÖ´Â°Ô ÅõÇÚµå¸é.
{
if( pInventory )
{
CItemElem *pItemElemOld = pInventory->GetEquip( PARTS_RWEAPON );
if( pInventory->UnEquip( PARTS_RWEAPON ) == FALSE )
return FALSE;
#ifdef __WORLDSERVER
// ÅõÇÚµå ¹«±â¹þ±è
if( pItemElemOld )
{
ItemProp *pOldItemProp = pItemElemOld->GetProp();
pMover->ResetDestParamEquip( pOldItemProp, pItemElemOld );
g_UserMng.AddDoEquip( pMover, -1, pItemElemOld, FALSE );
}
#if __VER >= 9 // __ULTIMATE
prj.m_UltimateWeapon.SetDestParamUltimate( pMover, pItemElemOld, FALSE, PARTS_RWEAPON );
#endif // __ULTIMATE
#endif // worldserver
if( pEquipInfo )
pEquipInfo[PARTS_RWEAPON].dwId = NULL_ID;
} else
{
if( pEquipInfo )
pEquipInfo[PARTS_RWEAPON].dwId = NULL_ID;
}
pModel->TakeOffParts( PARTS_RWEAPON );
if( pHandItemProp->dwItemKind3 == IK3_YOYO ) // µé°í ÀÖ´ø ¹«±â°¡ ¿ä¿ä¿´À¸¸é
pModel->TakeOffParts( PARTS_LWEAPON ); // ¿Þ¼Õ¿¡ ÀÖ´ø ¿ä¿ä¸ðµ¨µµ ¾ø¾ÖÁØ´Ù.
}
}
#endif
if(pMover->GetJob() != JOB_KNIGHT && pMover->GetJob() != JOB_KNIGHT_MASTER && pMover->GetJob() != JOB_KNIGHT_HERO && pMover->GetJob() != JOB_LORDTEMPLER_HERO )
{
if( pHandItemProp && pHandItemProp->dwHanded == HD_TWO ) // ¼Õ¿¡ Áã°í ÀÖ´Â°Ô ÅõÇÚµå¸é.
{
if( pInventory )
{
CItemElem *pItemElemOld = pInventory->GetEquip( PARTS_RWEAPON );
if( pInventory->UnEquip( PARTS_RWEAPON ) == FALSE )
return FALSE;
#ifdef __WORLDSERVER
// ÅõÇÚµå ¹«±â¹þ±è
if( pItemElemOld )
{
ItemProp *pOldItemProp = pItemElemOld->GetProp();
pMover->ResetDestParamEquip( pOldItemProp, pItemElemOld );
g_UserMng.AddDoEquip( pMover, -1, pItemElemOld, FALSE );
}
#if __VER >= 9 // __ULTIMATE
prj.m_UltimateWeapon.SetDestParamUltimate( pMover, pItemElemOld, FALSE, PARTS_RWEAPON );
#endif // __ULTIMATE
#endif // worldserver
if( pEquipInfo )
pEquipInfo[PARTS_RWEAPON].dwId = NULL_ID;
} else
{
if( pEquipInfo )
pEquipInfo[PARTS_RWEAPON].dwId = NULL_ID;
}
pModel->TakeOffParts( PARTS_RWEAPON );
if( pHandItemProp->dwItemKind3 == IK3_YOYO ) // µé°í ÀÖ´ø ¹«±â°¡ ¿ä¿ä¿´À¸¸é
pModel->TakeOffParts( PARTS_LWEAPON ); // ¿Þ¼Õ¿¡ ÀÖ´ø ¿ä¿ä¸ðµ¨µµ ¾ø¾ÖÁØ´Ù.
}
}
#endif
As you may notice i defined it in the versioncommon.h of the neuz and worldserver
as this
#define __2HANDED_SHIELD
Now if you want to let Jesters/Ringmaster and or every other class that wears an 2 handed weapon also be aible to wear an shield then the only thing you have to change is this line
if(pMover->GetJob() != JOB_KNIGHT && pMover->GetJob() != JOB_KNIGHT_MASTER && pMover->GetJob() != JOB_KNIGHT_HERO && pMover->GetJob() != JOB_LORDTEMPLER_HERO )
You need then to enter more jobs for it. Remember to do it like this
pMover->GetJob() != JOB_RINGMASTER <-- see this ( != ) that means if its not the same.
Now after you have changed it rebuild the neuz and the worldserver to let it work.
There have fun with it.
@Credits
Kamote for giving the jump start
Shadowdragon for giving Kamote the Tips
Me for the tutorial.
With kind regards,
Loky.
Last edited: