Quiver for paladins - tfs1.X

jackl90

Member
Joined
Jul 25, 2017
Messages
153
Reaction score
5
@jackl90 @froy
C++:
            if (Container* container = ammoItem->getContainer())
            {
                if (container->getID() == 1999) // change quiver id here
                {
                    for (ContainerIterator iter = container->iterator(); iter.hasNext(); iter.advance())
                    {
                        const ItemType& itr = Item::items[(*iter)->getID()];
                        if (itr.ammoType == it.ammoType)
                        {
                            item = (*iter);
                            return item;
                        }
                    }
                }
            }
any method to block for example items diferent of xxx id inside container->getID() == 1999 ? for example?
because i tested here, i can put a normal backpack inside quiver container and work normally like a quiver.
 

jackl90

Member
Joined
Jul 25, 2017
Messages
153
Reaction score
5
@jackl90 @froy
C++:
            if (Container* container = ammoItem->getContainer())
            {
                if (container->getID() == 1999) // change quiver id here
                {
                    for (ContainerIterator iter = container->iterator(); iter.hasNext(); iter.advance())
                    {
                        const ItemType& itr = Item::items[(*iter)->getID()];
                        if (itr.ammoType == it.ammoType)
                        {
                            item = (*iter);
                            return item;
                        }
                    }
                }
            }
in this case for example, how add a condition if container is different of id 1999 no work this system?
 

jackl90

Member
Joined
Jul 25, 2017
Messages
153
Reaction score
5
because people can put other container inside container 1999 and this code will work too...
maybe is this part?

C++:
iter.hasNext(); iter.advance()
 
Top