예제 #1
0
        static int SortById(TriggerProtoDbObject x, TriggerProtoDbObject y)
        {
            if (x.DbId != y.DbId)
            {
                return(x.DbId - y.DbId);
            }

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