Jump to content

[Cleanup][7944] Replace 10 by MAX_UNIT_ACTION_BAR_INDEX in packet size


Recommended Posts

Posted

http://getmangos.eu/community/viewtopic.php?id=8168

Replace 10 by MAX_UNIT_ACTION_BAR_INDEX in packet size of SMSG_PET_SPELLS

@@ -17383,7 +17383,7 @@ void Player::PetSpellInitialize()

    CharmInfo *charmInfo = pet->GetCharmInfo();

-    WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
+    WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1);
    data << uint64(pet->GetGUID());
    data << uint32(pet->GetCreatureInfo()->family);         // creature family (required for pet talents)
    data << uint32(0);
@@ -17457,7 +17457,7 @@ void Player::PossessSpellInitialize()
        return;
    }

-    WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
+    WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1);
    data << uint64(charm->GetGUID());
    data << uint32(0);
    data << uint32(0);
@@ -17501,7 +17501,7 @@ void Player::CharmSpellInitialize()
        }
    }

-    WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+4*addlist+1);
+    WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+4*addlist+1);
    data << uint64(charm->GetGUID());
    data << uint32(0);
    data << uint32(0);
@@ -20324,7 +20324,7 @@ void Player::EnterVehicle(Vehicle *vehicle)
    data << uint32(0);                                      // fall time
    GetSession()->SendPacket(&data);

-    data.Initialize(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
+    data.Initialize(SMSG_PET_SPELLS, 8+4+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1);
    data << uint64(vehicle->GetGUID());
    data << uint32(0);
    data << uint32(0);

  • 39 years later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use