添加武器长枪 + bug fix

- WeaponLance:Entity/Goods/Weapon 表,状态机
- Battle -> Shop/LevelUp:隐藏子弹
This commit is contained in:
2026-03-19 17:53:24 +08:00
parent f31babdb85
commit 8d21d53c4d
35 changed files with 945 additions and 79 deletions
@@ -139,19 +139,7 @@ namespace UI
{
return;
}
if (Context == null)
{
Log.Error("DisplayItemInfoFormController.DisplayItemInfoHide() Context is null.");
return;
}
if (Form == null)
{
Log.Error("DisplayItemInfoFormController.DisplayItemInfoHide() Form is null.");
return;
}
if (args.Force)
{
GameEntry.UIRouter.CloseUI(UIFormType.DisplayItemInfoForm);
@@ -159,11 +147,8 @@ namespace UI
return;
}
if (_locked && !IsCurrentFormSender(sender) && sender is not DisplayItem)
{
return;
}
if (_locked && !args.Force) return;
GameEntry.UIRouter.CloseUI(UIFormType.DisplayItemInfoForm);
_locked = false;
}
@@ -199,6 +199,12 @@ namespace UI
#region UI Methods
public override void CloseUI()
{
base.CloseUI();
GameEntry.Event.Fire(this, DisplayItemInfoHideEventArgs.Create(true));
}
public int? OpenUI(ShopFormRawData rawData)
{
ShopFormContext context = BuildContext(rawData);
@@ -535,4 +541,4 @@ namespace UI
#endregion
}
}
}
@@ -397,6 +397,8 @@ namespace UI
return new WeaponSlashData(entityId, ownerId, ownerCamp);
case WeaponType.WeaponLightning:
return new WeaponLightningData(entityId, ownerId, ownerCamp);
case WeaponType.WeaponLance:
return new WeaponLanceData(entityId, ownerId, ownerCamp);
default:
return null;
}
@@ -199,7 +199,7 @@ namespace UI
public void OnCancelButtonClick()
{
GameEntry.Event.Fire(this, DisplayItemInfoHideEventArgs.Create());
GameEntry.Event.Fire(this, DisplayItemInfoHideEventArgs.Create(true));
}
}
}