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
  #3  
Old 03-31-2008, 08:50 PM
kedobin
Sarnak
 
Join Date: Oct 2004
Posts: 30
Default

I downloaded the source and did some searching. I mention this below, too, but it looks like size gets casted into an int as it's placed as a parameter into SendAppearancePacket().

Found it in mob.h
As taken from mob.cpp:
Code:
 1157 void Mob::ChangeSize(float in_size = 0, bool bNoRestriction) {
 1158 	//Neotokyo's Size Code
 1159 	if (!bNoRestriction)
 1160 	{
 1161 		if (this->IsClient() || this->petid != 0)
 1162 			if (in_size < 3.0)
 1163 				in_size = 3.0;
 1164 
 1165 
 1166 			if (this->IsClient() || this->petid != 0)
 1167 				if (in_size > 15.0)
 1168 					in_size = 15.0;
 1169 	}
 1170 
 1171 
 1172 	if (in_size < 1.0)
 1173 		in_size = 1.0;
 1174 
 1175 	if (in_size > 255.0)
 1176 		in_size = 255.0;
 1177 	//End of Neotokyo's Size Code
 1178 	this->size = in_size;
 1179 	SendAppearancePacket(AT_Size, (int32) in_size);
 1180 }
It looks like it's being casted as an int once it calls SendAppearancePacket.

This also exists in mob.h

Code:
 1117 void Mob::SendAppearancePacket(int32 type, int32 value, bool WholeZone, bool iIgnoreSelf, Client *specific_target) {
 1118 	if (!GetID())
 1119 		return;
 1120 	EQApplicationPacket* outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
 1121 	SpawnAppearance_Struct* appearance = (SpawnAppearance_Struct*)outapp->pBuffer;
 1122 	appearance->spawn_id = this->GetID();
 1123 	appearance->type = type;
 1124 	appearance->parameter = value;
 1125 	if (WholeZone)
 1126 		entity_list.QueueClients(this, outapp, iIgnoreSelf);
 1127 	else if(specific_target != NULL)
 1128 		specific_target->QueuePacket(outapp, false, Client::CLIENT_CONNECTED);
 1129 	else if (this->IsClient())
 1130 		this->CastToClient()->QueuePacket(outapp, false, Client::CLIENT_CONNECTED);
 1131 	safe_delete(outapp);
 1132 }
Following in_size, which turned into value, we go to appearance, which is a spawnappearance_struct, located in common\eq_packet_structs.h
Code:
  445 /*
  446 ** SpawnAppearance_Struct
  447 ** Changes client appearance for all other clients in zone
  448 ** Size: 8 bytes
  449 ** Used in: OP_SpawnAppearance
  450 **
  451 */
  452 struct SpawnAppearance_Struct
  453 {
  454 /*0000*/ uint16 spawn_id;          // ID of the spawn
  455 /*0002*/ uint16 type;              // Values associated with the type
  456 /*0004*/ uint32 parameter;         // Type of data sent
  457 /*0008*/
  458 };
Lastly, though it doesn't look like it would be involved, the mentioned OP_SpawnAppearance occurs in common\eq_opcodes.h, where it defines opcodes for zone.exe's login sequence.
Code:
#define LiveOP_SpawnAppearance	0x012F	// Sets spawnid/animation/equipment
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 12:57 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