In the item_manager.cpp -> ITEM_MANAGER::CreateDropItem
Give a try to change the "Drop Item Group" (m_map_pkDropItemGroup) iteration like so:
// Drop Item Group
{
itertype(m_map_pkDropItemGroup) it;
it = m_map_pkDropItemGroup.find(pkChr->GetRaceNum());
if (it != m_map_pkDropItemGroup.end())
{
typeof(it->second->GetVector()) v = it->second->GetVector();
for (DWORD i = 0; i < v.size(); ++i)
{
int iPercent = (v[i].dwPct * iDeltaPercent) / 100;
if (iPercent >= number(1, iRandRange))
{
item = CreateItem(v[i].dwVnum, v[i].iCount, 0, true);
if (item)
{
if (item->GetType() == ITEM_POLYMORPH)
{
if (item->GetVnum() == pkChr->GetPolymorphItemVnum())
{
item->SetSocket(0, pkChr->GetRaceNum());
}
}
//##!!
else if (item->GetType() == ITEM_SKILLBOOK) // also you can add && pkChr->IsStone()
{
if (item->GetVnum() == ITEM_SKILLBOOK_VNUM)
{
if (number(1, 100) <= 30) // 30%
{
extern const DWORD GetRandomSkillVnum(BYTE bJob = JOB_MAX_NUM, BYTE bSkillGroup = 0);
item->SetSocket(0, GetRandomSkillVnum(pkKiller->GetJob(), pkKiller->GetSkillGroup()));
}
//else
//{
// //not needed. CreateItem does the job
//}
}
}
//##!!
vec_item.push_back(item);
}
}
}
}
}