LCKB
Akan dupe fix (Filix_93 LCPE) - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Tutorials & Guides (https://lckb.dev/forum/forumdisplay.php?fid=124)
+----- Forum: Ep4 Guides (https://lckb.dev/forum/forumdisplay.php?fid=125)
+----- Thread: Akan dupe fix (Filix_93 LCPE) (/showthread.php?tid=2673)



- rondo157 - 01-03-2021


GameServer/doFuncTrigerEvent.cpp

Line:1522

void do_ExRaidSceneTodoTakeItem(CPC* ch, CNetMsg::SP& msg)
{
if(ch == NULL || ch->m_pArea == NULL)
return ;
int index, data;
RefMsg(msg) >> index
>> data;

if (ch->m_pZone->m_index !=ZONE_AKAN_TEMPLE)
{

ch->m_desc->Close("Akan Item Dupe");
return;
}
if (data != 6101)
{
if (data != 6102)
{
ch->m_desc->Close("Akan Item Dupe");
return;
}
}
CItem* pItem = gserver->m_itemProtoList.CreateItem(data, -1, 0, 0, 1);
if(pItem == NULL)
return ;

if(ch->m_pArea->m_RaidInfoList[ch->m_pArea->m_RaidDifficulty].GetSavePoint() < 4)
{
if (ch->m_inventory.addItem(pItem))
{
GAMELOG << init("ADD TO INVENTORY AKAN TEMPLE RAID ITEM", ch) << itemlog(pItem) << end;

ch->m_pArea->m_RaidInfoList[ch->m_pArea->m_RaidDifficulty].SetTheObjectState(OBJECT_ITEM, index, 0); //object »уЕВ јіБ¤
{
CNetMsg::SP rmsg(new CNetMsg);
SendRaidSceneObjectRefreshMsg(rmsg, ch, OBJECT_ITEM, index, 0);
ch->m_pArea->SendToAllClient(rmsg);
}
ch->m_pArea->m_RaidInfoList[ch->m_pArea->m_RaidDifficulty].ExcuteTodo(TAKE_ITEM, index, data, ch);
}
else
{
delete pItem;

// АОєҐАМ °ЎµжВчј­ ѕЖАМЕЫ ЅАµж єТ°Ў.
{
CNetMsg::SP rmsg(new CNetMsg);
SysFullInventoryMsg(rmsg, 0);
SEND_Q(rmsg, ch->m_desc);
}
{
CNetMsg::SP rmsg(new CNetMsg);
SendRaidSceneObjectRefreshMsg(rmsg, ch, OBJECT_ITEM, index, 1);
ch->m_pArea->SendToAllClient(rmsg);
}

return ;
}
}
}

 




- Karmel - 01-04-2021


-