Page 1 of 1

[FIXED] Boats: Placing boat from boatmodel gives extra key each time

Posted: Wed Jun 23, 2004 12:46 am
by Xuri
After placing a boat, you logically get a key for it. That's fine.

But when you later re-deed the boat into a boat-model, then place the boat again - you get an extra key. And another key the next time you do it. And another key the next time you do it. And so on :)

It's probably useful to get an extra key every now and then, but I'm not sure if this is the way to do that. Perhaps check if there already is a key in the players' inventory before adding a new one?

Posted: Wed Jun 23, 2004 3:54 pm
by giwo
Quite impossible, realistically...

Basically an "extra" key is created because someone decided not to delete current keys (they are simply invalidated).

So two options:

1) Live with it ;)

2) Have all active house/boat keys deleted upon re-deeding / transfer of ownership / regeneration of keys

Posted: Wed Jun 23, 2004 4:05 pm
by Xuri
Then option 2 would be preferable, in my opinion. You wouldn't want the old owner of a boat/house to have keys to the boat/house after selling it.

Posted: Wed Jun 23, 2004 4:07 pm
by giwo
Well, they basically become blank keys ;)

But yes, I can easily change a SetMore( INVALIDSERIAL ) or whatever it is to Delete().

Posted: Wed Jun 23, 2004 4:13 pm
by Maarc
The only real way to invalidate all key copies (and it would invalidate all, no doubt) is to do an item iteration over all the in the world, invalidating all type 7 with the matching serial. Not fun :)

Posted: Wed Jun 23, 2004 4:15 pm
by giwo
We already do that, unfortunately.

However, mutli's are always popular, and thus so will be house re-deeding, transfers, and key regeneration.

So I think I am going to add a vector to keep track of all house keys to save us this trouble in the future.

Posted: Thu Jun 24, 2004 4:10 pm
by giwo
Updated so keys will be deleted rather than invalidated.