Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Fix na nno
  2. !!! WAZNE JEST TO DWA RAZY, W FUNKCJI EQUIPTO I UNEQUIP
  3. Szukasz w pliku item.cpp w funkcji EquipTo i Unequip tego :
  4.  
  5. DWORD dwImmuneFlag = 0;
  6.  
  7. for (int i = 0; i < WEAR_MAX_NUM; ++i)
  8. if (m_pOwner->GetWear(i))
  9. SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->m_pProto->dwImmuneFlag);
  10.  
  11. m_pOwner->SetImmuneFlag(dwImmuneFlag);
  12.  
  13. Zamieniasz na
  14.  
  15. DWORD dwImmuneFlag = 0;
  16. LPITEM item = NULL;
  17.  
  18. for (int i = 0; i < WEAR_MAX_NUM; ++i)
  19. {
  20. if (item=m_pOwner->GetWear(i))
  21. {
  22. if (item->GetImmuneFlag() != 0)
  23. SET_BIT(dwImmuneFlag, item->GetImmuneFlag());
  24. if (item->GetAttributeCount() > 0)
  25. {
  26. if (item->HasAttr(APPLY_IMMUNE_STUN))
  27. SET_BIT(dwImmuneFlag, IMMUNE_STUN);
  28. if (item->HasAttr(APPLY_IMMUNE_SLOW))
  29. SET_BIT(dwImmuneFlag, IMMUNE_SLOW);
  30. if (item->HasAttr(APPLY_IMMUNE_FALL))
  31. SET_BIT(dwImmuneFlag, IMMUNE_FALL);
  32. }
  33. }
  34. }
  35.  
  36. m_pOwner->SetImmuneFlag(dwImmuneFlag);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement