[CF-Devel] Python/casino stuff

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Mon Oct 20 05:27:23 CDT 2003


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'


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list