Merge branch 'pet-stat-save-fix' into 'dev'

Pet stats save fix

See merge request morningstar/Arcturus-Community!351
This commit is contained in:
Harmonic 2020-12-28 15:34:11 -05:00
commit e5a98d0330
2 changed files with 5 additions and 0 deletions

View File

@ -578,6 +578,7 @@ public class Pet implements ISerialize, Runnable {
this.addHappyness(10);
this.addExperience(10);
this.addRespect();
this.needsUpdate = true;
if (habbo != null) {
habbo.getHabboStats().petRespectPointsToGive--;

View File

@ -1,5 +1,6 @@
package com.eu.habbo.messages.incoming.rooms.pets;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.pets.MonsterplantPet;
import com.eu.habbo.habbohotel.pets.Pet;
import com.eu.habbo.messages.incoming.MessageHandler;
@ -22,6 +23,9 @@ public class ScratchPetEvent extends MessageHandler {
if (this.client.getHabbo().getHabboStats().petRespectPointsToGive > 0 || pet instanceof MonsterplantPet) {
pet.scratched(this.client.getHabbo());
// Update the stats to the database.
Emulator.getThreading().run(pet);
}
}
}