Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #31  
Old 09-29-2009, 02:17 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

I'll actually code this just so we can get this working, instead of arguing it pointlessly :P
Reply With Quote
  #32  
Old 09-29-2009, 03:02 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

He's right, here's some very simple code demonstrating the concept:

Code:
void command_optest(Client *c, const Seperator *sep)
{
	if(sep->IsNumber(1))
	{
		switch(atoi(sep->arg[1]))
		{
			case 1:
				{
					const ItemInst* inst = c->GetInv().GetItem(29);
					if(inst)
					{
						uint32 slot_id = atoi(sep->arg[2]);
						if(slot_id >= 400 && slot_id <= 404)
						{
							c->SendItemPacket(slot_id, inst, ItemPacketTributeItem);
						}
					}
				}
				break;
			default:
			{		
				break;
			}
		}
	}
}
Makes the client gain the stats of the item in your lower right inventory slot without equiping it. It's somewhat complicated in terms of a client hack but in theory yes it could certainly work.
Reply With Quote
  #33  
Old 09-29-2009, 05:08 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Awesome! I forgot about tribute being invisible item slots. That should work perfectly, and as far as hacks go, at least that would be a fairly clean one as far as the client is concerned.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #34  
Old 09-29-2009, 11:23 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

this not gonna screw up the actual tribute in anyway? Not that I care much for tribute, but I am just curious.
Also - since this is a fix for SoF - will people running T be adversely affected?
Since post 75 T client shows hp correctly already.
Reply With Quote
  #35  
Old 09-29-2009, 01:47 PM
Davood
Discordant
 
Join Date: Jan 2005
Posts: 488
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
this not gonna screw up the actual tribute in anyway? Not that I care much for tribute, but I am just curious.
Also - since this is a fix for SoF - will people running T be adversely affected?
Since post 75 T client shows hp correctly already.
Well in the sever handshake; the server knows if the client is running titanium or SoF; therefore you can run the extra code just for the SoF clients.
__________________
----------
Demon Overlord of Alakamin
skype @ davoodinator
Reply With Quote
  #36  
Old 09-29-2009, 05:21 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

That or you can not be lazy and I don't know account for the tribute in there too. That's what I meant by somewhat complicated.
Reply With Quote
  #37  
Old 10-19-2009, 11:20 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

I hacked up the tribute code and came up with this.

tribute.cpp, replaced the entire function

Code:
void Client::DoTributeUpdate() {
	
	const Item_Struct* myitem = database.GetItem(1001);
	Item_Struct* item = (Item_Struct*) malloc(sizeof(Item_Struct));
	memcpy(item, myitem, sizeof(Item_Struct));

	if(GetLevel() >= 76 && this->GetClientVersion() == EQClientSoF)
	{
		item->HP += (CalcBaseHP() - 5);
		item->Mana += (CalcMaxMana() - 5);
		item->Endur += (this->max_end - 5);
	}


	const Item_Struct* item2 = item;
	ItemInst* myinst = database.CreateBaseItem(item2);
	SendFakeItem(400, myinst, ItemPacketTributeItem);
			return;
			
}
inventory.cpp, new function

Code:
void Client::SendFakeItem(sint16 slot_id, ItemInst* inst, ItemPacketType packet_type)
{

	if (!inst) 
		return;
	
	// Serialize item into |-delimited string
	string packet = inst->Serialize(slot_id);
	
	EmuOpcode opcode = OP_Unknown;
	EQApplicationPacket* outapp = NULL;
	ItemPacket_Struct* itempacket = NULL;
	
	// Construct packet
	opcode = (packet_type==ItemPacketViewLink) ? OP_ItemLinkResponse : OP_ItemPacket;
	outapp = new EQApplicationPacket(opcode, packet.length()+sizeof(ItemPacket_Struct));
	itempacket = (ItemPacket_Struct*)outapp->pBuffer;
	memcpy(itempacket->SerializedItem, packet.c_str(), packet.length());
	itempacket->PacketType = packet_type;
	
#if EQDEBUG >= 9
		DumpPacket(outapp);
#endif
	//DumpPacket(outapp);
	FastQueuePacket(&outapp);

}
and the corresponding header function in Client.h

Code:
void	SendFakeItem(sint16 slot_id, ItemInst* inst, ItemPacketType packet_type);
and lastly, make it so every time a player gains a level that it recalculates tributes & sends a new item, effectively granting the player a new stat, exp.cpp:

Code:
		DoTributeUpdate();
near

Code:
 CalcBonuses();
        if(!RuleB(Character, HealOnLevel))
        {
                int mhp = CalcMaxHP();
                if(GetHP() > mhp)
                        SetHP(mhp);
        }
        else
        {
                SetHP(CalcMaxHP());             // Why not, lets give them a free heal
        }
		DoTributeUpdate();
        SendHPUpdate();
        SetMana(CalcMaxMana());
        UpdateWho();
        Save();
that should do it. most of the hard work is done.

Also, I would change 1001 to a blank item, or use a non-used ID like 10 for the item. That will resolve adding AC to the client.

Other than that, it works.
Reply With Quote
  #38  
Old 10-19-2009, 11:26 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by Secrets View Post
and lastly, make it so every time a player gains a level that it recalculates tributes & sends a new item, effectively granting the player a new stat, exp.cpp:
I would actually add it into CalcBonuses(); near the end, since that's the most logical place for it, seeing as it needs to be updated every time your hp/mana/end is changed, now that I think about it :p
Reply With Quote
  #39  
Old 10-19-2009, 11:42 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

As per KLS' suggestion, I should use new instead of malloc(), so I am going to. I should also free memory :P

Code:
void Client::DoTributeUpdate() {
	
	const Item_Struct* myitem = database.GetItem(1001);
	Item_Struct* item = new Item_Struct;
	memcpy(item, myitem, sizeof(Item_Struct));

	if(GetLevel() >= 76 && this->GetClientVersion() == EQClientSoF)
	{
		item->HP += (CalcBaseHP() - 5);
		item->Mana += (CalcMaxMana() - 5);
		item->Endur += (this->max_end - 5);
	}


	const Item_Struct* item2 = item;
	ItemInst* myinst = database.CreateBaseItem(item2);
	SendFakeItem(400, myinst, ItemPacketTributeItem);
	delete item;
        delete myinst;
	return;
			
}

Last edited by Secrets; 10-19-2009 at 11:47 PM.. Reason: forgot myinst cleanup
Reply With Quote
  #40  
Old 10-20-2009, 02:57 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I'm pretty sure this kills some tribute functionality which isn't acceptable but based on what's here we can rewrite this to be more consistent with our codebase:

Code:
void Client::DoTributeUpdate() 
{
	const Item_Struct* myitem = database.GetItem(1001);
	Item_Struct* item = new Item_Struct(*myitem);

	if(GetLevel() >= 76 && this->GetClientVersion() == EQClientSoF)
	{
		item->HP += (CalcBaseHP() - 5);
		item->Mana += (CalcMaxMana() - 5);
		item->Endur += (this->max_end - 5);
	}

	ItemInst* myinst = database.CreateBaseItem((const Item_Struct*)item);
	SendItemPacket(400, myinst, ItemPacketTributeItem);
	safe_delete(item);
        safe_delete(myinst);
}
And there isn't a point in making a SendFakeItem() when it copies SendItemPacket word for word. All that said I think it's an acceptable proof of concept and I think we can put it into action. =p
Reply With Quote
  #41  
Old 06-27-2010, 03:43 AM
Midgett
Fire Beetle
 
Join Date: May 2009
Location: AL
Posts: 29
Default SoF Bugs

I know much of the attention has turned toward SoD atm. I just wanted to throw this out there since they are bugs. I am using SoF, of course.

I am currently using peqdb_rev1549 and EQEmu_rev1552. I noticed when I cast any spell, the casting time doesn't complete before the spell lands.
I noticed that using Titanium also. This is something new that hasn't happen before.

If I drop an illusion, or an illusion wears off, the facial features do not show correctly (the hair). It does show correctly when I zone.
In titanium, it shows correctly. Seems like an appearance bug (#race 0) exclusive to SoF.
Reply With Quote
  #42  
Old 06-27-2010, 06:33 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Not new on Titanium as far as I can remember. Do you have any spell time reduction items or AAs? I think that's when I started noticing the short casting time.
Reply With Quote
  #43  
Old 06-27-2010, 09:27 PM
Midgett
Fire Beetle
 
Join Date: May 2009
Location: AL
Posts: 29
Default

Quote:
Not new on Titanium as far as I can remember. Do you have any spell time reduction items or AAs? I think that's when I started noticing the short casting time.
I started a new druid and #level him to 70. I then scribed beneficial spells to test. With no AAs and no gear, the casting bar empties before the spell lands. So I went through and only equiped one item at a time to see if I could track it down. With no AAs still, I tracked it down to 'Elegant Defiant Leather Boots'. It does have an effect that reduces casting time.

Usually when an AA or piece of gear reduces casting time, that usually means the casting bar starts at the new reduced time and empties out before the spell lands (ex. Egress and evac spells with AAs). That doesn't seem to be the case here. It's not finishing before the spell lands.

As for the appearance bug, no AA or piece of gear seems to have an effect.

I haven't played EQ since PoR expansion so things might have changed since the day. I am going by past memories; but then again, I didn't have gear that nice when I quit. :-P

Hope this helps!
Reply With Quote
  #44  
Old 06-27-2010, 11:45 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Midgett View Post
If I drop an illusion, or an illusion wears off, the facial features do not show correctly (the hair). It does show correctly when I zone.
In titanium, it shows correctly. Seems like an appearance bug (#race 0) exclusive to SoF.
As for the appearance issue from illusions on SoF; unfortunately, nothing can be done about that. The issue is that they must have been in the process of changing the illusion packet structure when they released the SoF retail disks, and some bugs were caused by their changes that weren't resolved until later. The main issue is that hair for any player race other than Humans only shows up as 1 default hair style instead of the style it is set to. Even when you remove an illusion or use #race 0, it sets your race back by sending another illusion packet, which is why the hair issue is still seen. This is a client issue/bug, and cannot be fixed. This is not an issue on the SoD client, so they must have fixed it sometime between SoF and SoD. Just one of the many reasons to upgrade from SoF to SoD, not to mention that SoD is much more stable than SoF and even Titanium.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #45  
Old 06-29-2010, 06:48 AM
Midgett
Fire Beetle
 
Join Date: May 2009
Location: AL
Posts: 29
Default

Quote:
As for the appearance issue from illusions on SoF; unfortunately, nothing can be done about that. The issue is that they must have been in the process of changing the illusion packet structure when they released the SoF retail disks, and some bugs were caused by their changes that weren't resolved until later. The main issue is that hair for any player race other than Humans only shows up as 1 default hair style instead of the style it is set to. Even when you remove an illusion or use #race 0, it sets your race back by sending another illusion packet, which is why the hair issue is still seen. This is a client issue/bug, and cannot be fixed. This is not an issue on the SoD client, so they must have fixed it sometime between SoF and SoD. Just one of the many reasons to upgrade from SoF to SoD, not to mention that SoD is much more stable than SoF and even Titanium.
Thx for taking a look at this Trevius. At least the illusion bug is confirmed.

Did that second bug description make any sense? Were you able to duplicate it?

As for SoD, I am reading great things about it on the forums. I paid $20 for my SoF disc set last summer at Game Stop, and already it's becoming obsolete --LOL!
But, that's a GREAT thing! That means the project has really been flying.
Reply With Quote
Reply


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 01:28 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3