View Single Post
  #12  
Old 01-16-2009, 01:21 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

This fixes the Wee Harvester from poofing when the last charge is used:
Inventory.cpp find method: void Client::DeleteItemInInventory(sint16 slot_id, sint8 quantity, bool client_update) then find:
Code:
	if(m_inv[slot_id]->GetItem()->Click.Type == ET_EquipClick) {
and replace with:
Code:
	if((m_inv[slot_id]->GetItem()->Click.Type == ET_EquipClick) || (m_inv[slot_id]->IsWeapon())) {

and this fixes the items that are getting recharged when looting from your corpse:
PlayerCorpse.cpp find method: void Corpse::LootItem(Client* client, const EQApplicationPacket* app) then find:
Code:
		if(inst->IsStackable()) {
			if(item_data) 
				//Restore charges from the original item.
				inst->SetCharges(item_data->charges);
			else
				inst->SetCharges(1);
		} else {
			//default changes
			if(item->MaxCharges == -1)
				inst->SetCharges(1);
			else
				inst->SetCharges(item->MaxCharges);
		}
and replace with:
Code:
		if(inst->IsStackable()) {
			if(item_data) 
				//Restore charges from the original item.
				inst->SetCharges(item_data->charges);
			else
				inst->SetCharges(1);
		} else {
			//default changes
			if(item->MaxCharges == -1)
				inst->SetCharges(1);
			else {
				if(item_data) {
					//Restore charges from the original item.
					inst->SetCharges(item_data->charges);
				}
				else {
					inst->SetCharges(item->MaxCharges);
				}
			}
		}
Reply With Quote