Ejemplo n.º 1
0
            private static void SavePersistentEffect(CreatureBoardAsset creatureAsset, IOldPersistentEffect persistentEffect)
            {
                Log.Indent();
                string defaultNewEffect = JsonConvert.SerializeObject(persistentEffect);

                if (!creatureAsset.HasAttachedData(STR_PersistentEffect))
                {
                    Log.Warning($"SavePersistentEffect -- StatMessaging.SetInfo({creatureAsset.CreatureId}, {defaultNewEffect})");
                    StatMessaging.SetInfo(creatureAsset.CreatureId, STR_PersistentEffect, defaultNewEffect);
                }
                else
                {
                    Log.Warning($"  Attached data = \"{creatureAsset.GetAttachedData()[STR_PersistentEffect]}\"");
                }
                Log.Unindent();
            }
Ejemplo n.º 2
0
 static PersistentEffects()
 {
     StatMessaging.Subscribe(STR_PersistentEffect, DataChangeCallback);
     BoardSessionManager.OnStateChange += BoardSessionManager_OnStateChange;
 }