em game.cpp em baixo de
if(!player->hasCustomFlag(PlayerCustomFlag_CanThrowAnywhere))
{
if((std::abs(playerPos.x - mapToPos.x) > item->getThrowRange()) ||
(std::abs(playerPos.y - mapToPos.y) > item->getThrowRange()) ||
(std::abs(mapFromPos.z - mapToPos.z) * 4 > item->getThrowRange()))
{
player->sendCancelMessage(RET_DESTINATIONOUTOFREACH);
return false;
}
}
coloque isso:
if(item->getContainer())
{
Container* container = item->getContainer();
for(ContainerIterator sb = container->begin(), end = container->end(); sb != end; ++sb)
{
Item* ballSLot = (*sb)->getItem();
boost::any valueU = (ballSLot)->getAttribute("unique");
if(valueU.type() == typeid(int32_t))
{
if(boost::any_cast<int32_t>(valueU) == 1)
{
Thing* thingT = internalGetThing(player, toPos, toIndex, spriteId, STACKPOS_MOVE);
if(getMap()->getTile(toPos))
{
player->sendTextMessage(MSG_INFO_DESCR, "A item in this container is a Unique Item. You can't throw away this item!");
return false;
}
}
}
}
}
OBS: isso é só para não poder rebolar a bag com item unique no chão, a outra parte estou com preguiça. quem sabe, mais tarde eu resolva fazer, se ninguém ainda tiver feito, até lá. kkkk