Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char_item.cpp -------------->
- if (item2->GetType() == ITEM_ARMOR || item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_FOOTS)
- {
- if (!IS_SET(item->GetWearFlag(), WEARABLE_BODY) || !IS_SET(item2->GetWearFlag(), WEARABLE_BODY) || !IS_SET(item2->GetWearFlag(), WEARABLE_FOOTS))
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ŔĚ ¸ŢĆľĽ®Ŕş Ŕĺşńżˇ şÎÂřÇŇ Ľö ľř˝Ŕ´Ď´Ů."));
- return false;
- }
- }
- item.cpp -------------->
- void CItem::ModifyPoints(bool bAdd)
- {
- int accessoryGrade;
- // ą«±âżÍ °©żĘ¸¸ ĽŇÄĎŔ» Ŕűżë˝ĂŲ´Ů.
- if (false == IsAccessoryForSocket())
- {
- if (m_pProto->bType == ITEM_WEAPON || m_pProto->bType == ITEM_ARMOR || m_pProto->bType == ITEM_ARMOR && m_pProto->bSubType == ARMOR_FOOTS)
- {
- // ĽŇÄĎŔĚ ĽÓĽş°Čżˇ »çżëµÇ´Â °ćżě ŔűżëÇĎÁö ľĘ´Â´Ů (ARMOR_WRIST ARMOR_NECK ARMOR_EAR)
- for (int i = 0; i < ITEM_SOCKET_MAX_NUM; ++i)
- {
- DWORD dwVnum;
- if ((dwVnum = GetSocket(i)) <= 2)
- continue;
- TItemTable * p = ITEM_MANAGER::instance().GetTable(dwVnum);
- if (!p)
- {
- sys_err("cannot find table by vnum %u", dwVnum);
- continue;
- }
- if (ITEM_METIN == p->bType)
- {
- //m_pOwner->ApplyPoint(p->alValues[0], bAdd ? p->alValues[1] : -p->alValues[1]);
- for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
- {
- if (p->aApplies[i].bType == APPLY_NONE)
- continue;
- if (p->aApplies[i].bType == APPLY_SKILL)
- m_pOwner->ApplyPoint(p->aApplies[i].bType, bAdd ? p->aApplies[i].lValue : p->aApplies[i].lValue ^ 0x00800000);
- else
- m_pOwner->ApplyPoint(p->aApplies[i].bType, bAdd ? p->aApplies[i].lValue : -p->aApplies[i].lValue);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement