Package gg.xp.xivsupport.events.state
Class XivStateImpl
java.lang.Object
gg.xp.xivsupport.events.state.XivStateImpl
-
Constructor Summary
ConstructorDescriptionXivStateImpl
(EventMaster master, PartySortOrder pso, org.picocontainer.PicoContainer pico) -
Method Summary
Modifier and TypeMethodDescriptionvoid
combatantAdded
(EventContext context, RawAddCombatantEvent event) void
combatantRemoved
(EventContext context, RawRemoveCombatantEvent event) void
combatants
(EventContext context, CombatantsUpdateRaw event) void
@Nullable XivCombatant
getCombatant
(long id) getMap()
int
getPartySlotOf
(XivEntity entity) Returns the party slot of the given entitygetZone()
boolean
inCombat()
void
inCombatChange
(EventContext context, InCombatChangeEvent event) void
mapChange
(EventContext context, MapChangeEvent event) @Nullable XivCombatant
npcById
(long id) npcsById
(long id) void
onlineStatus
(EventContext context, RawOnlineStatusChanged event) void
partyChange
(EventContext context, PartyChangeEvent event) void
partyForceOrderChange
(EventContext context, PartyForceOrderChangeEvent event) void
playerChange
(EventContext context, RawPlayerChangeEvent event) void
void
provideCombatantHP
(XivCombatant target, @NotNull HitPoints hitPoints) void
provideCombatantMP
(XivCombatant target, @NotNull ManaPoints manaPoints) void
provideCombatantPos
(XivCombatant target, Position newPos) void
provideCombatantRadius
(XivCombatant target, float radius) void
provideCombatantShieldPct
(XivCombatant target, long shieldPct) void
provideTransformation
(long entityId, short transformationId) void
provideWeaponId
(XivCombatant existing, short weaponId) void
removeSpecificCombatant
(long idToRemove) void
setCombatants
(List<RawXivCombatantInfo> combatants) Provide state info for ALL combatants.void
Set the current mapvoid
setPartyList
(List<RawXivPartyInfo> partyList) Set the party listvoid
void
setPlayerTmpOverride
(XivEntity player) Set a temporary (as in, not persisted across app starts) override for who to consider the primary player.void
setSpecificCombatants
(List<RawXivCombatantInfo> combatants) void
Set the current zonevoid
zoneChange
(EventContext context, ZoneChangeEvent event) boolean
zoneIs
(long zoneId) Check whether the current zone matches the given zone IDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gg.xp.xivsupport.events.state.XivState
dutyIs, getLatestCombatantData, getPlayerJob, playerJobMatches
-
Constructor Details
-
XivStateImpl
-
-
Method Details
-
getPlayer
-
setPlayer
- Parameters:
player
- Set the current player. Realistically, only the ID matters here.
-
setPlayerTmpOverride
Set a temporary (as in, not persisted across app starts) override for who to consider the primary player.- Parameters:
player
- The new primary player. Only the ID matters.
-
getZone
-
getMap
-
setZone
Set the current zone- Parameters:
zone
- The new zone
-
setMap
Set the current map- Parameters:
map
- The new map
-
setPartyList
Set the party list- Parameters:
partyList
- Party info like what you would get from OP WS
-
getPartyList
- Specified by:
getPartyList
in interfaceXivState
- Returns:
- The current party. Note that unlike ACT/OP, this will report the primary player as being in the party even if you aren't actually in a party.
-
zoneIs
public boolean zoneIs(long zoneId) Check whether the current zone matches the given zone ID -
setCombatants
Provide state info for ALL combatants. Anything that was seen previously that is not in this list will be considered to have been removed.- Parameters:
combatants
- The list of all combatants
-
setSpecificCombatants
-
removeSpecificCombatant
public void removeSpecificCombatant(long idToRemove) - Specified by:
removeSpecificCombatant
in interfaceXivState
-
getCombatants
- Specified by:
getCombatants
in interfaceXivState
-
getCombatantsListCopy
- Specified by:
getCombatantsListCopy
in interfaceXivState
-
npcById
-
npcsById
-
getPartySlotOf
Description copied from interface:XivState
Returns the party slot of the given entity- Specified by:
getPartySlotOf
in interfaceXivState
- Parameters:
entity
- The entity- Returns:
- 0-7 based on their party slot, or -1 if they are not in the party
-
provideCombatantHP
- Specified by:
provideCombatantHP
in interfaceXivState
-
provideCombatantMP
- Specified by:
provideCombatantMP
in interfaceXivState
-
provideCombatantPos
- Specified by:
provideCombatantPos
in interfaceXivState
-
provideCombatantShieldPct
- Specified by:
provideCombatantShieldPct
in interfaceXivState
-
provideCombatantRadius
- Specified by:
provideCombatantRadius
in interfaceXivState
-
provideActFallbackCombatant
- Specified by:
provideActFallbackCombatant
in interfaceXivState
-
flushProvidedValues
public void flushProvidedValues()- Specified by:
flushProvidedValues
in interfaceXivState
-
provideTransformation
public void provideTransformation(long entityId, short transformationId) - Specified by:
provideTransformation
in interfaceXivState
-
provideWeaponId
- Specified by:
provideWeaponId
in interfaceXivState
-
getCombatant
- Specified by:
getCombatant
in interfaceXivState
-
inCombat
public boolean inCombat() -
inCombatChange
-
zoneChange
-
mapChange
-
playerChange
-
combatantAdded
-
combatantRemoved
-
partyChange
-
partyForceOrderChange
-
combatants
-
onlineStatus
-