View Single Post
  #9  
Old 02-08-2017, 09:17 PM
ZombieSoul's Avatar
ZombieSoul
Sarnak
 
Join Date: Jan 2017
Posts: 31
Default

I have finally got around to building a fix for this, had some fun attempting to build 64 bit and gave up. I traced through the code and came up with this:

client_packet.cpp/line 12216 after comments were added(added tmpmer_used conditional)
Code:
	int16 freeslotid = INVALID_INDEX;
	int16 charges = 0;
	//Items sold by vendors that have MaxCharges > 1 should be set to MaxCharges
	//They should never be selling partial charges unless it is from temporary table
	//mp-quantity was calculated above for stackables and temp table items
	if (item->Stackable || (tmpmer_used && item->MaxCharges > 1))
		charges = mp->quantity;
	else
		charges = item->MaxCharges;

	EQEmu::ItemInstance* inst = database.CreateItem(item, charges);
It seems to work but may need more testing.
This is my first edit on the source, but so far it seems to be working for charged items that merchants provide, If I run into issues with it I'll update this post.

Any input is welcome of course and thanks for your time and work.

Last edited by ZombieSoul; 02-08-2017 at 09:21 PM.. Reason: formatting etc and more info
Reply With Quote