static int SortById(TriggerSystemProtoObject x, TriggerSystemProtoObject y) { if (x.DbId != y.DbId) { return(x.DbId - y.DbId); } return(x.Version - y.Version); }
static uint GenerateHandle(TriggerSystemProtoObject dbo) { return(((uint)dbo.DbId << 8) | (uint)dbo.Version); }
bool LookupTableContains <T>(T obj, out TriggerSystemProtoObject dbo) where T : TriggerScriptObject { return(LookupTable.TryGetValue(GenerateHandle(obj), out dbo)); }
static void TraceUpdate(BTriggerSystem ts, TriggerSystemProtoObject dbo) { Debug.Trace.Engine.TraceInformation( "TriggerProtoDbObject: {0} - Updated {1}/{2}", ts, dbo.DbId.ToString(), dbo.Name); }
void LookupTableAdd(TriggerSystemProtoObject dbo) { mUsedIds[dbo.DbId] = true; LookupTable.Add(GenerateHandle(dbo), dbo); }