F-Caneiras Posted August 20, 2017 Share Posted August 20, 2017 (edited) Boas pessoal! Bem la venho eu mais uma vez a procura de ajuda. Estou com o seguinte bug Não consigo adicionar bonus nem rodalos. Spoiler Hidden Content Give reaction to this post to see the hidden content. Onde posso editar ou desbugar isso? Edited August 20, 2017 by Caneiras Link to comment Share on other sites More sharing options...
GODSPEED Posted August 20, 2017 Share Posted August 20, 2017 ficheiro char_item.cpp posta ai "case USE_ADD_ATTRIBUTE " todo para ver qual o problema Link to comment Share on other sites More sharing options...
GODSPEED Posted August 20, 2017 Share Posted August 20, 2017 2 minutos atrás, Caneiras disse: Boas Desde já obrigado eu ainda não sei como compilar a surce e ando a nora com os locais mas pelo nome encontrei está assim // ACCESSORY_REFINE & ADD/CHANGE_ATTRIBUTES case USE_PUT_INTO_BELT_SOCKET: case USE_PUT_INTO_RING_SOCKET: case USE_PUT_INTO_ACCESSORY_SOCKET: case USE_ADD_ACCESSORY_SOCKET: case USE_CLEAN_SOCKET: case USE_CHANGE_ATTRIBUTE: case USE_CHANGE_ATTRIBUTE2 : case USE_ADD_ATTRIBUTE: case USE_ADD_ATTRIBUTE2: case USE_CHANGE_ATTRIBUTE3: tenta ver o que tem uma função case USE_ADD_ATTRIBUTE : if (item2->GetAttributeSetIndex() == -1) .... até case USE_ADD_ATTRIBUTE2 : Link to comment Share on other sites More sharing options...
F-Caneiras Posted August 20, 2017 Author Share Posted August 20, 2017 Deve ser isto eu meti a lista completa a cima isto Spoiler case USE_ADD_ATTRIBUTE : if (item2->GetType() == ITEM_WEAPON || item2->GetType() == ITEM_ARMOR || item2->GetType() == ITEM_BELT) { char szEventFlag[30]; snprintf(szEventFlag, sizeof(szEventFlag), "%d.Engel", item2->GetID()); if (*szEventFlag) { if (quest::CQuestManager::instance().GetEventFlag(szEventFlag)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("item_engel")); return false; } } } if (item2->GetAttributeSetIndex() == -1) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다.")); return false; } if (item2->GetAttributeCount() < 4) { // 연재가 특수처리 // 절대로 연재가 추가 안될거라 하여 하드 코딩함. if (item->GetVnum() == 71152 || item->GetVnum() == 76024) { 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; } } char buf[21]; snprintf(buf, sizeof(buf), "%u", item2->GetID()); if (number(1, 100) <= 100) { item2->AddAttribute(); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성 추가에 성공하였습니다.")); int iAddedIdx = item2->GetAttributeCount() - 1; LogManager::instance().ItemLog( GetPlayerID(), item2->GetAttributeType(iAddedIdx), item2->GetAttributeValue(iAddedIdx), item->GetID(), "ADD_ATTRIBUTE_SUCCESS", buf, GetDesc()->GetHostName(), item->GetOriginalVnum()); } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성 추가에 실패하였습니다.")); LogManager::instance().ItemLog(this, item, "ADD_ATTRIBUTE_FAIL", buf); } item->SetCount(item->GetCount() - 1); } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("더이상 이 아이템을 이용하여 속성을 추가할 수 없습니다.")); } break; case USE_ADD_ATTRIBUTE2 : Link to comment Share on other sites More sharing options...
GODSPEED Posted August 20, 2017 Share Posted August 20, 2017 Hidden Content Give reaction to this post to see the hidden content. tenta assim, isso são os adicionares 1 Link to comment Share on other sites More sharing options...
GODSPEED Posted August 20, 2017 Share Posted August 20, 2017 olha mas quando usas os adds aparece algo no chat? Link to comment Share on other sites More sharing options...
F-Caneiras Posted August 20, 2017 Author Share Posted August 20, 2017 (edited) não aprece nada nem faz nada so fica amarela a arma Eu ainda tenho de prender como compilar as surces xD Edited August 20, 2017 by Caneiras Link to comment Share on other sites More sharing options...
GODSPEED Posted August 20, 2017 Share Posted August 20, 2017 3 minutos atrás, Caneiras disse: não aprece nada nem faz nada so fica amarela a arma Eu ainda tenho de prender como compilar as surces xD Hidden Content Give reaction to this post to see the hidden content. Link to comment Share on other sites More sharing options...
F-Caneiras Posted August 20, 2017 Author Share Posted August 20, 2017 Obrigado vou dar uma estudada e depois ver se consigo resolver o bug . Não existe uma lista que diga para que serve cada cpp da surce? Link to comment Share on other sites More sharing options...
GODSPEED Posted August 20, 2017 Share Posted August 20, 2017 não é necessário, pois o nome dos já informa : por exemplo char_item.cpp , fala sobre o uso de items -> char personagem, item items item.cpp, fala sobre os items em geral , onde tem as suas propriedades por exemplo a prop : isLocked verifica se o item ta bloqueado os inputs falam sobre o uso de chat tudo que seja input( do usuario para a maquina) etc, é uma questão de analisar Link to comment Share on other sites More sharing options...
F-Caneiras Posted August 23, 2017 Author Share Posted August 23, 2017 Boas Estive a ver linha por linha de um ao outro e são idênticos não percebo porque não consigo adicionar bónus Link to comment Share on other sites More sharing options...
GODSPEED Posted August 23, 2017 Share Posted August 23, 2017 (edited) 13 horas atrás, Caneiras disse: Boas Estive a ver linha por linha de um ao outro e são idênticos não percebo porque não consigo adicionar bónus o que eu mandei é o seu eu só editei as primeiras pois pareciam descenessárias, e provavelmente eram elas que causam bug e adicionei uma outra linha veja essas linhas : Hidden Content Give reaction to this post to see the hidden content. basicamente o que elas fazem é se szEventFlag[0] != 0 e se eventeflag szEventFlag for !=0 dá erro, como abordei no meu tópico return false, então sem essas linhas os rodares funcionaram perfeitamente Edited August 23, 2017 by Elliot 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