Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Lua configuration for item upgrades

Newbie Spellweaver
Joined
Dec 17, 2018
Messages
33
Reaction score
25
o/

In the leaked v21.2 sources, I noticed these ItemUpgradeXXX.lua files and immediately took a deeper look at those. At first glance, these were files to configure what materials would be used for different kinds of upgrades, for what kind of item, prices and rates.
From the regular, simple "+X" upgrade to awakening, it seemed to have everything, but the more I looked, the more it became clear that this was incomplete, and unfinished.

Looking at the source confirmed this: it was not implemented anywhere, and the upgrade systems were still hardcoded.

So naturally, I said duck it and took it upon myself to finish that work and after 10ish days of work and a... little "burnout", I ended up with something that I'm satisfied with.
Below I'm only showcasing the accessory upgrade, but it works for everything, whilst imitating retail behavior as closely as possible (and it does so almost perfectly if you provide a retail-like configuration). I even went ahead and added a different kind of protection based on flyff universe, where your item is protected but failure = -1 level.

All the configuration is done server-side and informations are sent to the client on login.
This is more of a proof of concept thing, but definitely makes it easier to modify anything related to upgrades.



Even if this is a showcase, here are my lua functions in case someone wants to have fun as well: (note that some parts are just leftovers from the v21.2 file and remain unused)
Code:
--------------------------------------------------------------------
-- 일반 제련 -------------------------------------------------------
--------------------------------------------------------------------

tGeneralEnchant = {}

function AddGeneralEnchant( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tGeneralEnchant ) + 1

	tGeneralEnchant[nIndex] = {}
	tGeneralEnchant[nIndex].strItemKind1 = strItemKind1
	tGeneralEnchant[nIndex].strItemKind2 = strItemKind2
	tGeneralEnchant[nIndex].strItemKind3 = strItemKind3
	tGeneralEnchant[nIndex].tMaterialItem = {}
	tGeneralEnchant[nIndex].tEnchantProb = {}
end

function SetGeneralMaterial( dwMaxLevel, dwRiskLevel, strMaterialItemKind1, strMaterialItemKind2, strMaterialItemKind3, strDisplayId )
	local nIndex 	= #( tGeneralEnchant )
  local nMatIndex = #( tGeneralEnchant[nIndex].tMaterialItem ) + 1

	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex] = {}
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].dwMaxLevel = dwMaxLevel
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].dwRiskLevel = dwRiskLevel
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind1 = strMaterialItemKind1
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind2 = strMaterialItemKind2
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind3 = strMaterialItemKind3
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].strDisplayId = strDisplayId
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds = {}
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals = {}
end

function AddGeneralMaterialProtection( strItemId, dwMaxLevel, bProtMode )
	local nIndex 	= #( tGeneralEnchant )
  local nMatIndex = #( tGeneralEnchant[nIndex].tMaterialItem )
  local nProtIndex = #( tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds ) + 1

  tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex] = {}
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].strItemId = strItemId
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].dwMaxLevel = dwMaxLevel
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].bProtMode = bProtMode
end

function AddGeneralMaterialBooster( strItemId, dwSuccessBoost, dwMaxLevel )
	local nIndex 	= #( tGeneralEnchant )
  local nMatIndex = #( tGeneralEnchant[nIndex].tMaterialItem )
  local nBoostIndex = #( tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals ) + 1

	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex] = {}
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex].strItemId = strItemId
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex].dwSuccessBoost = dwSuccessBoost
	tGeneralEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex].dwMaxLevel = dwMaxLevel
end

function SetGeneralEnchantProb( dwLevel, dwSuccessProb )
	local nIndex 	= #( tGeneralEnchant )

	tGeneralEnchant[nIndex].tEnchantProb[dwLevel] = {}
	tGeneralEnchant[nIndex].tEnchantProb[dwLevel].dwSuccessProb = dwSuccessProb
end


--------------------------------------------------------------------
-- 속성 제련 -------------------------------------------------------
--------------------------------------------------------------------

tAttributeEnchant = {}

function AddAttributeEnchant( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tAttributeEnchant ) + 1

	tAttributeEnchant[nIndex] = {}
	tAttributeEnchant[nIndex].strItemKind1 = strItemKind1
	tAttributeEnchant[nIndex].strItemKind2 = strItemKind2
	tAttributeEnchant[nIndex].strItemKind3 = strItemKind3
	tAttributeEnchant[nIndex].tMaterialItem = {}
	tAttributeEnchant[nIndex].nAttributeRemovePenya = 0
	tAttributeEnchant[nIndex].tEnchantProb = {}
end

function SetAttributeMaterial( dwMaxLevel, dwRiskLevel, strMaterialItemKind1, strMaterialItemKind2, strMaterialItemKind3, strDisplayId )
	local nIndex 	= #( tAttributeEnchant )
  local nMatIndex = #( tAttributeEnchant[nIndex].tMaterialItem ) + 1

	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex] = {}
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].dwMaxLevel = dwMaxLevel
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].dwRiskLevel = dwRiskLevel
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind1 = strMaterialItemKind1
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind2 = strMaterialItemKind2
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind3 = strMaterialItemKind3
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].strDisplayId = strDisplayId
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds = {}
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals = {}
end

function AddAttributeMaterialProtection( strItemId, dwMaxLevel, bProtMode )
	local nIndex 	= #( tAttributeEnchant )
  local nMatIndex = #( tAttributeEnchant[nIndex].tMaterialItem )
  local nProtIndex = #( tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds ) + 1

	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex] = {}
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].strItemId = strItemId
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].dwMaxLevel = dwMaxLevel
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].bProtMode = bProtMode
end

function AddAttributeMaterialBooster( strItemId, dwSuccessBoost, dwMaxLevel )
	local nIndex 	= #( tAttributeEnchant )
  local nMatIndex = #( tAttributeEnchant[nIndex].tMaterialItem )
  local nBoostIndex = #( tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals ) + 1

	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex] = {}
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex].strItemId = strItemId
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex].dwSuccessBoost = dwSuccessBoost
	tAttributeEnchant[nIndex].tMaterialItem[nMatIndex].tBoostVals[nBoostIndex].dwMaxLevel = dwMaxLevel
end

function SetAttributeRemovePenya( nAttributeRemovePenya )
	local nIndex 	= #( tAttributeEnchant )

	tAttributeEnchant[nIndex].nAttributeRemovePenya = nAttributeRemovePenya
end

function SetAttributeEnchantProb( dwLevel, dwSuccessProb, dwAddDamageRate, dwAddDefenseRate, dwAddAtkDmgRate )
	local nIndex 	= #( tAttributeEnchant )

	tAttributeEnchant[nIndex].tEnchantProb[dwLevel] = {}
	tAttributeEnchant[nIndex].tEnchantProb[dwLevel].dwSuccessProb = dwSuccessProb
	tAttributeEnchant[nIndex].tEnchantProb[dwLevel].dwAddDamageRate = dwAddDamageRate
	tAttributeEnchant[nIndex].tEnchantProb[dwLevel].dwAddDefenseRate = dwAddDefenseRate
	tAttributeEnchant[nIndex].tEnchantProb[dwLevel].dwAddAtkDmgRate = dwAddAtkDmgRate
end


--------------------------------------------------------------------
----------------------------- Piercing -----------------------------
--------------------------------------------------------------------

tPiercing = {}

function AddPiercing( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tPiercing ) + 1

	tPiercing[nIndex] = {}
	tPiercing[nIndex].strItemKind1 = strItemKind1
	tPiercing[nIndex].strItemKind2 = strItemKind2
	tPiercing[nIndex].strItemKind3 = strItemKind3
	tPiercing[nIndex].tMaterialItem = {}
	tPiercing[nIndex].strPiercedItemKind1 = 0
	tPiercing[nIndex].strPiercedItemKind2 = 0
	tPiercing[nIndex].strPiercedItemKind3 = 0
	tPiercing[nIndex].nSizeIncreasePenya = 0
	tPiercing[nIndex].nItemRemovePenya = 0
	tPiercing[nIndex].tPiercingSizeProb = {}
end

function SetPiercingMaterial( dwMaxLevel, dwRiskLevel, strMaterialItemKind1, strMaterialItemKind2, strMaterialItemKind3, strDisplayId )
	local nIndex 	= #( tPiercing )
  local nMatIndex = #( tPiercing[nIndex].tMaterialItem ) + 1

	tPiercing[nIndex].tMaterialItem[nMatIndex] = {}
	tPiercing[nIndex].tMaterialItem[nMatIndex].dwMaxLevel = dwMaxLevel
	tPiercing[nIndex].tMaterialItem[nMatIndex].dwRiskLevel = dwRiskLevel
	tPiercing[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind1 = strMaterialItemKind1
	tPiercing[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind2 = strMaterialItemKind2
	tPiercing[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind3 = strMaterialItemKind3
	tPiercing[nIndex].tMaterialItem[nMatIndex].strDisplayId = strDisplayId
	tPiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds = {}
end

function AddPiercingMaterialProtection( strItemId, dwMaxLevel, bProtMode )
	local nIndex 	= #( tPiercing )
  local nMatIndex = #( tPiercing[nIndex].tMaterialItem )
  local nProtIndex = #( tPiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds ) + 1

  tPiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex] = {}
	tPiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].strItemId = strItemId
	tPiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].dwMaxLevel = dwMaxLevel
	tPiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].bProtMode = bProtMode
end

function SetPiercedItem( strPiercedItemKind1, strPiercedItemKind2, strPiercedItemKind3 )
	local nIndex 	= #( tPiercing )

	tPiercing[nIndex].strPiercedItemKind1 = strPiercedItemKind1
	tPiercing[nIndex].strPiercedItemKind2 = strPiercedItemKind2
	tPiercing[nIndex].strPiercedItemKind3 = strPiercedItemKind3
end

function SetPiercingSizeIncreasePenya( nSizeIncreasePenya )
	local nIndex 	= #( tPiercing )

	tPiercing[nIndex].nSizeIncreasePenya = nSizeIncreasePenya
end

function SetPiercedItemRemovePenya( nItemRemovePenya )
	local nIndex 	= #( tPiercing )

	tPiercing[nIndex].nItemRemovePenya = nItemRemovePenya
end

function SetPiercingSizeProb( dwSize, dwProb )
	local nIndex 	= #( tPiercing )

	tPiercing[nIndex].tPiercingSizeProb[dwSize] = {}
	tPiercing[nIndex].tPiercingSizeProb[dwSize].dwProb = dwProb
end


---------------------------------------------------------------------
--------------------------- Rune Piercing ---------------------------
---------------------------------------------------------------------

tRunePiercing = {}

function AddRunePiercing( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tRunePiercing ) + 1

	tRunePiercing[nIndex] = {}
	tRunePiercing[nIndex].strItemKind1 = strItemKind1
	tRunePiercing[nIndex].strItemKind2 = strItemKind2
	tRunePiercing[nIndex].strItemKind3 = strItemKind3
	tRunePiercing[nIndex].tMaterialItem = {}
	tRunePiercing[nIndex].strPiercedItemKind1 = 0
	tRunePiercing[nIndex].strPiercedItemKind2 = 0
	tRunePiercing[nIndex].strPiercedItemKind3 = 0
	tRunePiercing[nIndex].nSizeIncreasePenya = 0
	tRunePiercing[nIndex].nItemRemovePenya = 0
	tRunePiercing[nIndex].tPiercingSizeProb = {}
end

function SetRunePiercingMaterial( dwMaxLevel, dwRiskLevel, strMaterialItemKind1, strMaterialItemKind2, strMaterialItemKind3, strDisplayId )
	local nIndex 	= #( tRunePiercing )
  local nMatIndex = #( tRunePiercing[nIndex].tMaterialItem ) + 1

	tRunePiercing[nIndex].tMaterialItem[nMatIndex] = {}
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].dwMaxLevel = dwMaxLevel
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].dwRiskLevel = dwRiskLevel
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind1 = strMaterialItemKind1
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind2 = strMaterialItemKind2
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].strMaterialItemKind3 = strMaterialItemKind3
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].strDisplayId = strDisplayId
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds = {}
end

function AddRunePiercingMaterialProtection( strItemId, dwMaxLevel, bProtMode )
	local nIndex 	= #( tRunePiercing )
  local nMatIndex = #( tRunePiercing[nIndex].tMaterialItem )
  local nProtIndex = #( tRunePiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds ) + 1

  tRunePiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex] = {}
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].strItemId = strItemId
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].dwMaxLevel = dwMaxLevel
	tRunePiercing[nIndex].tMaterialItem[nMatIndex].tProtectIds[nProtIndex].bProtMode = bProtMode
end

function SetRunePiercedItem( strPiercedItemKind1, strPiercedItemKind2, strPiercedItemKind3 )
	local nIndex 	= #( tRunePiercing )

	tRunePiercing[nIndex].strPiercedItemKind1 = strPiercedItemKind1
	tRunePiercing[nIndex].strPiercedItemKind2 = strPiercedItemKind2
	tRunePiercing[nIndex].strPiercedItemKind3 = strPiercedItemKind3
end

function SetRunePiercingSizeIncreasePenya( nSizeIncreasePenya )
	local nIndex 	= #( tRunePiercing )

	tRunePiercing[nIndex].nSizeIncreasePenya = nSizeIncreasePenya
end

function SetRunePiercedItemRemovePenya( nItemRemovePenya )
	local nIndex 	= #( tRunePiercing )

	tRunePiercing[nIndex].nItemRemovePenya = nItemRemovePenya
end

function SetRunePiercingSizeProb( dwSize, dwProb )
	local nIndex 	= #( tRunePiercing )

	tRunePiercing[nIndex].tPiercingSizeProb[dwSize] = {}
	tRunePiercing[nIndex].tPiercingSizeProb[dwSize].dwProb = dwProb
end

--------------------------------------------------------------------
-- 각성 ------------------------------------------------------------
--------------------------------------------------------------------

tRandomOptionExtension = {}

function AddRandomOptionExtension( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tRandomOptionExtension ) + 1

	tRandomOptionExtension[nIndex] = {}
	tRandomOptionExtension[nIndex].strItemKind1 = strItemKind1
	tRandomOptionExtension[nIndex].strItemKind2 = strItemKind2
	tRandomOptionExtension[nIndex].strItemKind3 = strItemKind3
	tRandomOptionExtension[nIndex].strMaterialItemKind1 = 0
	tRandomOptionExtension[nIndex].strMaterialItemKind2 = 0
	tRandomOptionExtension[nIndex].strMaterialItemKind3 = 0
	tRandomOptionExtension[nIndex].dwDummyRandomOptionSize = 0
	tRandomOptionExtension[nIndex].nRandomOptionGeneratePenya = 0
	tRandomOptionExtension[nIndex].tRandomOptionSizeProb = {}
	tRandomOptionExtension[nIndex].tDstProb = {}
end

function SetRandomOptionMaterial( strMaterialItemKind1, strMaterialItemKind2, strMaterialItemKind3 )
	local nIndex 	= #( tRandomOptionExtension )

	tRandomOptionExtension[nIndex].strMaterialItemKind1 = strMaterialItemKind1
	tRandomOptionExtension[nIndex].strMaterialItemKind2 = strMaterialItemKind2
	tRandomOptionExtension[nIndex].strMaterialItemKind3 = strMaterialItemKind3
end

function SetRandomOptionGeneratePenya( nRandomOptionGeneratePenya )
	local nIndex 	= #( tRandomOptionExtension )

	tRandomOptionExtension[nIndex].nRandomOptionGeneratePenya = nRandomOptionGeneratePenya
end

function SetRandomOptionSizeProb( dwSize, dwProb )
	local nIndex 	= #( tRandomOptionExtension )

	tRandomOptionExtension[nIndex].tRandomOptionSizeProb[dwSize] = {}
	tRandomOptionExtension[nIndex].tRandomOptionSizeProb[dwSize].dwProb = dwProb
end

function SetDummyRandomOptionSize( dwDummyRandomOptionSize )
	local nIndex 	= #( tRandomOptionExtension )

	tRandomOptionExtension[nIndex].dwDummyRandomOptionSize = dwDummyRandomOptionSize
end

function SetDstProb( strDst, dwProb, dwRetryProb, dwDummyProb )
	local nGIndex 	= #( tRandomOptionExtension )
	local nDIndex	= #( tRandomOptionExtension[nGIndex].tDstProb ) + 1

	tRandomOptionExtension[nGIndex].tDstProb[nDIndex] = {}
	tRandomOptionExtension[nGIndex].tDstProb[nDIndex].strDst = strDst
	tRandomOptionExtension[nGIndex].tDstProb[nDIndex].dwProb = dwProb
	tRandomOptionExtension[nGIndex].tDstProb[nDIndex].dwRetryProb = dwRetryProb
	tRandomOptionExtension[nGIndex].tDstProb[nDIndex].dwDummyProb = dwDummyProb
end


tDstParameter = {}

function AddDstParameter( strDst )
	local nIndex = #( tDstParameter ) +1

	tDstParameter[nIndex] = {}
	tDstParameter[nIndex].strDst = strDst
	tDstParameter[nIndex].tAdjProb = {}
end

function SetAdjValueProb( nAdjValue, dwProb, dwRetryProb, dwDummyProb )
	local nDIndex 	= #( tDstParameter )
	local nAIndex	= #( tDstParameter[nDIndex].tAdjProb ) + 1

	tDstParameter[nDIndex].tAdjProb[nAIndex] = {}
	tDstParameter[nDIndex].tAdjProb[nAIndex].nAdjValue = nAdjValue
	tDstParameter[nDIndex].tAdjProb[nAIndex].dwProb = dwProb
	tDstParameter[nDIndex].tAdjProb[nAIndex].dwRetryProb = dwRetryProb
	tDstParameter[nDIndex].tAdjProb[nAIndex].dwDummyProb = dwDummyProb
end


--------------------------------------------------------------------
-- 합성 ------------------------------------------------------------
--------------------------------------------------------------------

ENCHANT_GENERAL			= 1		-- 일반 제련
PIERCING_GENERAL		= 8		-- 일반 피어싱
RANDOM_OPTION_ORIGIN		= 16		-- 랜덤 옵션( ex. 힘과 민첩.. )
RANDOM_OPTION_EXTENSION		= 32		-- 각성 및 축복


tCombine= {}

function AddCombine( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tCombine ) + 1

	tCombine[nIndex] = {}
	tCombine[nIndex].strItemKind1 = strItemKind1
	tCombine[nIndex].strItemKind2 = strItemKind2
	tCombine[nIndex].strItemKind3 = strItemKind3
	tCombine[nIndex].dwCombineOption = 0
	tCombine[nIndex].dwSuccessProb = 0
	tCombine[nIndex].nInitializePenya = 0
end

function SetCombineOption( ... )
	local nIndex = #( tCombine )

	local dwOption = 0
	local arg = table.pack(...)
	if( arg.n > 0 ) then
		for i = 1, arg.n do
			dwOption = dwOption + arg[i]
		end
	end

	tCombine[nIndex].dwCombineOption = dwOption
end

function SetCombineSuccessProb( dwSuccessProb )
	local nIndex = #( tCombine )

	tCombine[nIndex].dwSuccessProb = dwSuccessProb
end

function SetCombineInitializePenya( nInitializePenya )
	local nIndex = #( tCombine )

	tCombine[nIndex].nInitializePenya = nInitializePenya
end

--------------------------------------------------------------------
-- 카드합성 --------------------------------------------------------
--------------------------------------------------------------------

tCardCombine= {}

function AddCardCombine(dwItemIndex, dwSuccessProb)
	local nIndex = #( tCardCombine ) + 1

	tCardCombine[nIndex] = {}
	tCardCombine[nIndex].dwItemIndex = dwItemIndex
	tCardCombine[nIndex].dwSuccessProb = dwSuccessProb
end




--------------------------------------------------------------------
-- 얼터멋 변환 -----------------------------------------------------
--------------------------------------------------------------------

tUltimate = {}

function AddUltimateTrans( strItemKind1, strItemKind2, strItemKind3 )
	local nIndex = #( tUltimate ) + 1

	tUltimate[nIndex] = {}
	tUltimate[nIndex].strItemKind1 = strItemKind1
	tUltimate[nIndex].strItemKind2 = strItemKind2
	tUltimate[nIndex].strItemKind3 = strItemKind3
	tUltimate[nIndex].strMaterialItemKind1_1 = 0
	tUltimate[nIndex].strMaterialItemKind1_2 = 0
	tUltimate[nIndex].strMaterialItemKind1_3 = 0
	tUltimate[nIndex].strMaterialItemKind2_1 = 0
	tUltimate[nIndex].strMaterialItemKind2_2 = 0
	tUltimate[nIndex].strMaterialItemKind2_3 = 0
	tUltimate[nIndex].nInitializePenya = 0

end

function SetUltimateMaterial1( strMaterialItemKind1_1, strMaterialItemKind1_2, strMaterialItemKind1_3 )
	local nIndex 	= #( tUltimate )

	tUltimate[nIndex].strMaterialItemKind1_1 = strMaterialItemKind1_1
	tUltimate[nIndex].strMaterialItemKind1_2 = strMaterialItemKind1_2
	tUltimate[nIndex].strMaterialItemKind1_3 = strMaterialItemKind1_3
end

function SetUltimateMaterial2( strMaterialItemKind2_1, strMaterialItemKind2_2, strMaterialItemKind2_3 )
	local nIndex 	= #( tUltimate )

	tUltimate[nIndex].strMaterialItemKind2_1 = strMaterialItemKind2_1
	tUltimate[nIndex].strMaterialItemKind2_2 = strMaterialItemKind2_2
	tUltimate[nIndex].strMaterialItemKind2_3 = strMaterialItemKind2_3
end

function SetUltimatePenya( nInitializePenya )
	local nIndex = #( tUltimate )

	tUltimate[nIndex].nInitializePenya = nInitializePenya
end
 
Back
Top