Postado Junho 29, 2018 6 anos 46 minutos atrás, Gabrieldsadaxas disse: cara, eu tenho um item que adiciona vida e mana no meu ot e ele funciona 100%... vc n esqueceu de adicionar as tags do item no movements? pior que não brow, qualquer item que eu tento por life, ele buga, tipo adiciona "ml/skill/mana/life" mas só a life que buga sabe.
Postado Junho 29, 2018 6 anos 1 minuto atrás, Gabrieldsadaxas disse: colocou deEquip nos movements tb? @Zzyzx coloquei sim brow
Postado Junho 29, 2018 6 anos @.Foxxy , o problema na 0.3.6 era no __queryDestination do player.cpp Esse aqui funciona (se o código ficar bugado no spoiler, pega do LINK): Cylinder* Player::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags) { if (index == 0 /*drop to capacity window*/ || index == INDEX_WHEREEVER) { *destItem = NULL; const Item* item = thing->getItem(); if (!item) return this; //find an appropiate slot std::list<Container*> containerList; for (int i = SLOT_FIRST; i < SLOT_LAST; ++i) { Item* inventoryItem = inventory[i]; if (inventoryItem) { if (inventoryItem == tradeItem) { continue; } //try find an already existing item to stack with if (inventoryItem != item && item->isStackable() && inventoryItem->getID() == item->getID() && inventoryItem->getItemCount() < 100) { *destItem = inventoryItem; index = i; return this; } //check sub-containers else if (Container* subContainer = inventoryItem->getContainer()) { Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if (tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR) { index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } containerList.push_back(subContainer); } } //empty slot else if (__queryAdd(i, item, item->getItemCount(), flags) == RET_NOERROR) { index = i; *destItem = NULL; return this; } } //check deeper in the containers for (std::list<Container*>::iterator it = containerList.begin(); it != containerList.end(); ++it) { for (ContainerIterator iit = (*it)->begin(); iit != (*it)->end(); ++iit) { if (Container* subContainer = (*iit)->getContainer()) { if (subContainer == tradeItem) { continue; } Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if (tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR) { index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } } } } return this; } Thing* destThing = __getThing(index); if (destThing) *destItem = destThing->getItem(); Cylinder* subCylinder = dynamic_cast<Cylinder*>(destThing); if (subCylinder) { index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } return this; } Editado Junho 29, 2018 6 anos por Rusherzin (veja o histórico de edições)
Postado Julho 20, 2018 6 anos o codigo de cima funcionou Editado Julho 20, 2018 6 anos por Gabrieldsadaxas (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.