Remove more extra and incorrect memsets

This commit is contained in:
Michael Cook (mackal) 2015-01-17 19:03:13 -05:00
parent fd77fbf163
commit 6e06110b75

View File

@ -1524,7 +1524,6 @@ void Mob::SendIllusionPacket(uint16 in_race, uint8 in_gender, uint8 in_texture,
}
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Illusion, sizeof(Illusion_Struct));
memset(outapp->pBuffer, 0, sizeof(outapp->pBuffer));
Illusion_Struct* is = (Illusion_Struct*) outapp->pBuffer;
is->spawnid = GetID();
strcpy(is->charname, GetCleanName());
@ -1890,7 +1889,6 @@ void Mob::SendTargetable(bool on, Client *specific_target) {
void Mob::QuestReward(Client *c, uint32 silver, uint32 gold, uint32 platinum) {
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Sound, sizeof(QuestReward_Struct));
memset(outapp->pBuffer, 0, sizeof(outapp->pBuffer));
QuestReward_Struct* qr = (QuestReward_Struct*) outapp->pBuffer;
qr->from_mob = GetID(); // Entity ID for the from mob name
@ -1910,7 +1908,6 @@ void Mob::CameraEffect(uint32 duration, uint32 intensity, Client *c, bool global
if(global == true)
{
ServerPacket* pack = new ServerPacket(ServerOP_CameraShake, sizeof(ServerCameraShake_Struct));
memset(pack->pBuffer, 0, sizeof(pack->pBuffer));
ServerCameraShake_Struct* scss = (ServerCameraShake_Struct*) pack->pBuffer;
scss->duration = duration;
scss->intensity = intensity;
@ -1920,7 +1917,6 @@ void Mob::CameraEffect(uint32 duration, uint32 intensity, Client *c, bool global
}
EQApplicationPacket* outapp = new EQApplicationPacket(OP_CameraEffect, sizeof(Camera_Struct));
memset(outapp->pBuffer, 0, sizeof(outapp->pBuffer));
Camera_Struct* cs = (Camera_Struct*) outapp->pBuffer;
cs->duration = duration; // Duration in milliseconds
cs->intensity = ((intensity * 6710886) + 1023410176); // Intensity ranges from 1023410176 to 1090519040, so simplify it from 0 to 10.
@ -1936,7 +1932,6 @@ void Mob::CameraEffect(uint32 duration, uint32 intensity, Client *c, bool global
void Mob::SendSpellEffect(uint32 effectid, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect, Client *c) {
EQApplicationPacket* outapp = new EQApplicationPacket(OP_SpellEffect, sizeof(SpellEffect_Struct));
memset(outapp->pBuffer, 0, sizeof(outapp->pBuffer));
SpellEffect_Struct* se = (SpellEffect_Struct*) outapp->pBuffer;
se->EffectID = effectid; // ID of the Particle Effect
se->EntityID = GetID();
@ -1988,7 +1983,6 @@ void Mob::TempName(const char *newname)
// Send the new name to all clients
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MobRename, sizeof(MobRename_Struct));
memset(outapp->pBuffer, 0, sizeof(outapp->pBuffer));
MobRename_Struct* mr = (MobRename_Struct*) outapp->pBuffer;
strn0cpy(mr->old_name, old_name, 64);
strn0cpy(mr->old_name_again, old_name, 64);