FALLEN1 1 Posted March 23, 2020 Share Posted March 23, 2020 Hi I have add/switch for costume but not for all costumes works. What i should edit to work for all costumes? I have added talismans, how could I make an add and change especially for them? Ty Link to comment Share on other sites More sharing options...
Resist0 36 Posted March 23, 2020 Share Posted March 23, 2020 Database player.item_proto for all Costume -> magic_pct set from 0 to 100. Link to comment Share on other sites More sharing options...
FALLEN1 1 Posted March 24, 2020 Author Share Posted March 24, 2020 (edited) 14 hours ago, Chief said: Database player.item_proto for all Costume -> magic_pct set from 0 to 100. Hm, i know that, but i want to put add when i didnt have bns, i fixed with costume and hair but still doesn't work with costume_weapon When i put add on costume weapon, take my 76043 but didnt put or show bonus. #ifdef __COSTUME_ATTR_SYSTEM__case USE_COSTUME_ENCHANT:case USE_COSTUME_TRANSFORM:{LPITEM item2;if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))return false;if (item2->IsEquipped()){BuffOnAttr_RemoveBuffsFromItem(item2);}if (item2->IsExchanging() || item2->IsEquipped())return false;// if (item2->GetType() != ITEM_COSTUME)if (item2->GetType() != ITEM_COSTUME || item2->GetSubType() == COSTUME_SASH){ChatPacket(CHAT_TYPE_INFO,("Acest item nu este un costum.")); return false; } // if (item2->GetAttributeCount() == 0) // { // ChatPacket(CHAT_TYPE_INFO,("<Sistem>Pe acest costum nu poti adauga bonusuri!")); // return false; // } switch (item->GetSubType()) { case USE_COSTUME_ENCHANT: { int aiChangeProb[ITEM_ATTRIBUTE_MAX_LEVEL] = {100, 10, 5, 0, 0}; item2->ChangeAttribute(aiChangeProb); ChatPacket(CHAT_TYPE_INFO,("Bonusul a fost schimbat.")); { char buf[21]; snprintf(buf, sizeof(buf), "%u", item2->GetID()); LogManager::instance().ItemLog(this, item, "USE_COSTUME_ENCHANT", buf); } item->SetCount(item->GetCount() - 1); } break; // case USE_COSTUME_TRANSFORM: // { // item2->ClearAttribute(); case USE_COSTUME_TRANSFORM: { if (item2->GetAttributeCount() == 4) { ChatPacket(CHAT_TYPE_INFO,("Nu poti adauga bonus pe acest costum.")); return false; } item2->ClearAttribute(); int iCostumePercent = number(1, 3); for (int i = 0; i < iCostumePercent; ++i) { item2->AddAttribute(); } int aiChangeProb[ITEM_ATTRIBUTE_MAX_LEVEL] = {100, 10, 5, 0, 0}; item2->ChangeAttribute(aiChangeProb); ChatPacket(CHAT_TYPE_INFO,("Bonusul a fost inlocuit cu succes.")); { char buf[21]; snprintf(buf, sizeof(buf), "%u", item2->GetID()); LogManager::instance().ItemLog(this, item, "USE_COSTUME_TRANSFORM", buf); } item->SetCount(item->GetCount() - 1); } break; } } break; #endif Edited March 24, 2020 by FALLEN1 char Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now