Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

can_i_dcignorelos + can_i_dcignoredist #1122

Open Soulless-1 opened 1 year ago

Soulless-1 commented 1 year ago

these work for items in the open world, but not for items inside packs, so in this instance for this players vendor shop its difficult to browse inside bags.

image

xwerswoodx commented 1 year ago

It's expected behaviour, because think you make a sword dcignorelos, dcignoredist and everyone can click other people's backpack and take them. So probably this is blocked intentionally. But I may add a flag for npcs to make their backpacks reachable if needed.

Soulless-1 commented 1 year ago

the flags already exist, they just do not apply to items inside containers it seems : can_i_dcignorelos + can_i_dcignoredist having these flags work for items in containers shouldnt pose an issue no? They are the exception not the norm. Adding this flag to an item would be a very specific case for someone and they would know very well why they did it in the first place. In this case it's a player vendor, and bags inside his main container need to be opened so players can browse through them. in this situation @dclick does not fire at all so you cannot control that behavior. It doesnt fire because of the LOS and Distance.

xwerswoodx commented 1 year ago

Yes but the problem is the person who added that code intentionally block the bankbox and character backpacks. Also disabling it can be cause many issues. I can add a sphere.ini setting for it to let scripters choose if they want to make bankbox and character backpacks reachable on dcignore flags.

Soulless-1 commented 1 year ago

well its just a flag you add to the itemdef, like i would add to a 'vendorBackpack item' that is their layer 21, and that would suffice for this issue if they could just dclick in that container on account of that flag added to it. unless im not understanding, that wouldnt affect anything except for the item that has the flag on it.

just like for a door, i would add it to the vendor backpack itemdef, i would assume that would be best. image