Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.76 KB | None | 0 0
  1.  
  2. char_item.cpp -------------->
  3.  
  4.         if (item2->GetType() == ITEM_ARMOR || item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_FOOTS)
  5.         {
  6.             if (!IS_SET(item->GetWearFlag(), WEARABLE_BODY) || !IS_SET(item2->GetWearFlag(), WEARABLE_BODY) || !IS_SET(item2->GetWearFlag(), WEARABLE_FOOTS))
  7.             {
  8.                 ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ŔĚ ¸ŢĆľĽ®Ŕş Ŕĺşńżˇ şÎÂřÇŇ Ľö ľř˝Ŕ´Ď´Ů."));
  9.                 return false;
  10.             }
  11.         }
  12.  
  13. item.cpp -------------->
  14.  
  15. void CItem::ModifyPoints(bool bAdd)
  16. {
  17.     int accessoryGrade;
  18.  
  19.     // ą«±âżÍ °©żĘ¸¸ ĽŇÄĎŔ» Ŕűżë˝ĂŲ´Ů.
  20.     if (false == IsAccessoryForSocket())
  21.     {
  22.         if (m_pProto->bType == ITEM_WEAPON || m_pProto->bType == ITEM_ARMOR || m_pProto->bType == ITEM_ARMOR && m_pProto->bSubType == ARMOR_FOOTS)
  23.         {
  24.             // ĽŇÄĎŔĚ ĽÓĽş°­Č­żˇ »çżëµÇ´Â °ćżě ŔűżëÇĎÁö ľĘ´Â´Ů (ARMOR_WRIST ARMOR_NECK ARMOR_EAR)
  25.             for (int i = 0; i < ITEM_SOCKET_MAX_NUM; ++i)
  26.             {
  27.                 DWORD dwVnum;
  28.  
  29.                 if ((dwVnum = GetSocket(i)) <= 2)
  30.                     continue;
  31.  
  32.                 TItemTable * p = ITEM_MANAGER::instance().GetTable(dwVnum);
  33.  
  34.                 if (!p)
  35.                 {
  36.                     sys_err("cannot find table by vnum %u", dwVnum);
  37.                     continue;
  38.                 }
  39.  
  40.                 if (ITEM_METIN == p->bType)
  41.                 {
  42.                     //m_pOwner->ApplyPoint(p->alValues[0], bAdd ? p->alValues[1] : -p->alValues[1]);
  43.                     for (int i = 0; i < ITEM_APPLY_MAX_NUM; ++i)
  44.                     {
  45.                         if (p->aApplies[i].bType == APPLY_NONE)
  46.                             continue;
  47.  
  48.                         if (p->aApplies[i].bType == APPLY_SKILL)
  49.                             m_pOwner->ApplyPoint(p->aApplies[i].bType, bAdd ? p->aApplies[i].lValue : p->aApplies[i].lValue ^ 0x00800000);
  50.                         else
  51.                             m_pOwner->ApplyPoint(p->aApplies[i].bType, bAdd ? p->aApplies[i].lValue : -p->aApplies[i].lValue);
  52.                     }
  53.                 }
  54.             }
  55.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement