From 902a15cfff40bb5c34e1446392a99ed430810632 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 30 Mar 2024 01:05:41 -0500 Subject: [PATCH] Selling Fix Fixed a bug where crafted items were not selling properly. Now, players can successfully sell their crafted gear at vendors. --- source/Changelog.txt | 3 +++ source/UOXJSPropertyFuncs.cpp | 4 +++- source/vendor.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/Changelog.txt b/source/Changelog.txt index ec710f5d4..2890c531d 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -1,3 +1,6 @@ +30/03/2024 - Dragon Slayer/Xuri + Fixed a bug where crafted items were not selling properly. Now, players can successfully sell their crafted gear at vendors. + 22/03/2024 - Dragon Slayer/Xuri Leading/trailing whitespace is now trimmed from account names during login. diff --git a/source/UOXJSPropertyFuncs.cpp b/source/UOXJSPropertyFuncs.cpp index 703454701..3823356f9 100644 --- a/source/UOXJSPropertyFuncs.cpp +++ b/source/UOXJSPropertyFuncs.cpp @@ -3317,6 +3317,7 @@ JSBool CSocketProps_getProperty( JSContext *cx, JSObject *obj, jsval id, jsval * break; } case CSOCKP_CURRENTCHAR: + { myChar = gPriv->CurrcharObj(); if( !ValidateObject( myChar )) { @@ -3327,7 +3328,8 @@ JSBool CSocketProps_getProperty( JSContext *cx, JSObject *obj, jsval id, jsval * JSObject *myObj = JSEngine->AcquireObject( IUE_CHAR, myChar, JSEngine->FindActiveRuntime( JS_GetRuntime( cx ))); *vp = OBJECT_TO_JSVAL( myObj ); } - + break; + } case CSOCKP_IDLETIMEOUT: break; case CSOCKP_WASIDLEWARNED: *vp = BOOLEAN_TO_JSVAL( gPriv->WasIdleWarned() ); break; diff --git a/source/vendor.cpp b/source/vendor.cpp index 892c3e59b..3b1884cc9 100644 --- a/source/vendor.cpp +++ b/source/vendor.cpp @@ -535,7 +535,7 @@ bool CPISellItem::Handle( void ) { if( ValidateObject( k )) { - if( k->GetId() == j->GetId() && j->GetType() == k->GetType() ) + if(( k->GetId() == j->GetId() || k->GetSectionId() == j->GetSectionId() ) && j->GetType() == k->GetType() ) { if( j->GetId() != 0x14f0 || ( j->GetTempVar( CITV_MOREX ) == k->GetTempVar( CITV_MOREX ))) {