Fix to not put Pentagram with Errtels on trade and vault and personal Store on ex803.
Insert this on pentagamsystem.cpp
Code:
bool CPentagramSystem::CheckPentagramSocket(LPOBJ lpObj,CItem* lpItem) // OK
{
#if(GAMESERVER_UPDATE>=701)
for(int n=0;n < MAX_SOCKET_OPTION;n++)
{
PENTAGRAM_JEWEL_INFO* lpPentagramJewelInfo = this->GetPentagramJewelInfo(lpObj,lpItem->m_SocketOption[n],PENTAGRAM_JEWEL_TYPE_INVENTORY);
if(lpPentagramJewelInfo != 0)
{
PENTAGRAM_JEWEL_OPTION_INFO PentagramJewelOptionInfo;
if(this->GetPentagramJewelOptionInfo(GET_ITEM(lpPentagramJewelInfo->ItemSection,lpPentagramJewelInfo->ItemType),1,lpPentagramJewelInfo->OptionIndexRank1,&PentagramJewelOptionInfo) != 0)
{
return 1;
}
if(this->GetPentagramJewelOptionInfo(GET_ITEM(lpPentagramJewelInfo->ItemSection,lpPentagramJewelInfo->ItemType),2,lpPentagramJewelInfo->OptionIndexRank2,&PentagramJewelOptionInfo) != 0)
{
return 1;
}
if(this->GetPentagramJewelOptionInfo(GET_ITEM(lpPentagramJewelInfo->ItemSection,lpPentagramJewelInfo->ItemType),3,lpPentagramJewelInfo->OptionIndexRank3,&PentagramJewelOptionInfo) != 0)
{
return 1;
}
if(this->GetPentagramJewelOptionInfo(GET_ITEM(lpPentagramJewelInfo->ItemSection,lpPentagramJewelInfo->ItemType),4,lpPentagramJewelInfo->OptionIndexRank4,&PentagramJewelOptionInfo) != 0)
{
return 1;
}
if(this->GetPentagramJewelOptionInfo(GET_ITEM(lpPentagramJewelInfo->ItemSection,lpPentagramJewelInfo->ItemType),5,lpPentagramJewelInfo->OptionIndexRank5,&PentagramJewelOptionInfo) != 0)
{
return 1;
}
}
}
return 0;
#endif
}
Insert this on pentagramsystem.h
Code:
bool CPentagramSystem::CheckPentagramSocket(LPOBJ lpObj,CItem* lpItem);
Change itemmanager.cpp
Code:
bool CItemManager::CheckItemMoveToTrade(LPOBJ lpObj,CItem* lpItem,BYTE TargetFlag) // OK
{
if(lpItem->IsItem() == 0)
{
return 0;
}
if(lpItem->IsLuckyItem() != 0)
{
return 0;
}
if(lpItem->m_IsPeriodicItem != 0)
{
return 0;
}
if (lpItem->IsPentagramItem() != 0){
if(gPentagramSystem.CheckPentagramSocket(lpObj,lpItem) != 0)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,2,0,gMessage.GetMessage(499));
return 0;
}
}
if(gItemMove.CheckItemMoveAllowTrade(lpItem->m_Index) == 0)
{
return 0;
}
if(this->CheckItemMoveToBlock(lpObj,lpItem) == 0)
{
return 0;
}
return 1;
}
bool CItemManager::CheckItemMoveToVault(LPOBJ lpObj,CItem* lpItem,BYTE TargetFlag) // OK
{
if(lpItem->IsItem() == 0)
{
return 0;
}
if(lpItem->IsLuckyItem() != 0)
{
return 0;
}
if(lpItem->m_IsPeriodicItem != 0)
{
return 0;
}
if (lpItem->IsPentagramItem() != 0){
if(gPentagramSystem.CheckPentagramSocket(lpObj,lpItem) != 0)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,2,0,gMessage.GetMessage(499));
return 0;
}
}
if(gItemMove.CheckItemMoveAllowVault(lpItem->m_Index) == 0)
{
return 0;
}
return 1;
}
Insert into Message.txt this line
Code:
499 "Remove Errtels Before"