mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Merge branch 'ms4/dev' into 'ms4/dev'
Monsterplant achievements & Name See merge request morningstar/Arcturus-Community!55
This commit is contained in:
commit
6ae19bb6ac
@ -333,7 +333,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
|||||||
if (seedBase != null) {
|
if (seedBase != null) {
|
||||||
HabboItem seed;
|
HabboItem seed;
|
||||||
if (ownerOne != null) {
|
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, "");
|
seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerOne.getHabboInfo().getId(), seedBase, 0, 0, "");
|
||||||
ownerOne.getInventory().getItemsComponent().addItem(seed);
|
ownerOne.getInventory().getItemsComponent().addItem(seed);
|
||||||
ownerOne.getClient().sendResponse(new UnseenItemsComposer(seed));
|
ownerOne.getClient().sendResponse(new UnseenItemsComposer(seed));
|
||||||
@ -341,7 +341,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ownerTwo != null) {
|
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, "");
|
seed = Emulator.getGameEnvironment().getItemManager().createItem(ownerTwo.getHabboInfo().getId(), seedBase, 0, 0, "");
|
||||||
ownerTwo.getInventory().getItemsComponent().addItem(seed);
|
ownerTwo.getInventory().getItemsComponent().addItem(seed);
|
||||||
ownerTwo.getClient().sendResponse(new UnseenItemsComposer(seed));
|
ownerTwo.getClient().sendResponse(new UnseenItemsComposer(seed));
|
||||||
@ -381,7 +381,7 @@ public class MonsterplantPet extends Pet implements IPetLook {
|
|||||||
@Override
|
@Override
|
||||||
public synchronized void scratched(Habbo habbo) {
|
public synchronized void scratched(Habbo habbo) {
|
||||||
if (this.mayScratch()) {
|
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.setDeathTimestamp(Emulator.getIntUnixTimestamp() + MonsterplantPet.TIME_TO_LIVE);
|
||||||
this.addHappiness(10);
|
this.addHappiness(10);
|
||||||
this.addExperience(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.habbohotel.users.HabboManager;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.rooms.users.ChangeUserNameResultMessageEvent;
|
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.rooms.users.UserNameChangedMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.users.CheckUserNameResultMessageComposer;
|
import com.eu.habbo.messages.outgoing.users.CheckUserNameResultMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
|
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 ChangeUserNameResultMessageEvent(this.client.getHabbo()));
|
||||||
this.client.sendResponse(new UserNameChangedMessageComposer(this.client.getHabbo()).compose());
|
this.client.sendResponse(new UserNameChangedMessageComposer(this.client.getHabbo()).compose());
|
||||||
this.client.sendResponse(new UserObjectComposer(this.client.getHabbo()));
|
this.client.sendResponse(new UserObjectComposer(this.client.getHabbo()));
|
||||||
|
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("Name"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,5 +91,6 @@ public class ChangeUserNameEvent extends MessageHandler {
|
|||||||
this.client.sendResponse(new CheckUserNameResultMessageComposer(CheckUserNameResultMessageComposer.TAKEN_WITH_SUGGESTIONS, name, new ArrayList<>()));
|
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