public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } switch (variable) { case VMPersonDataVariable.Priority: if (Thread.Queue.Count != 0 && Thread.Stack.LastOrDefault().ActionTree) { Thread.Queue[0].Priority = value; Thread.QueueDirty = true; } return(true); case VMPersonDataVariable.RenderDisplayFlags: if (WorldUI != null) { ((AvatarComponent)WorldUI).DisplayFlags = (AvatarDisplayFlags)value; } return(true); } PersonData[(ushort)variable] = value; return(true); }
public virtual short GetPersonData(VMPersonDataVariable variable) { switch (variable){ case VMPersonDataVariable.UnusedAndDoNotUse: return PersonData[(short)VMPersonDataVariable.UnusedAndDoNotUse]; } throw new Exception("Unknown get person data!"); }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } PersonData[(ushort)variable] = value; return(true); }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { switch (variable){ case VMPersonDataVariable.UnusedAndDoNotUse: PersonData[(short)VMPersonDataVariable.UnusedAndDoNotUse] = value; return true; } throw new Exception("Unknown set person data!"); }
public virtual short GetPersonData(VMPersonDataVariable variable) { /*switch (variable){ case VMPersonDataVariable.UnusedAndDoNotUse: return PersonData[(short)VMPersonDataVariable.UnusedAndDoNotUse]; } - Will be reanabled later to deal with special cases where the value needs to be calculated on access. */ if ((ushort)variable > 100) throw new Exception("Person Data out of bounds!"); return PersonData[(ushort)variable]; }
public virtual short GetPersonData(VMPersonDataVariable variable) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } switch (variable) { case VMPersonDataVariable.Priority: return((Thread.Queue.Count == 0) ? (short)0 : Thread.Queue[0].Priority); } return(PersonData[(ushort)variable]); }
public virtual short GetPersonData(VMPersonDataVariable variable) { /*switch (variable){ * case VMPersonDataVariable.UnusedAndDoNotUse: * return PersonData[(short)VMPersonDataVariable.UnusedAndDoNotUse]; * } * - Will be reanabled later to deal with special cases where the value needs to be calculated on access. */ if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } return(PersonData[(ushort)variable]); }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { /*switch (variable){ * case VMPersonDataVariable.UnusedAndDoNotUse: * PersonData[(short)VMPersonDataVariable.UnusedAndDoNotUse] = value; * return true; * }*/ if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } PersonData[(ushort)variable] = value; return(true); }
public virtual short GetPersonData(VMPersonDataVariable variable) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } switch (variable) { case VMPersonDataVariable.Priority: return((Thread.Queue.Count == 0) ? (short)0 : Thread.Queue[0].Priority); case VMPersonDataVariable.IsHousemate: var level = ((VMTSOAvatarState)TSOState).Permissions; return((short)((level >= VMTSOAvatarPermissions.BuildBuyRoommate)?2:((level >= VMTSOAvatarPermissions.Roommate)?1:0))); } return(PersonData[(ushort)variable]); }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } switch (variable) { case VMPersonDataVariable.Priority: if (Thread.Queue.Count != 0) { Thread.Queue[0].Priority = value; } return(true); } PersonData[(ushort)variable] = value; return(true); }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { if ((ushort)variable > 100) throw new Exception("Person Data out of bounds!"); PersonData[(ushort)variable] = value; return true; }
public virtual short GetPersonData(VMPersonDataVariable variable) { if ((ushort)variable > 100) throw new Exception("Person Data out of bounds!"); return PersonData[(ushort)variable]; }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } VMTSOJobInfo jobInfo = null; switch (variable) { case VMPersonDataVariable.OnlineJobID: if (value > 4) { return(false); } if (!((VMTSOAvatarState)TSOState).JobInfo.ContainsKey(value)) { ((VMTSOAvatarState)TSOState).JobInfo[value] = new VMTSOJobInfo(); ((VMTSOAvatarState)TSOState).JobInfo[value].StatusFlags = 1; } break; case VMPersonDataVariable.OnlineJobGrade: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { jobInfo.Level = value; } return(true); case VMPersonDataVariable.OnlineJobSickDays: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { jobInfo.SickDays = value; } return(true); case VMPersonDataVariable.OnlineJobStatusFlags: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { jobInfo.StatusFlags = value; } return(true); case VMPersonDataVariable.OnlineJobXP: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { var diff = value - jobInfo.Experience; jobInfo.Experience = value; } return(true); case VMPersonDataVariable.Priority: if (Thread.Queue.Count != 0 && Thread.Stack.LastOrDefault().ActionTree) { Thread.Queue[0].Priority = value; Thread.QueueDirty = true; } return(true); case VMPersonDataVariable.MoneyAmmountOverHead: if (value != -32768) { ShowMoneyHeadline(value); } break; case VMPersonDataVariable.RenderDisplayFlags: if (WorldUI != null) { ((AvatarComponent)WorldUI).DisplayFlags = (AvatarDisplayFlags)value; } return(true); case VMPersonDataVariable.SkillLock: return(true); case VMPersonDataVariable.IsGhost: SetPersonData(VMPersonDataVariable.RenderDisplayFlags, (short)(GetPersonData(VMPersonDataVariable.RenderDisplayFlags) & ~(-1))); if (value > 0) { SetPersonData(VMPersonDataVariable.RenderDisplayFlags, (short)(GetPersonData(VMPersonDataVariable.RenderDisplayFlags) | -1)); } break; } PersonData[(ushort)variable] = value; return(true); }
public virtual short GetPersonData(VMPersonDataVariable variable) { if ((ushort)variable > 100) { throw new Exception("Person Data out of bounds!"); } VMTSOJobInfo jobInfo = null; switch (variable) { case VMPersonDataVariable.OnlineJobGrade: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { return(jobInfo.Level); } return(0); case VMPersonDataVariable.OnlineJobSickDays: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { return(jobInfo.SickDays); } return(0); case VMPersonDataVariable.OnlineJobStatusFlags: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { return(jobInfo.StatusFlags); } return(0); case VMPersonDataVariable.OnlineJobXP: if (((VMTSOAvatarState)TSOState).JobInfo.TryGetValue(GetPersonData(VMPersonDataVariable.OnlineJobID), out jobInfo)) { return(jobInfo.Experience); } return(0); case VMPersonDataVariable.Priority: return((Thread.Queue.Count == 0) ? (short)0 : Thread.Queue[0].Priority); case VMPersonDataVariable.IsHousemate: var level = ((VMTSOAvatarState)TSOState).Permissions; return((short)((level >= VMTSOAvatarPermissions.BuildBuyRoommate) ? 2 : ((level >= VMTSOAvatarPermissions.Roommate) ? 1 : 0))); case VMPersonDataVariable.NumOutgoingFriends: case VMPersonDataVariable.IncomingFriends: if (Thread?.Context?.VM?.TS1 == true) { break; } return((short)(MeToPersist.Count(x => x.Key < 16777216 && x.Value.Count > 1 && x.Value[1] >= 60))); case VMPersonDataVariable.SkillLock: // this variable returns the skills that are completely locked. since the skill degrade object checks the skill lock // value anyways, this seems irrelevant. perhaps was used in special event/lot type situations. return(0); /* fully locks any skills that are locked by even one point * return (short)(((GetPersonData(VMPersonDataVariable.SkillLockBody) > 0) ? 1 : 0) | * ((GetPersonData(VMPersonDataVariable.SkillLockCharisma) > 0) ? 2 : 0) | * ((GetPersonData(VMPersonDataVariable.SkillLockCooking) > 0) ? 4 : 0) | * ((GetPersonData(VMPersonDataVariable.SkillLockCreativity) > 0) ? 8 : 0) | * ((GetPersonData(VMPersonDataVariable.SkillLockLogic) > 0) ? 16 : 0) | * ((GetPersonData(VMPersonDataVariable.SkillLockMechanical) > 0) ? 32 : 0)); */ } return(PersonData[(ushort)variable]); }
public virtual bool SetPersonData(VMPersonDataVariable variable, short value) { /*switch (variable){ case VMPersonDataVariable.UnusedAndDoNotUse: PersonData[(short)VMPersonDataVariable.UnusedAndDoNotUse] = value; return true; }*/ if ((ushort)variable > 100) throw new Exception("Person Data out of bounds!"); PersonData[(ushort)variable] = value; return true; }