Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Serach akan dupe fix.

Newbie Spellweaver
Joined
Jun 23, 2019
Messages
6
Reaction score
0
Hello.
I serach akan dupe fix for ep4.
Thank you.
 
Joined
Mar 29, 2013
Messages
4
Reaction score
0
Hello.
I serach akan dupe fix for ep4.
Thank you.

Look
file to edit: doFuncTrigerEvent.cpp

Replace full function at "void do_ExRaidSceneTodoKillNPC(CPC* ch, CNetMsg::SP& msg)"
to

void do_ExRaidSceneTodoKillNPC(CPC* ch, CNetMsg::SP& msg)
{
if(ch == NULL || ch->m_pArea == NULL)
return ;
int index, data;
RefMsg(msg) >> index
>> data;
ch->m_pArea->m_RaidInfoList[ch->m_pArea->m_RaidDifficulty].ExcuteTodo(KILL_NPC, index, data, ch);
return ;
}
// List of approved items
int akanItems[] = { 6101, 6102 };

bool IsApprovedItem(int itemID) {
for(int i = 0; i < sizeof(akanItems); i++) {
if(akanItems == itemID)
return true;
}
return false;
}

and function "void do_ExRaidSceneTodoTakeItem(CPC* ch, CNetMsg::SP& msg)"

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

CItem* pItem = gserver->m_itemProtoList.CreateItem(data, -1, 0, 0, 1);
if(pItem == NULL)
return;

if(!IsApprovedItem(index)) {
LOG_INFO("AKAN EXPLOIT DETECTED - CHARACTER: %s", ch->m_name);
CNetMsg::SP rmsg(new CNetMsg);
SendRaidSceneObjectRefreshMsg(rmsg, ch, OBJECT_ITEM, index, 0);
SEND_Q(rmsg, ch->m_desc);

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 ;
}
}
}


 
Newbie Spellweaver
Joined
Jun 23, 2019
Messages
6
Reaction score
0
That works fine. Now I would need the channel crash fix. Can someone help me there?
 
Newbie Spellweaver
Joined
Jun 23, 2019
Messages
6
Reaction score
0
Look
file to edit: doFuncTrigerEvent.cpp

Replace full function at "void do_ExRaidSceneTodoKillNPC(CPC* ch, CNetMsg::SP& msg)"
to

void do_ExRaidSceneTodoKillNPC(CPC* ch, CNetMsg::SP& msg)
{
if(ch == NULL || ch->m_pArea == NULL)
return ;
int index, data;
RefMsg(msg) >> index
>> data;
ch->m_pArea->m_RaidInfoList[ch->m_pArea->m_RaidDifficulty].ExcuteTodo(KILL_NPC, index, data, ch);
return ;
}
// List of approved items
int akanItems[] = { 6101, 6102 };

bool IsApprovedItem(int itemID) {
for(int i = 0; i < sizeof(akanItems); i++) {
if(akanItems == itemID)
return true;
}
return false;
}

and function "void do_ExRaidSceneTodoTakeItem(CPC* ch, CNetMsg::SP& msg)"

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

CItem* pItem = gserver->m_itemProtoList.CreateItem(data, -1, 0, 0, 1);
if(pItem == NULL)
return;

if(!IsApprovedItem(index)) {
LOG_INFO("AKAN EXPLOIT DETECTED - CHARACTER: %s", ch->m_name);
CNetMsg::SP rmsg(new CNetMsg);
SendRaidSceneObjectRefreshMsg(rmsg, ch, OBJECT_ITEM, index, 0);
SEND_Q(rmsg, ch->m_desc);

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 ;
}
}
}




in the area there is a compile problem
// List of approved items
int akanItems[] = { 6101, 6102 };
bool IsApprovedItem(int itemID) { for(int i = 0; i < sizeof(akanItems); i++) { if(akanItems == itemID) return true; }
return false;
}
....

so if i do compile it though i just do not know if it works.


bool IsApprovedItem(int itemID) { for(int i = 0; i < sizeof(akanItems); i++) {
if(akanItems == itemID)
return true;
}
return false;
}
 
Back
Top