Vendor Code?

Baleg Qhan

New Member
Joined
Dec 9, 2017
Messages
1
I must be missing something, here. I am looking for the code that disallows vendors in private structures. I looked in all of the vendor manager files, and I did not see it. So, I then looked in all of the structure manager files, and I did not see it there either. Does anyone know where I can find it?
 

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Joined
Mar 16, 2014
Messages
91
Location
Dark Rebellion RP
So, the thing about Vendors and Privacy, is that its not a value inherent with the managers, but rather, the times when you go to set it private. When you move to place a vendor, or set a structure's privacy, it will do an internal check to see if the building you're in is private, or contains vendors. You'll want to remove the checks in those two functions.

One of which is the SetPrivacy command. Here in line '62' of the SetprivacyCommand.h file, you'll see an if condition checking to see if one of the objects in the house is a vendor. If so, it will not set the house to private.
https://github.com/TheAnswer/Core3/blob/4d1de291562db5c6922b126d9807190beb48c9e5/MMOCoreORB/src/server/zone/objects/creature/commands/SetprivacyCommand.h

Simply remove that check, and you can set a house with vendors in it to private.

For the other way around, setting down vendors in a private house, you want to look into the code of setting down a vendor in the first place. I couldn't find this file based on the quick search I did for you, but its in there somewhere, likely as a session. You'll want to look for something like "Drop Vendor" or "Place Vendor" and find the check to see if the house you're in is private, then remove that check.

Hope this helps!
 

aag1220

New Member
Joined
Jul 20, 2013
Messages
12
Drop a vendor (don't initialize). Set the house to private then initialize the vendor. You then got a vendor in a private house.
 
Top Bottom