Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-12-2016, 02:24 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I don't know lua or the modules themselves that well...

Code:
function items.check_turn_in(trade, trade_check)
	--create trade_return table == trade
	--shallow copy
	local trade_return = {};
	for key, value in pairs(trade) do
		trade_return[key] = value;
	end
	
	--for every item in trade_check check trade_return
		--if item exists in trade_return then 
			--remove that item from trade_return
		--else
			--failure
	for i = 1, 4 do
		local key = "item" .. i;
		if(trade_check[key] ~= nil and trade_check[key] ~= 0) then
			local found = false;
			for j = 1, 4 do
				local inst = trade_return["item" .. j];			
				if(inst.valid and trade_check[key] == inst:GetID()) then
***				->	trade_return["item" .. j] = ItemInst();
					found = true;
					break;
				end
			end
			
			if(not found) then
				return false;
			end
		end
	end
...
end

There is a 'default' constructor declared for ItemInst in lua: https://github.com/EQEmu/Server/blob...minst.cpp#L269

..but, there doesn't appear to be a definition: https://github.com/EQEmu/Server/blob...eminst.cpp#L11


That said, the marked line should probably be:
Code:
trade_return["item" .. j] = ItemInst(inst:GetID());
..or..
Code:
trade_return["item" .. j] = inst;

I honestly just don't know since I don't code these scripts...
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:50 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3