Advertisement
Guest User

[C++] Change attribute on alchemy

a guest
Jun 8th, 2019
1,667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #ifdef USE_CHANGE_ATTRIBUTE_DS
  2. case USE_C_ATTRIBUTE_DS:
  3. {
  4. LPITEM pDS;
  5. if (!IsValidItemPosition(DestCell) || !(pDS = GetItem(DestCell)))
  6. return false;
  7.  
  8. if (pDS->IsExchanging() || pDS->IsEquipped())
  9. {
  10. ChatPacket(CHAT_TYPE_INFO, "Alchimia este echipata, dezechipeaz-o pentru a folosi bonusul.");
  11. return false;
  12. }
  13.  
  14. if (pDS->IsDragonSoul())
  15. {
  16. pDS->ClearAttribute();
  17. DSManager::instance().PutAttributes(pDS);
  18. item->SetCount(item->GetCount() - 1);
  19. ChatPacket(CHAT_TYPE_INFO, "Bonusul a fost schimbat cu succes.");
  20. }
  21. else
  22. {
  23. ChatPacket(CHAT_TYPE_INFO, "Itemul se poate folosi doar pe alchimie.");
  24. return false;
  25. }
  26. }
  27. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement