@ Rakancito ch1 syseer
SYSERR: Aug 29 23:33:44 :: number_ex: number(): first argument is bigger than second argument 1 -> 0, D:\mainline_updated-u10\ServerSource\game\src\item_attribute.cpp 196
SYSERR: Aug 29 23:33:44 :: CItem::PutAttributeWithLevel: Cannot put item attribute 8 1
SYSERR: Aug 29 23:33:46 :: number_ex: number(): first argument is bigger than second argument 1 -> 0, D:\mainline_updated-u10\ServerSource\game\src\item_attribute.cpp 196
SYSERR: Aug 29 23:33:46 :: CItem::PutAttributeWithLevel: Cannot put item attribute 8 2
SYSERR: Aug 29 23:33:47 :: number_ex: number(): first argument is bigger than second argument 1 -> 0, D:\mainline_updated-u10\ServerSource\game\src\item_attribute.cpp 196
SYSERR: Aug 29 23:33:47 :: CItem::PutAttributeWithLevel: Cannot put item attribute 8 2
SYSERR: Aug 29 23:33:47 :: number_ex: number(): first argument is bigger than second argument 1 -> 0, D:\mainline_updated-u10\ServerSource\game\src\item_attribute.cpp 196
SYSERR: Aug 29 23:33:47 :: CItem::PutAttributeWithLevel: Cannot put item attribute 8 2
void CItem::PutAttributeWithLevel (BYTE bLevel)
{
int iAttributeSet = GetAttributeSetIndex();
if (iAttributeSet < 0)
{
return;
}
if (bLevel > ITEM_ATTRIBUTE_MAX_LEVEL)
{
return;
}
std::vector<int> avail;
int total = 0;
// 붙일 수 있는 속성 배열을 구축
for (int i = 0; i < MAX_APPLY_NUM; ++i)
{
const TItemAttrTable& r = g_map_itemAttr[i];
if (r.bMaxLevelBySet[iAttributeSet] && !HasAttr (i))
{
avail.push_back (i);
total += r.dwProb;
}
}
// 구축된 배열로 확률 계산을 통해 붙일 속성 선정
unsigned int prob = number (1, total);
int attr_idx = APPLY_NONE;
for (DWORD i = 0; i < avail.size(); ++i)
{
const TItemAttrTable& r = g_map_itemAttr[avail[i]];
if (prob <= r.dwProb)
{
attr_idx = avail[i];
break;
}
prob -= r.dwProb;
}
if (!attr_idx)
{
sys_err ("Cannot put item attribute %d %d", iAttributeSet, bLevel);
return;
}
const TItemAttrTable& r = g_map_itemAttr[attr_idx];
// 종류별 속성 레벨 최대값 제한
if (bLevel > r.bMaxLevelBySet[iAttributeSet])
{
bLevel = r.bMaxLevelBySet[iAttributeSet];
}
AddAttr (attr_idx, bLevel);
}