[req]force Recall Fix

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
XsX
Regular
Posts: 32
Joined: Sat May 15, 2004 8:53 pm

Post by XsX »

recall becomes crazy being in your City and it does recall to you without reason
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

Found this on my HD. It was posted on this forum but i don't remember who did post this fix. Credits goes to him (sry i never remember names...)

Code: Select all

first in the function CheckForceRecallTime, at the end of the function, look for this lines

case 0: iTL_ = 20*m_sRaidTimeSunday; break; //ÀÏ¿äÀÏ 60º
}
}
if (m_pClientList[iClientH]->m_iTimeLeft_ForceRecall > iTL_)
//this line u have to change the "1" for "iTL_"
m_pClientList[iClientH]->m_iTimeLeft_ForceRecall = iTL_;
}

//le dice que esta en un mapa enemigo 31/01/2005
//u have to add this line too ******************
//this is cuz u are entering to an enemy town*******
m_pClientList[iClientH]->m_bIsWarLocation = TRUE;

//print valores en la pantalla del client
//wsprintf(cRepMessage, " (Check) - Tienes %d minutos para estar en este mapa.", m_pClientList[iClientH]->m_iTimeLeft_ForceRecall);
//ShowClientMsg(iClientH, cRepMessage);
//Add this return too, original function doesnt have
return;

}


After that look for the void CGame::CheckClientResponseTime()

go down until u get somethin like : (llok for the code, comments are mine)

//remember the line adden in CheckForceRecallTime function??
//adding this line u make the next condition true, so the program will check the rest.
if ( (m_pClientList[i]->m_bIsWarLocation == TRUE) ) {
// Crusade
if (m_bIsCrusadeMode == FALSE)
//here is the other problem, originally the next line was
// if (m_pClientList[i]->m_bIsInsideOwnTown == TRUE)
// u are in enemy town, but not in your town, so the forcerecalltime will never decrease :(
// the line have to be like the next. FALSE
if (m_pClientList[i]->m_bIsInsideOwnTown == FALSE)
m_pClientList[i]->m_iTimeLeft_ForceRecall--;

if (m_pClientList[i]->m_iTimeLeft_ForceRecall <= 0) {
m_pClientList[i]->m_iTimeLeft_ForceRecall = 0;
m_pClientList[i]->m_dwWarBeginTime = dwTime;
m_pClientList[i]->m_bIsWarLocation = FALSE;
SendNotifyMsg(NULL, i, DEF_NOTIFY_TOBERECALLED, NULL, NULL, NULL, NULL);
RequestTeleportHandler(i, "1 ");
}
}
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Post Reply