diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/first_slash_show.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/first_slash_show.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/first_slash_show.cs | 46 |
1 files changed, 46 insertions, 0 deletions
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<XActor> 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<XEntityMgr>.singleton.EntityStatistics.GetByID(key);
+ XOutlookData xoutlookData = new XOutlookData();
+ xoutlookData.SetDefaultFashion(byID.FashionTemplate);
+ XDummy dummy = XSingleton<XEntityMgr>.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;
+ }
+ }
+}
|