Hey there,

I'm working with an NPC that displays items with incrtime (items that cannot be unlimited bought, they got kinda 'respawn' time)

Thing is, item incrtime is over so new item is available to be bought, but it needs to re-open the npc vendor in order for it to be displayed.

EXAMPLE
Louis (NPC), sells Apple (max amount: 5, incrtime: 2 seconds)
So Louis only sells 5 apples, that gets 'respawned' every 2 seconds.
Great, so, player opens Louis inventory, buys an apple (there is only 4 apples available), and after 2 seconds, a new one becomes available, so there is 5 apples available, but player still sees there is 4 apples available, the new one did not refreshed and it needs the player to re-open the NPC inventory window.

Is there any way to UPDATE the NPC vendor list, when a new Item becomes available?

There is these two functions:
Code:
Creature::GetVendorItemCurrentCount()
Creature::UpdateVendorItemCurrentCount()
That should do the trick, but, should be called once the item 'respawns', once the item becomes available to be bought again, it should call one of these functions (gotta try which one).

SO, HOPE YOU GUYS UNDERSTAND, do you have any idea, where in the Core the Item gets 'refreshed' (respawns)?
Maybe it is hardcoded?

- - - Updated - - -

Anyone?