mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7360] Use defines instead harcoded item prototype array sizes.
This commit is contained in:
parent
4994611582
commit
b9326100ea
9 changed files with 37 additions and 26 deletions
|
|
@ -355,7 +355,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
|
|||
}
|
||||
data << pProto->ScalingStatDistribution; // scaling stats distribution
|
||||
data << pProto->ScalingStatValue; // some kind of flags used to determine stat values column
|
||||
for(int i = 0; i < 5; ++i)
|
||||
for(int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
|
||||
{
|
||||
data << pProto->Damage[i].DamageMin;
|
||||
data << pProto->Damage[i].DamageMax;
|
||||
|
|
@ -375,7 +375,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
|
|||
data << pProto->AmmoType;
|
||||
data << pProto->RangedModRange;
|
||||
|
||||
for(int s = 0; s < 5; s++)
|
||||
for(int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
|
||||
{
|
||||
// send DBC data for cooldowns in same way as it used in Spell::SendSpellCooldown
|
||||
// use `item_template` or if not set then only use spell cooldowns
|
||||
|
|
@ -429,7 +429,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
|
|||
data << pProto->Map; // Added in 1.12.x & 2.0.1 client branch
|
||||
data << pProto->BagFamily;
|
||||
data << pProto->TotemCategory;
|
||||
for(int s = 0; s < 3; s++)
|
||||
for(int s = 0; s < MAX_ITEM_PROTO_SOCKETS; ++s)
|
||||
{
|
||||
data << pProto->Socket[s].Color;
|
||||
data << pProto->Socket[s].Content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue