On Mon, 2003-10-20 at 06:27, Nicolas Weeger wrote: > Hello. > > I finally fixed python plugins to work under Windows. > I'll submit patches when i'm home, assuming my provider works & i can > diff files :) > > I got a remark concerning the python plugin, though, at least as it is > used in the casino scripts (Goths tavern, iirc): > > When you gain gold, the gold is created on the machine's spot. > But what happens is that first gold is created, then # of coins is set. > Which leads to incorrect behaviour: if there is gold on the spot > already, the newly created 1 gold coin is merged with it, then the count > is fixed. > So you can lose gold!! > > The sequence is the following: > * create 1 gold coin from plugin > * server code creates it, and merges it with gold already on floor > * plugin sets # of gold coin to gained value => incorrect count > > I don't know the 'right' way to fix: either server must not merge > newly-created items, or must not insert'em in the map already. > Or python plugin must take into account already existing gold > (so something like # gold coin = current # gold + gain - 1 [1 coming > from the object creation]). > > Just my 2 gold coins, err, cents of euro :) > > Nicolas 'Ryo' > You can of course pick up your winnings to avoid this happening :) _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel