mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Some coding style fixes.
This commit is contained in:
parent
2f15546120
commit
ec4928008c
4 changed files with 41 additions and 45 deletions
|
|
@ -1002,8 +1002,8 @@ struct ItemLimitCategoryEntry
|
|||
uint32 ID; // 0 Id
|
||||
//char* name[16] // 1-16 m_name_lang
|
||||
// 17 name flags
|
||||
uint32 maxCount; // max allowed equipped as item or in gem slot
|
||||
//uint32 unk; // 1 for prismatic gems only...
|
||||
uint32 maxCount; // 18, max allowed equipped as item or in gem slot
|
||||
//uint32 unk; // 19, 1 for gems only...
|
||||
};
|
||||
|
||||
struct ItemRandomPropertiesEntry
|
||||
|
|
|
|||
|
|
@ -1008,7 +1008,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
|
|||
return;
|
||||
}
|
||||
else
|
||||
sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item)", itemid);
|
||||
sLog.outErrorDb("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item)", itemid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ void Object::_Create( uint32 guidlow, uint32 entry, HighGuid guidhigh )
|
|||
{
|
||||
if(!m_uint32Values) _InitValues();
|
||||
|
||||
uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh); // required more changes to make it working
|
||||
uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh);
|
||||
SetUInt64Value( OBJECT_FIELD_GUID, guid );
|
||||
SetUInt32Value( OBJECT_FIELD_TYPE, m_objectType );
|
||||
m_PackGUID.clear();
|
||||
|
|
@ -137,16 +137,14 @@ void Object::BuildMovementUpdateBlock(UpdateData * data, uint32 flags ) const
|
|||
void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
|
||||
{
|
||||
if(!target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 updatetype = UPDATETYPE_CREATE_OBJECT;
|
||||
uint16 flags = m_updateFlag;
|
||||
uint32 flags2 = 0;
|
||||
|
||||
/** lower flag1 **/
|
||||
if(target == this) // building packet for oneself
|
||||
if(target == this) // building packet for yourself
|
||||
flags |= UPDATEFLAG_SELF;
|
||||
|
||||
if(flags & UPDATEFLAG_HAS_POSITION)
|
||||
|
|
@ -189,7 +187,7 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
|
|||
|
||||
ByteBuffer buf(50);
|
||||
buf << (uint8)updatetype;
|
||||
buf.append(GetPackGUID()); //client crashes when using this
|
||||
buf.append(GetPackGUID());
|
||||
buf << (uint8)m_objectTypeId;
|
||||
|
||||
_BuildMovementUpdate(&buf, flags, flags2);
|
||||
|
|
@ -220,8 +218,6 @@ void Object::SendUpdateToPlayer(Player* player)
|
|||
BuildCreateUpdateBlockForPlayer(&upd, player);
|
||||
upd.BuildPacket(&packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
|
||||
// now object updated/(create updated)
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const
|
||||
|
|
@ -229,7 +225,7 @@ void Object::BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) c
|
|||
ByteBuffer buf(50);
|
||||
|
||||
buf << (uint8) UPDATETYPE_VALUES;
|
||||
buf.append(GetPackGUID()); //client crashes when using this. but not have crash in debug mode
|
||||
buf.append(GetPackGUID());
|
||||
|
||||
UpdateMask updateMask;
|
||||
updateMask.SetCount( m_valuesCount );
|
||||
|
|
@ -685,7 +681,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||
*data << uint32(1);
|
||||
break;
|
||||
default:
|
||||
*data << uint32(0); // unknown. not happen.
|
||||
*data << uint32(0); // unknown, not happen.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,22 +181,22 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
|
|||
data << uint8(0) << uint8(0) << uint8(0); // name2, name3, name4, always empty
|
||||
data << SubName;
|
||||
data << ci->IconName; // "Directions" for guard, string for Icons 2.3.0
|
||||
data << uint32(ci->type_flags); // flags wdbFeild7=wad flags1
|
||||
data << uint32(ci->type);
|
||||
data << uint32(ci->family); // family wdbFeild9
|
||||
data << uint32(ci->rank); // rank wdbFeild10
|
||||
data << uint32(ci->PetSpellDataId); // Id from CreatureSpellData.dbc wdbField12
|
||||
data << uint32(ci->type_flags); // flags
|
||||
data << uint32(ci->type); // CreatureType.dbc
|
||||
data << uint32(ci->family); // CreatureFamily.dbc
|
||||
data << uint32(ci->rank); // Creature Rank (elite, boss, etc)
|
||||
data << uint32(0); // new in 3.1, creature entry?
|
||||
data << uint32(0); // new in 3.1, creature entry?
|
||||
data << uint32(ci->DisplayID_A); // modelid_male1
|
||||
data << uint32(ci->DisplayID_H); // modelid_female1 ?
|
||||
data << uint32(ci->DisplayID_A2); // modelid_male2 ?
|
||||
data << uint32(ci->DisplayID_H2); // modelid_femmale2 ?
|
||||
data << uint32(0); // new in 3.1
|
||||
data << float(ci->unk16); // unk
|
||||
data << float(ci->unk17); // unk
|
||||
data << uint8(ci->RacialLeader);
|
||||
for(uint32 i = 0; i < 4; ++i)
|
||||
data << uint32(0); // added in 3.1
|
||||
data << uint32(0); // added in 3.1
|
||||
data << uint32(0); // itemId[4], quest drop
|
||||
data << uint32(0); // CreatureMovementInfo.dbc
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
|
||||
}
|
||||
|
|
@ -259,9 +259,9 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
|||
data.append(info->raw.data, 24);
|
||||
data << float(info->size); // go size
|
||||
for(uint32 i = 0; i < 4; ++i)
|
||||
data << uint32(0); // added in 3.1
|
||||
data << uint32(0); // itemId[4], quest drop
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent CMSG_GAMEOBJECT_QUERY " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -274,7 +274,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
|||
WorldPacket data ( SMSG_GAMEOBJECT_QUERY_RESPONSE, 4 );
|
||||
data << uint32(entryID | 0x80000000);
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent CMSG_GAMEOBJECT_QUERY " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue