public static void AddNECE(EffectInfo effect, NECE nece, ChunkPlaybackInfo playbackInfo, Dictionary <ulong, ulong> replacements) { NECEInfo newInfo = new NECEInfo { PlaybackInfo = playbackInfo, GUID = nece.Data.Entity, Variable = nece.Data.EntityVariable }; if (replacements.ContainsKey(newInfo.GUID)) { newInfo.GUID = replacements[newInfo.GUID]; } if (replacements.ContainsKey(newInfo.Variable)) { newInfo.Variable = replacements[newInfo.Variable]; } effect.NECEs.Add(newInfo); }
public void Process(EffectInfo effectInfo, KeyValuePair <ChunkPlaybackInfo, IChunk> chunk, Dictionary <ulong, ulong> replacements) { // todo: STUVoiceStimulus has f3099f20/m_volume // probably more stuff too // hey have some notes about particles: // 000000003CEC.006 - 000000001D3D.08F = ana - guardian: // one RPCE, 61 chunks // seems to be at correct position with rpce at rot: x=90 // 000000003796.006 - 000000001A31.08F = genji - warrior's salute: // one RPCE, 64 chunks. // VCCE might be a texture/material transform // A B C D = R G B A // see 'extract-debug-vcce' if (effectInfo == null) { return; } if (chunk.Value == null) { return; } if (replacements == null) { replacements = new Dictionary <ulong, ulong>(); } if (chunk.Value.GetType() == typeof(TCFE)) { TCFE tcfe = chunk.Value as TCFE; if (tcfe == null) { return; } effectInfo.EffectLength = tcfe.Data.EndTime1; } if (chunk.Value.GetType() == typeof(DMCE)) { DMCE dmce = chunk.Value as DMCE; if (dmce == null) { return; } AddDMCE(effectInfo, dmce, chunk.Key, replacements); } if (chunk.Value.GetType() == typeof(CECE)) { CECE cece = chunk.Value as CECE; if (cece == null) { return; } AddCECE(effectInfo, cece, chunk.Key, replacements); } if (chunk.Value.GetType() == typeof(OSCE)) { OSCE osce = chunk.Value as OSCE; if (osce == null) { return; } AddOSCE(effectInfo, osce, chunk.Key, replacements); } if (chunk.Value.GetType() == typeof(FECE)) { FECE fece = chunk.Value as FECE; if (fece == null) { return; } EffectInfo feceInfo = null; ulong effectKey = fece.Data.Effect; if (replacements.ContainsKey(fece.Data.Effect)) { effectKey = replacements[fece.Data.Effect]; } using (Stream feceStream = IO.OpenFile(effectKey)) { if (feceStream != null) { using (Chunked feceChunkednew = new Chunked(feceStream)) { EffectParser sub = new EffectParser(feceChunkednew, fece.Data.Effect); feceInfo = sub.ProcessAll(replacements); } } } AddFECE(effectInfo, fece.Data.Effect, feceInfo, chunk.Key, replacements); } if (chunk.Value.GetType() == typeof(NECE)) { NECE nece = chunk.Value as NECE; if (nece == null) { return; } AddNECE(effectInfo, nece, chunk.Key, replacements); } if (chunk.Value.GetType() == typeof(RPCE)) { RPCE rpce = chunk.Value as RPCE; if (rpce == null) { return; } AddRPCE(effectInfo, rpce, chunk.Key, replacements); } if (chunk.Value.GetType() == typeof(SSCE)) { SSCE ssce = chunk.Value as SSCE; if (ssce == null) { return; } AddSSCE(effectInfo, ssce, chunk.Key.PreviousChunk?.GetType(), replacements); } if (chunk.Value.GetType() == typeof(SVCE)) { SVCE svce = chunk.Value as SVCE; if (svce == null) { return; } AddSVCE(effectInfo, svce, chunk.Key, replacements); } }