Fix lack of mutex locking when serializing the player profile
This commit is contained in:
parent
a73c6386eb
commit
25f71b36be
@ -599,6 +599,7 @@ PacketStruct* PlayerInfo::serialize2(int16 version){
|
||||
packet->setDataByName("unknown20", 50, 75);
|
||||
*/
|
||||
//packet->setDataByName("rain2", -102.24);
|
||||
player->GetSpellEffectMutex()->readlock(__FUNCTION__, __LINE__);
|
||||
for(int i=0;i<45;i++){
|
||||
if(i < 30){
|
||||
packet->setSubstructDataByName("maintained_effects", "name", info_struct->maintained_effects[i].name, i, 0);
|
||||
@ -622,6 +623,7 @@ PacketStruct* PlayerInfo::serialize2(int16 version){
|
||||
packet->setSubstructDataByName("spell_effects", "icon", info_struct->spell_effects[i].icon, i, 0);
|
||||
packet->setSubstructDataByName("spell_effects", "icon_type", info_struct->spell_effects[i].icon_backdrop, i, 0);
|
||||
}
|
||||
player->GetSpellEffectMutex()->releasereadlock(__FUNCTION__, __LINE__);
|
||||
return packet;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user