Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 


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:34 AM.


 

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