I've been thinking about this auction house trigger, but I cannot phase it in my mind how it'd exactly work ... because I don't understand hashtables very well and maybe overestimate what they can do.
Please forgive my horrible, horrible pseudo-code and sloppy presentation. I'm writing this before going to bed.
hashtable holds x[n1,n2, . . . nn]
n = slots in building hero buys items
if hero sells item to building
then n1 = sold item with price y
then player owning selling hero receives prompt for price y
if hero buys n1 for price y
then n1 is removed from building's inventory
n1 goes into purchasing hero's inventory
price y is removed from player's gold
Is this possible?
Please forgive my horrible, horrible pseudo-code and sloppy presentation. I'm writing this before going to bed.
hashtable holds x[n1,n2, . . . nn]
n = slots in building hero buys items
if hero sells item to building
then n1 = sold item with price y
then player owning selling hero receives prompt for price y
if hero buys n1 for price y
then n1 is removed from building's inventory
n1 goes into purchasing hero's inventory
price y is removed from player's gold
Is this possible?