From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/first_slash_show.cs | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/first_slash_show.cs (limited to 'Client/Assets/Scripts/XMainClient/first_slash_show.cs') diff --git a/Client/Assets/Scripts/XMainClient/first_slash_show.cs b/Client/Assets/Scripts/XMainClient/first_slash_show.cs new file mode 100644 index 00000000..4ddec714 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/first_slash_show.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class first_slash_show + { + private static bool _replaced = false; + + public static bool Do(List actors) + { + bool flag = actors != null && actors.Count == XGame.RoleCount && !first_slash_show._replaced; + if (flag) + { + for (int i = 0; i < XGame.RoleCount; i++) + { + XActor xactor = actors[i]; + bool replaced = xactor.Replaced; + if (replaced) + { + uint key = (uint)(i + 1); + XEntityStatistics.RowData byID = XSingleton.singleton.EntityStatistics.GetByID(key); + XOutlookData xoutlookData = new XOutlookData(); + xoutlookData.SetDefaultFashion(byID.FashionTemplate); + XDummy dummy = XSingleton.singleton.CreateDummy(byID.PresentID, (uint)byID.FashionTemplate, xoutlookData, false, false, true); + xactor.ReplaceActor(dummy); + xactor.Replaced = false; + } + bool flag2 = xactor.Dummy != null && xactor.Dummy.Equipment != null; + if (flag2) + { + xactor.Dummy.Equipment.EnableRealTimeShadow(XQualitySetting._CastShadow); + } + } + first_slash_show._replaced = true; + } + bool flag3 = actors == null; + if (flag3) + { + first_slash_show._replaced = false; + } + return true; + } + } +} -- cgit v1.1-26-g67d0