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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 07-14-2012, 09:52 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Can anyone give me pointers on this? I want to send a 'Fake Item' to the client at a specific slot number, but the best I've suceeded in doing is
crashing zone...

(I've already updated command.h and the command_init portions.)

Code:
void command_zitemtest(Client *c, const Seperator *sep)
{
	if (!sep->argnum==2)
		c->Message(0, "Usage: #zitemtest [slot id] [item id]");
	else if (!sep->IsNumber(1) && !sep->IsNumber(2))
			c->Message(0, "Usage: #zitemtest [slot id] [item id]");
	else {
		sint16 slotid = atoi(sep->arg[1]);
		int32 itemid = atoi(sep->arg[2]);
		
		ItemInst* FakeItem;

		FakeItem->SetItem(database.GetItem(itemid));
		
		if (!FakeItem) {
			c->Message(0, "Error: Item [%u] is not a valid item number.", itemid);
			return;
		}
				
		if (database.GetItemStatus(itemid) > c->Admin()) {
			c->Message(13, "Error: Insufficient status to summon this item.");
			return;
		}

		FakeItem->SetCharges(1);
		c->SendItemPacket(slotid, FakeItem, ItemPacketTrade);
		}
}
I know it's my lack of understanding of item and packet structures, but I can't seem to find a similar method to follow.

I just basically want to send the client an item packet for the specified slot, without the server being updated, so I can watch client behavior.


Thanks!
__________________
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:51 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