Any container, NPC, or creature can have items in their possession that are marked as infinite. These are marked by placing a negative amount in the container (such as –15). These items are always there, even if the NPC gives or sells them to the player.
The only time they truly go away is when the player interacts with their container outside of bartering. This includes picking the NPC’s pocket, taking items off a corpse, or stealing from a chest.
Example: A priest has 3 healing potions, which are marked as infinite. Everytime you talk to him you can buy these three potions. He then has 0. The next time you talk to him, he has 3 again. If you buy two, then kill him. He has 3 potions on him. You can take these 3 potions off his body, but now they will not regenerate on his body.
NPCs that do not have infinite gold will only be able to spend what they have over the course of the game.
When you give or take money from the NPC through bartering, this amount is added (or subtracted) to his infinite amount.
Using an NPC’s container through any means other than bartering (such as pick-pocketing, looting dead body), changes the infinite amount. So if I priest has 5 infinite potions, and you pick-pocket 2 of them, he now has 3 infinite potions.