mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 08:09:02 +00:00
开启2.0-dev;Item和Skill、Effect添加局外使用物品技能的User参数 (#139)
This commit is contained in:
parent
914f6c6b4a
commit
5445ea141b
@ -332,11 +332,11 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
/// 局外(库存)使用物品触发
|
/// 局外(库存)使用物品触发
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool UseItem(Dictionary<string, object> args)
|
public bool UseItem(User user, Dictionary<string, object> args)
|
||||||
{
|
{
|
||||||
if (User != null)
|
if (User != null)
|
||||||
{
|
{
|
||||||
bool result = OnItemUsed(args);
|
bool result = OnItemUsed(user, args);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
EntityState = EntityState.Modified;
|
EntityState = EntityState.Modified;
|
||||||
@ -378,9 +378,10 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当物品被玩家使用时
|
/// 当物品被玩家使用时
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
/// <param name="args"></param>
|
/// <param name="args"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected virtual bool OnItemUsed(Dictionary<string, object> args)
|
protected virtual bool OnItemUsed(User user, Dictionary<string, object> args)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -337,9 +337,10 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 对目标触发技能效果
|
/// 对目标触发技能效果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
/// <param name="targets"></param>
|
/// <param name="targets"></param>
|
||||||
/// <param name="others"></param>
|
/// <param name="others"></param>
|
||||||
public virtual void OnSkillCasted(List<Character> targets, Dictionary<string, object> others)
|
public virtual void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -415,12 +415,13 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 对目标触发技能效果
|
/// 对目标触发技能效果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
/// <param name="targets"></param>
|
/// <param name="targets"></param>
|
||||||
public void OnSkillCasted(List<Character> targets)
|
public void OnSkillCasted(User user, List<Character> targets)
|
||||||
{
|
{
|
||||||
foreach (Effect e in Effects)
|
foreach (Effect e in Effects)
|
||||||
{
|
{
|
||||||
e.OnSkillCasted(targets, Values);
|
e.OnSkillCasted(user, targets, Values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
<BaseOutputPath>bin\</BaseOutputPath>
|
<BaseOutputPath>bin\</BaseOutputPath>
|
||||||
<Company>$(Author)</Company>
|
<Company>$(Author)</Company>
|
||||||
<Authors>Project Redbud</Authors>
|
<Authors>Project Redbud</Authors>
|
||||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
<AssemblyVersion>2.0.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.0</FileVersion>
|
<FileVersion>2.0.0</FileVersion>
|
||||||
<PackageOutputPath>bin</PackageOutputPath>
|
<PackageOutputPath>bin</PackageOutputPath>
|
||||||
<Title>FunGame Core</Title>
|
<Title>FunGame Core</Title>
|
||||||
<RootNamespace>Milimoe.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
<RootNamespace>Milimoe.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||||
@ -48,7 +48,8 @@
|
|||||||
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
|
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
|
||||||
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>2.0.0-dev</VersionPrefix>
|
||||||
|
<VersionSuffix Condition="'$(VersionSuffix)' == ''">$([System.DateTime]::Now.ToString("MMdd"))</VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@ -38,9 +38,9 @@
|
|||||||
public const string FunGame_Desktop = "FunGame Desktop";
|
public const string FunGame_Desktop = "FunGame Desktop";
|
||||||
public const string FunGame_Server = "FunGame Server Console";
|
public const string FunGame_Server = "FunGame Server Console";
|
||||||
|
|
||||||
public const int FunGame_Version_Major = 1;
|
public const int FunGame_Version_Major = 2;
|
||||||
public const int FunGame_Version_Minor = 0;
|
public const int FunGame_Version_Minor = 0;
|
||||||
public const string FunGame_VersionPatch = "0";
|
public const string FunGame_VersionPatch = "0-dev";
|
||||||
public const string FunGame_Version_Build = "";
|
public const string FunGame_Version_Build = "";
|
||||||
|
|
||||||
public const string FunGameCoreTitle = @" _____ _ _ _ _ ____ _ __ __ _____ ____ ___ ____ _____
|
public const string FunGameCoreTitle = @" _____ _ _ _ _ ____ _ __ __ _____ ____ ___ ____ _____
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user