mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 09:25:06 +01:00
Teapot Implementations & Fixes (#2032)
* Add realm switching
Fix realm unlock items
* Implement exiting teapot
* Implement home level rewards
* Fix small issues
* Fix call issue
* Add 'seen unlock' packets
* Fix Sumeru Main House bricking accounts
This is only for the house, not the full realm
* Fixed realm 5
Main house needs to be placed manually for Sumeru realm (module 5) as the resources for defaults in Sumeru realm are missing. Sumeru main house cannot be exited from the door, issue due to the same missing res.
* Fix Grass main house bricking accounts
* Remove references
* Formatting change (web editor)
* Whitespace & Formatting
* Whitespace
* Make 'seen' status persistent
* Fix misnamed field
* Revert "Fix misnamed field"
This reverts commit 21ef404e14.
* Implement gaining trust (realm exp)
Add gaining trust by crafting
Add gaining trust via `/give`
Show trust in djinn menu
* Interior check for prevScene
* Correct positions & rotations
Return to front of main house when exiting from inside
* Update HandlerBackMyWorldReq.java
---------
Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>
Co-authored-by: GanyusLeftHorn <1244229+GanyusLeftHorn@users.noreply.github.com>
This commit is contained in:
@@ -97,6 +97,7 @@ public class Player {
|
||||
@Getter private int headImage;
|
||||
@Getter private int nameCardId = 210001;
|
||||
@Getter private Position position;
|
||||
@Getter @Setter private Position prevPos;
|
||||
@Getter private Position rotation;
|
||||
@Getter private PlayerBirthday birthday;
|
||||
@Getter private PlayerCodex codex;
|
||||
@@ -116,7 +117,9 @@ public class Player {
|
||||
@Getter private Set<Integer> flyCloakList;
|
||||
@Getter private Set<Integer> costumeList;
|
||||
@Getter @Setter private Set<Integer> rewardedLevels;
|
||||
@Getter @Setter private Set<Integer> homeRewardedLevels;
|
||||
@Getter @Setter private Set<Integer> realmList;
|
||||
@Getter @Setter private Set<Integer> seenRealmList;
|
||||
@Getter private Set<Integer> unlockedForgingBlueprints;
|
||||
@Getter private Set<Integer> unlockedCombines;
|
||||
@Getter private Set<Integer> unlockedFurniture;
|
||||
@@ -208,6 +211,7 @@ public class Player {
|
||||
this.questManager = new QuestManager(this);
|
||||
this.buffManager = new PlayerBuffManager(this);
|
||||
this.position = new Position(GameConstants.START_POSITION);
|
||||
this.prevPos = new Position();
|
||||
this.rotation = new Position(0, 307, 0);
|
||||
this.sceneId = 3;
|
||||
this.regionId = 1;
|
||||
@@ -246,6 +250,8 @@ public class Player {
|
||||
|
||||
this.birthday = new PlayerBirthday();
|
||||
this.rewardedLevels = new HashSet<>();
|
||||
this.homeRewardedLevels = new HashSet<>();
|
||||
this.seenRealmList = new HashSet<>();
|
||||
this.moonCardGetTimes = new HashSet<>();
|
||||
this.codex = new PlayerCodex(this);
|
||||
this.progressManager = new PlayerProgressManager(this);
|
||||
@@ -386,6 +392,21 @@ public class Player {
|
||||
return;
|
||||
}
|
||||
this.realmList.add(realmId);
|
||||
|
||||
// Tell the client the realm is unlocked
|
||||
if (realmId > 3) { // Realms 3 and below are default 'unlocked'
|
||||
this.sendPacket(new PacketHomeModuleUnlockNotify(realmId));
|
||||
this.getHome().onClaimReward(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void addSeenRealmList(int seenId) {
|
||||
if (this.seenRealmList == null) {
|
||||
this.seenRealmList = new HashSet<>();
|
||||
} else if (this.seenRealmList.contains(seenId)) {
|
||||
return;
|
||||
}
|
||||
this.seenRealmList.add(seenId);
|
||||
}
|
||||
|
||||
public int getExpeditionLimit() {
|
||||
|
||||
Reference in New Issue
Block a user