LuizFernando Posted December 22, 2017 Share Posted December 22, 2017 Boas, Alguém sabe como mudo essa linha para funcionar apenas para traje e cabelo invés de arma e armadura? //if ((item2->GetType() == ITEM_WEAPON) //|| (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY)) Link to comment Share on other sites More sharing options...
Aeglon Posted December 22, 2017 Share Posted December 22, 2017 Não testei, mas acho que é isto: Hidden Content Give reaction to this post to see the hidden content. Podes por exemplo ir a source/db/ProtoReader.cpp e ver o nome dos type e SubType que tu usas na tua source Link to comment Share on other sites More sharing options...
LuizFernando Posted December 22, 2017 Author Share Posted December 22, 2017 Estou utilizando essas funções? Gostaria que adiciona-se e roda-se apenas em traje e cabelos. // ¿¬Àç°æ Ư¼öó¸® // Àý´ë·Î ¿¬Àç°¡ Ãß°¡ ¾ÈµÉ°Å¶ó ÇÏ¿© Çϵå ÄÚµùÇÔ. if (item->GetVnum() == 71151 || item->GetVnum() == 76023) { if ( (item2->GetType() == ITEM_COSTUME && item2->GetSubType() == COSTUME_BODY) || (item2->GetType() == ITEM_COSTUME && item2->GetSubType() == COSTUME_HAIR)) //if ((item2->GetType() == ITEM_WEAPON) //|| (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY)) { bool bCanUse = true; for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { if (item2->GetLimitType(i) == LIMIT_LEVEL && item2->GetLimitValue(i) > 40) { bCanUse = false; break; } } if (false == bCanUse) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Àû¿ë ·¹º§º¸´Ù ³ô¾Æ »ç¿ëÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù.")); break; } } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¹«±â¿Í °©¿Ê¿¡¸¸ »ç¿ë °¡´ÉÇÕ´Ï´Ù.")); break; } } item2->ChangeAttribute(); } ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÏ¿´½À´Ï´Ù.")); { char buf[21]; snprintf(buf, sizeof(buf), "%u", item2->GetID()); LogManager::instance().ItemLog(this, item, "CHANGE_ATTRIBUTE", buf); } item->SetCount(item->GetCount() - 1); break; case USE_ADD_ATTRIBUTE : if (item2->GetAttributeSetIndex() == -1) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù.")); return false; } if (item2->GetAttributeCount() < 4) { // ¿¬Àç°¡ Ư¼öó¸® // Àý´ë·Î ¿¬Àç°¡ Ãß°¡ ¾ÈµÉ°Å¶ó ÇÏ¿© Çϵå ÄÚµùÇÔ. if (item->GetVnum() == 71152 || item->GetVnum() == 76024) { if ( (item2->GetType() == ITEM_COSTUME && item2->GetSubType() == COSTUME_BODY) || (item2->GetType() == ITEM_COSTUME && item2->GetSubType() == COSTUME_HAIR)) //if ((item2->GetType() == ITEM_WEAPON) //|| (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY)) { bool bCanUse = true; for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { if (item2->GetLimitType(i) == LIMIT_LEVEL && item2->GetLimitValue(i) > 40) { bCanUse = false; break; } } if (false == bCanUse) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Àû¿ë ·¹º§º¸´Ù ³ô¾Æ »ç¿ëÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù.")); break; } } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¹«±â¿Í °©¿Ê¿¡¸¸ »ç¿ë °¡´ÉÇÕ´Ï´Ù.")); break; } } Link to comment Share on other sites More sharing options...
Aeglon Posted December 22, 2017 Share Posted December 22, 2017 (edited) Eu de todo que não uso nem nunca usei bónus nos disfarces.... e sinceramente acho que nunca irei usar. Por isso não testei isto a fundo mas esta a funcionar! ####source\char_item.cpp Procura por: case USE_ADD_ATTRIBUTE2: mais abaixo poderás encontrar: Spoiler Hidden Content Give reaction to this post to see the hidden content. altera para: Spoiler Hidden Content Give reaction to this post to see the hidden content. irá ficar assim: << Hidden Content Give reaction to this post to see the hidden content. >> Procura por: if (item->GetVnum() == 71151 || item->GetVnum() == 76023) altera a função para: Spoiler Hidden Content Give reaction to this post to see the hidden content. >> Hidden Content Give reaction to this post to see the hidden content. << Procura por: if (item->GetVnum() == 71152 || item->GetVnum() == 76024) altera a função para: Spoiler Hidden Content Give reaction to this post to see the hidden content. << Hidden Content Give reaction to this post to see the hidden content. >> Testa tudo, tal como te disse... eu nunca usei nem nunca irei usar bónus nos disfarces! edit: em ambos os itens eu desactivei a função de verificar o nível em que estas a adicionar os rodares ou a rodar os itens. Caso queiras repor\alterar o nível.... Altera: if (item2->GetLimitType(i) == LIMIT_LEVEL && item2->GetLimitValue(i) != 0) para if (item2->GetLimitType(i) == LIMIT_LEVEL && item2->GetLimitValue(i) > 40) Edited December 22, 2017 by Aeglon Link to comment Share on other sites More sharing options...
LuizFernando Posted December 22, 2017 Author Share Posted December 22, 2017 Funcionou, sendo que quando coloco o aprimoramento em cima do traje invés de ficar verde ele fica vermelho. MAs funcionou 100% Link to comment Share on other sites More sharing options...
Aeglon Posted December 22, 2017 Share Posted December 22, 2017 talvez algo no uitooltip.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now