New feature: We can now create non-profile-based merchants via lua.scripts.

Requires GameDir >= r2320.

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

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8212 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-05-15 17:11:29 +00:00
parent d594ba0e67
commit 7bb401b1fb
27 changed files with 295 additions and 296 deletions
+12 -11
View File
@@ -13080,23 +13080,24 @@ static int l_CreateArmedCivilain( lua_State *L )
static int l_CreateCivilian( lua_State *L )
{
if ( lua_gettop( L ) >= 11 )
if ( lua_gettop( L ) >= 12 )
{
INT32 sGridNo = lua_tointeger( L, 1 );
UINT8 usCivilianGroup = lua_tointeger( L, 2 );
INT8 sBodyType = lua_tointeger( L, 3 );
INT8 aVest = lua_tointeger( L, 4 );
INT8 aPants = lua_tointeger( L, 5 );
INT8 aHair = lua_tointeger( L, 6 );
INT8 aSkin = lua_tointeger( L, 7 );
INT16 item1 = lua_tointeger( L, 8 );
INT16 item2 = lua_tointeger( L, 9 );
INT16 item3 = lua_tointeger( L, 10 );
INT16 item4 = lua_tointeger( L, 11 );
INT8 usTraderID = lua_tointeger( L, 3 );
INT8 sBodyType = lua_tointeger( L, 4 );
INT8 aVest = lua_tointeger( L, 5 );
INT8 aPants = lua_tointeger( L, 6 );
INT8 aHair = lua_tointeger( L, 7 );
INT8 aSkin = lua_tointeger( L, 8 );
INT16 item1 = lua_tointeger( L, 9 );
INT16 item2 = lua_tointeger( L, 10 );
INT16 item3 = lua_tointeger( L, 11 );
INT16 item4 = lua_tointeger( L, 12 );
if ( gGameExternalOptions.bExtraCivilians )
{
SOLDIERTYPE* pSoldier = TacticalCreateCivilian( sGridNo, usCivilianGroup, sBodyType, aVest, aPants, aHair, aSkin, item1, item2, item3, item4 );
SOLDIERTYPE* pSoldier = TacticalCreateCivilian( sGridNo, usCivilianGroup, usTraderID, sBodyType, aVest, aPants, aHair, aSkin, item1, item2, item3, item4 );
if ( pSoldier )
{