We can play external dialogue lines for NPC merchants via the lua function HandleNPCMerchantQuote(...)

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20611&goto=360388&#msg_360388

Requires GameDir >= r2550.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8821 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2020-06-17 20:21:39 +00:00
parent f0c6511ca4
commit 3b3abc2bc6
3 changed files with 35 additions and 0 deletions
+14
View File
@@ -13365,6 +13365,20 @@ void LuaHandleReplaceQuote( UINT8 ubProfile, UINT16 usQuoteNum )
LuaFunction( _LS.L, "HandleReplaceQuote" ).Param<int>( ubProfile ).Param<int>( usQuoteNum ).Call( 2 );
}
void LuaHandleNPCMerchantQuote( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, UINT16 ubMerchantID, UINT8 ubBodyType, UINT16 usQuoteNum )
{
const char* filename = "scripts\\Overhead.lua";
LuaScopeState _LS( true );
IniFunction( _LS.L(), TRUE );
IniGlobalGameSetting( _LS.L() );
SGP_THROW_IFFALSE( _LS.L.EvalFile( filename ), _BS( "Cannot open file: " ) << filename << _BS::cget );
LuaFunction( _LS.L, "HandleNPCMerchantQuote" ).Param<int>( sSectorX ).Param<int>( sSectorY ).Param<int>( bSectorZ ).Param<int>( ubMerchantID ).Param<int>( ubBodyType ).Param<int>( usQuoteNum ).Call( 6 );
}
void LuaAddArmsDealerAdditionalIntelData()
{
const char* filename = "scripts\\Overhead.lua";