示例#1
0
 public void TrophyUpdate(int trophyId, long addAmount, int sendUpdateInterval = 1)
 {
     if (!TrophyData.ContainsKey(trophyId))
     {
         TrophyData[trophyId] = new Trophy(trophyId);
     }
     TrophyData[trophyId].AddCounter(Session, addAmount);
     if (TrophyData[trophyId].Counter % sendUpdateInterval == 0)
     {
         Session.Send(TrophyPacket.WriteUpdate(TrophyData[trophyId]));
     }
 }
示例#2
0
 public void TrophyUpdate(int trophyId, long addAmount, int sendUpdateInterval = 1)
 {
     if (!TrophyData.ContainsKey(trophyId))
     {
         TrophyData[trophyId] = new Trophy(CharacterId, AccountId, trophyId);
     }
     TrophyData[trophyId].AddCounter(Session, addAmount);
     if (TrophyData[trophyId].Counter % sendUpdateInterval == 0)
     {
         DatabaseManager.Trophies.Update(TrophyData[trophyId]);
         Session.Send(TrophyPacket.WriteUpdate(TrophyData[trophyId]));
     }
 }