mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Monsterplant achievements & Name
This commit is contained in:
parent
0f3ca7807e
commit
cee67918d9
@ -333,7 +333,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
||||
if (seedBase != null) {
|
||||
HabboItem seed;
|
||||
if (ownerOne != null) {
|
||||
AchievementManager.progressAchievement(ownerOne, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 5);
|
||||
AchievementManager.progressAchievement(ownerOne, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 1);
|
||||
seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerOne.getHabboInfo().getId(), seedBase, 0, 0, "");
|
||||
ownerOne.getInventory().getItemsComponent().addItem(seed);
|
||||
ownerOne.getClient().sendResponse(new UnseenItemsComposer(seed));
|
||||
@ -341,7 +341,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
||||
}
|
||||
|
||||
if (ownerTwo != null) {
|
||||
AchievementManager.progressAchievement(ownerTwo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 5);
|
||||
AchievementManager.progressAchievement(ownerTwo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantBreeder"), 1);
|
||||
seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerTwo.getHabboInfo().getId(), seedBase, 0, 0, "");
|
||||
ownerTwo.getInventory().getItemsComponent().addItem(seed);
|
||||
ownerTwo.getClient().sendResponse(new UnseenItemsComposer(seed));
|
||||
@ -381,7 +381,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
||||
@Override
|
||||
public synchronized void scratched(Habbo habbo) {
|
||||
if (this.mayScratch()) {
|
||||
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantTreater"), 5);
|
||||
AchievementManager.progressAchievement(habbo, Emulator.getGameEnvironment().getAchievementManager().getAchievement("MonsterPlantTreater"), 1);
|
||||
this.setDeathTimestamp(Emulator.getIntUnixTimestamp() + MonsterplantPet.TIME_TO_LIVE);
|
||||
this.addHappiness(10);
|
||||
this.addExperience(10);
|
||||
|
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.users.HabboInfo;
|
||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.ChangeUserNameResultMessageEvent;
|
||||
import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.UserNameChangedMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.CheckUserNameResultMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
|
||||
@ -35,6 +36,7 @@ public class ChangeUserNameEvent extends MessageHandler {
|
||||
this.client.sendResponse(new ChangeUserNameResultMessageEvent(this.client.getHabbo()));
|
||||
this.client.sendResponse(new UserNameChangedMessageComposer(this.client.getHabbo()).compose());
|
||||
this.client.sendResponse(new UserObjectComposer(this.client.getHabbo()));
|
||||
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("Name"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -89,5 +91,6 @@ public class ChangeUserNameEvent extends MessageHandler {
|
||||
this.client.sendResponse(new CheckUserNameResultMessageComposer(CheckUserNameResultMessageComposer.TAKEN_WITH_SUGGESTIONS, name, new ArrayList<>()));
|
||||
}
|
||||
}
|
||||
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("Name"));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user