SphereServer BugTracker - SphereServer
View Issue Details
0001850SphereServernew feature requestpublic05-11-10 06:0504-11-15 19:46
Coruja 
Coruja 
normalminorN/A
resolvedfixed 
 
0.56c Nightly 
Not Available
None
None
0001850: brain_banker + brain_vendor
Actually if you set NPC=brain_banker on a npc, it will act like a banker, and NPC=brain_vendor will act like a vendor

On OSI bankers act like vendors (to buy/sell items), but there's no way to do this on sphere. So my request is do something to allow brain_banker act like brain_vendor too :D
No tags attached.
Issue History
05-11-10 06:05CorujaNew Issue
02-05-14 18:24FeehNote Added: 0002139
02-05-14 19:24CorujaNote Added: 0002140
02-05-14 20:23FeehAssigned To => Feeh
02-05-14 20:23FeehStatusnew => assigned
03-05-14 09:51XuNNote Added: 0002141
04-05-14 17:49FeehNote Added: 0002148
04-05-14 17:52FeehNote Edited: 0002148bug_revision_view_page.php?bugnote_id=0002148#r634
04-05-14 17:53FeehNote Edited: 0002148bug_revision_view_page.php?bugnote_id=0002148#r635
23-05-14 20:21FeehAssigned ToFeeh =>
29-10-14 11:44XuNAssigned To => Coruja
04-11-15 19:46CorujaStatusassigned => resolved
04-11-15 19:46CorujaFixed in Version => 0.56c Nightly
04-11-15 19:46CorujaResolutionopen => fixed

Notes
(0002139)
Feeh   
02-05-14 18:24   
Isn't it handled by TSPEECH=jobbanker ?
(0002140)
Coruja   
02-05-14 19:24   
Nice, if I add TSPEECH=jobbanker on a vendor (NPC=brain_vendor) it will work fine and I can use bank + buy/sell items

but if I add TSPEECH=spk_shopkeep on the banker (NPC=brain_banker) and set BUY/SELL list it will work as banker but it will say "I have nothing to buy/sell"

whats the difference between brain_vendor and brain_banker? If brain_banker doesnt have nothing special I think it fine replace it by brain_vendor and add bank functionality using TSPEECH=jobbanker
(0002141)
XuN   
03-05-14 09:51   
Right now it doesn't matter you have brain_banker or brain_berserk, the hear command 'bank' will do src.bankself ... so this is why bank will open, however it was mean to be open only on bankers, hence the brain.

Vendors can manage your bank, bankers cannot sell their items: solution ... add vendors with bank.
(0002148)
Feeh   
04-05-14 17:49   
(edited on: 04-05-14 17:53)
Brain Banker is used internally to:
1- place the Bank context menu option
2- Gold dropped to the banker will be moved into player's account
3- // NPC's with special key words ?

My first solution: I've created a third mix of banker+vendor, so the npc will display both banker and vendor context menus and will allow players to buy from it

My second solution: Set the banker as vendor in the CCharNPC::IsVendor() function. This alone will not place the banker context menu but may allow player to buy from it. Context menus check may use the IsVendor function

My third solution: mix both vendor and banker into one brain, check for IsVendor/Context menus/etc by the existence of vendor boxes and open bank inside the core instead of scripts

Coruja's solution: Town NPC's will always be human (NPCBRAIN_HUMAN -> 2) and create both CAN flags mt_BANKER and mt_VENDOR. context menus will use the can flag to display its respective items

Mu fourth solution: Brain act like flags instead of numbers. Major core mods needed

I've done my first solution, it is working well but it does create a new npc brain only to supply such feature, that's why I didn't committed yet