mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 22:04:36 +01:00
Fix group refresh packet spam when entering a rogue map
This commit is contained in:
@@ -89,7 +89,7 @@ public class RogueEntityLoader extends SceneEntityLoader {
|
||||
prop.setPropInfo(propInfo);
|
||||
prop.setGroupId(group.getId());
|
||||
prop.setInstId(propInfo.getID());
|
||||
prop.setState(state);
|
||||
prop.setState(state, false);
|
||||
|
||||
// Overrides
|
||||
if (propExtra != null) {
|
||||
|
||||
@@ -49,14 +49,14 @@ public class SceneEntityLoader {
|
||||
prop.setPropInfo(propInfo);
|
||||
prop.setGroupId(group.getId());
|
||||
prop.setInstId(propInfo.getID());
|
||||
prop.setState(propInfo.getState());
|
||||
prop.setState(propInfo.getState(), false);
|
||||
|
||||
// Cache
|
||||
if (prop.getPropId() == 1003) {
|
||||
// Hacky fix to open simulated universe
|
||||
if (propInfo.getMappingInfoID() == 2220) {
|
||||
// Regular simulated universe is locked behind a mission requirement by default
|
||||
prop.setState(PropState.Open);
|
||||
prop.setState(PropState.Open, false);
|
||||
} else {
|
||||
// Skip tutorial simulated universe
|
||||
return null;
|
||||
|
||||
@@ -42,10 +42,14 @@ public class EntityProp implements GameEntity {
|
||||
}
|
||||
|
||||
public void setState(PropState state) {
|
||||
this.setState(state, this.getScene().isLoaded());
|
||||
}
|
||||
|
||||
public void setState(PropState state, boolean sendPacket) {
|
||||
// Set state
|
||||
this.state = state;
|
||||
// Sync state update to client
|
||||
if (this.getScene().isLoaded()) {
|
||||
if (sendPacket) {
|
||||
this.getScene().getPlayer().sendPacket(new PacketSceneGroupRefreshScNotify(this, null));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user