Record Class ObjVarChangeEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.ObjVarChangeEvent
- Record Components:
invId- the container id (e.g. 93 = backpack)slot- the 0-based slot index within the containervarId- the obj-var id that changedoldValue- the previous valuenewValue- the new valuetimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
public record ObjVarChangeEvent(int invId, int slot, int varId, int oldValue, int newValue, long timestamp)
extends Record
implements GameEvent
Fired when a per-item obj var changes value.
Obj vars are the per-instance variables an item carries inside a
container slot's ObjVarDomain (augmentation XP, charges, etc.) —
distinct from the global player varp / client varc domains. The value space
is keyed by (invId, slot, varId); correlate slot with the
snapshot's inventory items to find which item it belongs to.
-
Constructor Summary
ConstructorsConstructorDescriptionObjVarChangeEvent(int invId, int slot, int varId, int oldValue, int newValue) ObjVarChangeEvent(int invId, int slot, int varId, int oldValue, int newValue, long timestamp) Creates an instance of aObjVarChangeEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intinvId()Returns the value of theinvIdrecord component.intnewValue()Returns the value of thenewValuerecord component.intoldValue()Returns the value of theoldValuerecord component.intslot()Returns the value of theslotrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.intvarId()Returns the value of thevarIdrecord component.
-
Constructor Details
-
ObjVarChangeEvent
public ObjVarChangeEvent(int invId, int slot, int varId, int oldValue, int newValue) -
ObjVarChangeEvent
public ObjVarChangeEvent(int invId, int slot, int varId, int oldValue, int newValue, long timestamp) Creates an instance of aObjVarChangeEventrecord class.- Parameters:
invId- the value for theinvIdrecord componentslot- the value for theslotrecord componentvarId- the value for thevarIdrecord componentoldValue- the value for theoldValuerecord componentnewValue- the value for thenewValuerecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
invId
-
slot
-
varId
-
oldValue
-
newValue
-
timestamp
-