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

Here we stuff all the bugs we've managed to squash/squish/squelch.
Locked
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

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

Post 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?
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post 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
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post 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.
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Well, they basically become blank keys ;)

But yes, I can easily change a SetMore( INVALIDSERIAL ) or whatever it is to Delete().
Scott
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post 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 :)
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post 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.
Scott
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Updated so keys will be deleted rather than invalidated.
Scott
Locked