Archived
1

Archive pokememes

This commit is contained in:
2018-02-17 19:47:22 +04:00
parent 3a5411f814
commit be9b2d72f1
6 changed files with 52 additions and 1 deletions

View File

@@ -64,6 +64,16 @@ func (dc *DataCache) AddProfile(profile *dbmapping.Profile) (int, error) {
dc.currentProfilesMutex.Lock()
dc.profiles[insertedProfile.ID] = &insertedProfile
dc.currentProfiles[insertedProfile.PlayerID] = &insertedProfile
dc.squadsMutex.Lock()
for i := range dc.squadPlayers {
for j := range dc.squadPlayers[i] {
if dc.squadPlayers[i][j].Player.ID == insertedProfile.PlayerID {
dc.squadPlayers[i][j].Profile = insertedProfile
}
}
}
dc.squadsMutex.Unlock()
dc.currentProfilesMutex.Unlock()
dc.profilesMutex.Unlock()