The summoning orb no longer disappears from the minimap on logout/login

This commit is contained in:
Edie
2026-07-03 10:31:12 +00:00
committed by Ryan
parent 392b13697b
commit fd0976e5d5
2 changed files with 21 additions and 11 deletions
@@ -1,5 +1,6 @@
package content.global.skill.summoning.familiar; package content.global.skill.summoning.familiar;
import content.data.Quests;
import content.global.skill.summoning.pet.Pet; import content.global.skill.summoning.pet.Pet;
import content.global.skill.summoning.pet.Pets; import content.global.skill.summoning.pet.Pets;
import core.cache.def.impl.ItemDefinition; import core.cache.def.impl.ItemDefinition;
@@ -31,6 +32,15 @@ import static core.api.ContentAPIKt.*;
*/ */
public final class FamiliarManager { public final class FamiliarManager {
/**
* These varbits are packed into varp 1160. Legacy code added 243269632 directly to the raw varp,
* which toggled the Summoning orb visibility on every login.
* They are now written as individual varbits, but two of them remain unknown.
*/
private static final int VARBIT_SUMMONING_ORB_VISIBILITY = 4280;
private static final int VARBIT_SUMMONING_UNKNOWN1 = 4281;
private static final int VARBIT_SUMMONING_UNKNOWN2 = 4282;
/** /**
* The familiars mapping. * The familiars mapping.
*/ */
@@ -158,7 +168,11 @@ public final class FamiliarManager {
if (hasFamiliar()) { if (hasFamiliar()) {
familiar.init(); familiar.init();
} }
player.getFamiliarManager().setConfig(243269632); boolean unlocked = player.getQuestRepository().isComplete(Quests.WOLF_WHISTLE);
setVarbit(player, VARBIT_SUMMONING_ORB_VISIBILITY, unlocked ? 1 : 0);
setVarbit(player, VARBIT_SUMMONING_UNKNOWN1, 0);
setVarbit(player, VARBIT_SUMMONING_UNKNOWN2, 7);
} }
/** /**
@@ -456,16 +470,6 @@ public final class FamiliarManager {
return true; return true;
} }
/**
* Sets a config value.
* @param value the value.
*/
public void setConfig(int value) {
int current = getVarp(player, 1160);
int newVal = current + value;
setVarp(player, 1160, newVal);
}
/** /**
* Gets the familiar. * Gets the familiar.
* @return The familiar. * @return The familiar.
@@ -23,6 +23,11 @@ public class WolfWhistle extends Quest {
*/ */
public static final Item WOLF_BONES = new Item(2859, 2); public static final Item WOLF_BONES = new Item(2859, 2);
/**
* Gates the visibility of the Summoning orb next to the minimap behind quest completion.
*/
private static final int VARBIT_SUMMONING_ORB_VISIBILITY = 4280;
/** /**
* Constructs a new {@code WolfWhistle} {@code Object}. * Constructs a new {@code WolfWhistle} {@code Object}.
*/ */
@@ -164,6 +169,7 @@ public class WolfWhistle extends Quest {
player.getSkills().addExperience(Skills.SUMMONING, 276); player.getSkills().addExperience(Skills.SUMMONING, 276);
player.getInventory().add(new Item(12158, 275), player); player.getInventory().add(new Item(12158, 275), player);
player.removeAttribute("searched-body"); player.removeAttribute("searched-body");
setVarbit(player, VARBIT_SUMMONING_ORB_VISIBILITY, 1);
player.getQuestRepository().syncronizeTab(player); player.getQuestRepository().syncronizeTab(player);
player.getInterfaceManager().openInfoBars(); player.getInterfaceManager().openInfoBars();
} }