mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Merge branch 'dev' of https://git.krews.org/morningstar/Arcturus-Community into dev
This commit is contained in:
commit
b198d731c5
@ -144,14 +144,31 @@ public class InteractionWater extends InteractionDefault {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWalk(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||||
|
super.onWalkOn(roomUnit, room, objects);
|
||||||
|
|
||||||
Pet pet = room.getPet(roomUnit);
|
Pet pet = room.getPet(roomUnit);
|
||||||
|
|
||||||
if (pet != null) {
|
if(pet == null)
|
||||||
pet.getRoomUnit().setStatus(RoomUnitStatus.DIP, "0");
|
return;
|
||||||
|
|
||||||
|
if (!pet.getRoomUnit().hasStatus(RoomUnitStatus.SWIM)) {
|
||||||
|
pet.getRoomUnit().setStatus(RoomUnitStatus.SWIM, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
|
||||||
|
super.onWalkOff(roomUnit, room, objects);
|
||||||
|
|
||||||
|
Pet pet = room.getPet(roomUnit);
|
||||||
|
|
||||||
|
if(pet == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pet.getRoomUnit().removeStatus(RoomUnitStatus.SWIM);
|
||||||
|
}
|
||||||
|
|
||||||
private void recalculate(Room room) {
|
private void recalculate(Room room) {
|
||||||
THashMap<Short, TIntArrayList> tiles = new THashMap<>();
|
THashMap<Short, TIntArrayList> tiles = new THashMap<>();
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ public class Pet implements ISerialize, Runnable {
|
|||||||
this.level++;
|
this.level++;
|
||||||
this.say(this.petData.randomVocal(PetVocalsType.LEVEL_UP));
|
this.say(this.petData.randomVocal(PetVocalsType.LEVEL_UP));
|
||||||
this.addHappyness(100);
|
this.addHappyness(100);
|
||||||
this.roomUnit.setStatus(RoomUnitStatus.GESTURE, "exp");
|
this.roomUnit.setStatus(RoomUnitStatus.GESTURE, PetGestures.LVLUP.getKey());
|
||||||
this.gestureTickTimeout = Emulator.getIntUnixTimestamp();
|
this.gestureTickTimeout = Emulator.getIntUnixTimestamp();
|
||||||
AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(this.userId), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLevelUp"));
|
AchievementManager.progressAchievement(Emulator.getGameEnvironment().getHabboManager().getHabbo(this.userId), Emulator.getGameEnvironment().getAchievementManager().getAchievement("PetLevelUp"));
|
||||||
this.room.sendComposer(new PetLevelUpdatedComposer(this).compose());
|
this.room.sendComposer(new PetLevelUpdatedComposer(this).compose());
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
package com.eu.habbo.habbohotel.pets.actions;
|
package com.eu.habbo.habbohotel.pets.actions;
|
||||||
|
|
||||||
|
import com.eu.habbo.habbohotel.items.interactions.InteractionPushable;
|
||||||
import com.eu.habbo.habbohotel.pets.Pet;
|
import com.eu.habbo.habbohotel.pets.Pet;
|
||||||
import com.eu.habbo.habbohotel.pets.PetAction;
|
import com.eu.habbo.habbohotel.pets.PetAction;
|
||||||
import com.eu.habbo.habbohotel.pets.PetVocalsType;
|
import com.eu.habbo.habbohotel.pets.PetVocalsType;
|
||||||
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
|
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||||
|
|
||||||
public class ActionPlayFootball extends PetAction {
|
public class ActionPlayFootball extends PetAction {
|
||||||
public ActionPlayFootball() {
|
public ActionPlayFootball() {
|
||||||
@ -12,6 +15,25 @@ public class ActionPlayFootball extends PetAction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
public boolean apply(Pet pet, Habbo habbo, String[] data) {
|
||||||
|
|
||||||
|
Room room = pet.getRoom();
|
||||||
|
|
||||||
|
if(room == null || room.getLayout() == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
HabboItem foundBall = null;
|
||||||
|
|
||||||
|
for(HabboItem item : room.getFloorItems()) {
|
||||||
|
if(item instanceof InteractionPushable) {
|
||||||
|
foundBall = item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(foundBall == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
pet.getRoomUnit().setGoalLocation(room.getLayout().getTile(foundBall.getX(), foundBall.getY()));
|
||||||
|
|
||||||
if (pet.getHappyness() > 75)
|
if (pet.getHappyness() > 75)
|
||||||
pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));
|
pet.say(pet.getPetData().randomVocal(PetVocalsType.PLAYFUL));
|
||||||
else
|
else
|
||||||
|
@ -2,8 +2,15 @@ package com.eu.habbo.habbohotel.rooms;
|
|||||||
|
|
||||||
public enum RoomUnitStatus {
|
public enum RoomUnitStatus {
|
||||||
MOVE("mv", true),
|
MOVE("mv", true),
|
||||||
|
|
||||||
|
SIT_IN("sit-in"),
|
||||||
SIT("sit", true),
|
SIT("sit", true),
|
||||||
|
SIT_OUT("sit-out"),
|
||||||
|
|
||||||
|
LAY_IN("lay-in"),
|
||||||
LAY("lay", true),
|
LAY("lay", true),
|
||||||
|
LAY_OUT("lay-out"),
|
||||||
|
|
||||||
FLAT_CONTROL("flatctrl"),
|
FLAT_CONTROL("flatctrl"),
|
||||||
SIGN("sign"),
|
SIGN("sign"),
|
||||||
GESTURE("gst"),
|
GESTURE("gst"),
|
||||||
@ -11,11 +18,25 @@ public enum RoomUnitStatus {
|
|||||||
TRADING("trd"),
|
TRADING("trd"),
|
||||||
|
|
||||||
DIP("dip"),
|
DIP("dip"),
|
||||||
|
|
||||||
|
EAT_IN("eat-in"),
|
||||||
EAT("eat"),
|
EAT("eat"),
|
||||||
|
EAT_OUT("eat-out"),
|
||||||
|
|
||||||
BEG("beg", true),
|
BEG("beg", true),
|
||||||
|
|
||||||
|
DEAD_IN("ded-in"),
|
||||||
DEAD("ded", true),
|
DEAD("ded", true),
|
||||||
|
DEAD_OUT("ded-out"),
|
||||||
|
|
||||||
|
JUMP_IN("jmp-in"),
|
||||||
JUMP("jmp", true),
|
JUMP("jmp", true),
|
||||||
|
JUMP_OUT("jmp-out"),
|
||||||
|
|
||||||
|
PLAY_IN("pla-in"),
|
||||||
PLAY("pla", true),
|
PLAY("pla", true),
|
||||||
|
PLAY_OUT("pla-out"),
|
||||||
|
|
||||||
SPEAK("spk"),
|
SPEAK("spk"),
|
||||||
CROAK("crk"),
|
CROAK("crk"),
|
||||||
RELAX("rlx"),
|
RELAX("rlx"),
|
||||||
@ -30,12 +51,20 @@ public enum RoomUnitStatus {
|
|||||||
GROW_5("grw5"),
|
GROW_5("grw5"),
|
||||||
GROW_6("grw6"),
|
GROW_6("grw6"),
|
||||||
GROW_7("grw7"),
|
GROW_7("grw7"),
|
||||||
LAY_IN("lay-in"),
|
|
||||||
LAY_OUT("lay-out"),
|
|
||||||
KICK("kck"),
|
KICK("kck"),
|
||||||
WAG_TAIL("wag"),
|
WAG_TAIL("wag"),
|
||||||
JUMP_IN("jmp-in"),
|
DANCE("dan"),
|
||||||
JUMP_OUT("jmp-out");
|
AMS("ams"),
|
||||||
|
SWIM("swm"),
|
||||||
|
TURN("trn"),
|
||||||
|
|
||||||
|
SRP("srp"),
|
||||||
|
SRP_IN("srp-in"),
|
||||||
|
|
||||||
|
SLEEP_IN("slp-in"),
|
||||||
|
SLEEP("slp", true),
|
||||||
|
SLEEP_OUT("slp-out");
|
||||||
|
|
||||||
public final String key;
|
public final String key;
|
||||||
public final boolean removeWhenWalking;
|
public final boolean removeWhenWalking;
|
||||||
|
Loading…
Reference in New Issue
Block a user