mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-08-02 03:52:59 +00:00
修改物品、技能引用的角色
This commit is contained in:
parent
b05f86ed69
commit
fe9d07902c
@ -241,65 +241,111 @@ namespace Oshima.Core.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("skillinfo")]
|
||||
public string GetSkillInfo([FromQuery] long? id = null)
|
||||
public string GetSkillInfo([FromQuery] long? qq = null, [FromQuery] long? id = null)
|
||||
{
|
||||
long userid = qq ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11));
|
||||
PluginConfig pc = new("saved", userid.ToString());
|
||||
pc.LoadConfig();
|
||||
List<string> msg = [];
|
||||
Character? character = null;
|
||||
if (pc.Count > 0)
|
||||
{
|
||||
User user = FunGameService.GetUser(pc);
|
||||
character = user.Inventory.MainCharacter;
|
||||
msg.Add($"技能展示的属性基于你的主战角色:[ {character} ]");
|
||||
}
|
||||
else
|
||||
{
|
||||
character = FunGameService.Characters[1].Copy();
|
||||
msg.Add($"技能展示的属性基于演示角色:[ {character} ]");
|
||||
}
|
||||
IEnumerable<Skill> skills = FunGameService.Skills.Union(FunGameService.Magics);
|
||||
if (id != null && FunGameService.Characters.Count > 1)
|
||||
{
|
||||
List<string> msg = [];
|
||||
Character c = FunGameService.Characters[1].Copy();
|
||||
Skill? s = skills.Where(s => s.Id == id).FirstOrDefault()?.Copy();
|
||||
if (s != null)
|
||||
Skill? skill = skills.Where(s => s.Id == id).FirstOrDefault()?.Copy();
|
||||
if (skill != null)
|
||||
{
|
||||
s.Character = c;
|
||||
msg.Add($"技能展示的属性基于演示角色:[ {c} ]");
|
||||
msg.Add(c.ToStringWithLevel() + "\r\n" + s.ToString());
|
||||
s.Level++; ;
|
||||
msg.Add(c.ToStringWithLevel() + "\r\n" + s.ToString());
|
||||
c.Level = General.GameplayEquilibriumConstant.MaxLevel;
|
||||
s.Level = s.IsMagic ? General.GameplayEquilibriumConstant.MaxMagicLevel : General.GameplayEquilibriumConstant.MaxSkillLevel;
|
||||
msg.Add(c.ToStringWithLevel() + "\r\n" + s.ToString());
|
||||
msg.Add(character.ToStringWithLevel() + "\r\n" + skill.ToString());
|
||||
skill.Character = character;
|
||||
skill.Level++; ;
|
||||
msg.Add(character.ToStringWithLevel() + "\r\n" + skill.ToString());
|
||||
character.Level = General.GameplayEquilibriumConstant.MaxLevel;
|
||||
skill.Level = skill.IsMagic ? General.GameplayEquilibriumConstant.MaxMagicLevel : General.GameplayEquilibriumConstant.MaxSkillLevel;
|
||||
msg.Add(character.ToStringWithLevel() + "\r\n" + skill.ToString());
|
||||
|
||||
return NetworkUtility.JsonSerialize(string.Join("\r\n", msg));
|
||||
}
|
||||
}
|
||||
|
||||
return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg));
|
||||
}
|
||||
return NetworkUtility.JsonSerialize("");
|
||||
}
|
||||
|
||||
[HttpGet("iteminfo")]
|
||||
public string GetItemInfo([FromQuery] long? id = null)
|
||||
public string GetItemInfo([FromQuery] long? qq = null, [FromQuery] long? id = null)
|
||||
{
|
||||
long userid = qq ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11));
|
||||
PluginConfig pc = new("saved", userid.ToString());
|
||||
pc.LoadConfig();
|
||||
List<string> msg = [];
|
||||
Character? character = null;
|
||||
if (pc.Count > 0)
|
||||
{
|
||||
User user = FunGameService.GetUser(pc);
|
||||
character = user.Inventory.MainCharacter;
|
||||
msg.Add($"技能展示的属性基于你的主战角色:[ {character} ]");
|
||||
}
|
||||
else
|
||||
{
|
||||
character = FunGameService.Characters[1].Copy();
|
||||
msg.Add($"技能展示的属性基于演示角色:[ {character} ]");
|
||||
}
|
||||
IEnumerable<Item> items = FunGameService.AllItems;
|
||||
if (id != null)
|
||||
{
|
||||
List<string> msg = [];
|
||||
Item? i = items.Where(i => i.Id == id).FirstOrDefault()?.Copy();
|
||||
if (i != null)
|
||||
Item? item = items.Where(i => i.Id == id).FirstOrDefault()?.Copy();
|
||||
if (item != null)
|
||||
{
|
||||
i.SetLevel(1);
|
||||
msg.Add(i.ToString(false, true));
|
||||
}
|
||||
item.Character = character;
|
||||
item.SetLevel(1);
|
||||
msg.Add(item.ToString(false, true));
|
||||
|
||||
return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg));
|
||||
return NetworkUtility.JsonSerialize(string.Join("\r\n", msg));
|
||||
}
|
||||
}
|
||||
return NetworkUtility.JsonSerialize("");
|
||||
}
|
||||
|
||||
[HttpGet("iteminfoname")]
|
||||
public string GetItemInfo_Name([FromQuery] string? name = null)
|
||||
public string GetItemInfo_Name([FromQuery] long? qq = null, [FromQuery] string? name = null)
|
||||
{
|
||||
long userid = qq ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11));
|
||||
PluginConfig pc = new("saved", userid.ToString());
|
||||
pc.LoadConfig();
|
||||
List<string> msg = [];
|
||||
Character? character = null;
|
||||
if (pc.Count > 0)
|
||||
{
|
||||
User user = FunGameService.GetUser(pc);
|
||||
character = user.Inventory.MainCharacter;
|
||||
msg.Add($"技能展示的属性基于你的主战角色:[ {character} ]");
|
||||
}
|
||||
else
|
||||
{
|
||||
character = FunGameService.Characters[1].Copy();
|
||||
msg.Add($"技能展示的属性基于演示角色:[ {character} ]");
|
||||
}
|
||||
IEnumerable<Item> items = FunGameService.AllItems;
|
||||
if (name != null)
|
||||
{
|
||||
List<string> msg = [];
|
||||
Item? i = items.Where(i => i.Name == name).FirstOrDefault()?.Copy();
|
||||
if (i != null)
|
||||
Item? item = items.Where(i => i.Name == name).FirstOrDefault()?.Copy();
|
||||
if (item != null)
|
||||
{
|
||||
i.SetLevel(1);
|
||||
msg.Add(i.ToString(false, true));
|
||||
}
|
||||
item.Character = character;
|
||||
item.SetLevel(1);
|
||||
msg.Add(item.ToString(false, true));
|
||||
|
||||
return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg));
|
||||
return NetworkUtility.JsonSerialize(string.Join("\r\n", msg));
|
||||
}
|
||||
}
|
||||
return NetworkUtility.JsonSerialize("");
|
||||
}
|
||||
|
@ -634,6 +634,110 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"魔切剑": {
|
||||
"Id": 11568,
|
||||
"Name": "魔切剑",
|
||||
"Description": "增加角色 85 点攻击力和 20% 魔法穿透。",
|
||||
"BackgroundStory": "一把深色陨铁铸成的重剑,剑身宽厚刻满幽光符文,散发着压制魔法的威慑力。",
|
||||
"ItemType": 1,
|
||||
"WeaponType": 2,
|
||||
"QualityType": 4,
|
||||
"Skills": {
|
||||
"Active": null,
|
||||
"Passives": [
|
||||
{
|
||||
"Id": 7026,
|
||||
"Name": "魔切剑",
|
||||
"SkillType": 3,
|
||||
"Effects": [
|
||||
{
|
||||
"Id": 8032,
|
||||
"exatk": 85,
|
||||
"exmpt": 0.2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"鸳鸯眼": {
|
||||
"Id": 11569,
|
||||
"Name": "鸳鸯眼",
|
||||
"Description": "增加角色 85 点攻击力和 25% 物理穿透。",
|
||||
"BackgroundStory": "一对刀柄缠绕异色皮革的短刀,刀刃闪烁着冷暖交织的光泽。",
|
||||
"ItemType": 1,
|
||||
"WeaponType": 6,
|
||||
"QualityType": 4,
|
||||
"Skills": {
|
||||
"Active": null,
|
||||
"Passives": [
|
||||
{
|
||||
"Id": 7027,
|
||||
"Name": "鸳鸯眼",
|
||||
"SkillType": 3,
|
||||
"Effects": [
|
||||
{
|
||||
"Id": 8032,
|
||||
"exatk": 85,
|
||||
"exppt": 0.25
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"昴宿": {
|
||||
"Id": 11570,
|
||||
"Name": "昴宿",
|
||||
"Description": "增加角色 85 点攻击力和 15% 暴击率。",
|
||||
"BackgroundStory": "一柄镶嵌着七颗星辰的银色长柄武器,散发着柔和而坚定的光辉。",
|
||||
"ItemType": 1,
|
||||
"WeaponType": 9,
|
||||
"QualityType": 4,
|
||||
"Skills": {
|
||||
"Active": null,
|
||||
"Passives": [
|
||||
{
|
||||
"Id": 7028,
|
||||
"Name": "昴宿",
|
||||
"SkillType": 3,
|
||||
"Effects": [
|
||||
{
|
||||
"Id": 8032,
|
||||
"exatk": 85,
|
||||
"excr": 0.15
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"蔷薇花环": {
|
||||
"Id": 11571,
|
||||
"Name": "蔷薇花环",
|
||||
"Description": "增加角色 85 点攻击力和 25% 暴击伤害。",
|
||||
"BackgroundStory": "一环荆棘与花朵交织的暗器,美丽而致命,象征着爱与痛的纠缠。",
|
||||
"ItemType": 1,
|
||||
"WeaponType": 9,
|
||||
"QualityType": 4,
|
||||
"Skills": {
|
||||
"Active": null,
|
||||
"Passives": [
|
||||
{
|
||||
"Id": 7029,
|
||||
"Name": "蔷薇花环",
|
||||
"SkillType": 3,
|
||||
"Effects": [
|
||||
{
|
||||
"Id": 8032,
|
||||
"exatk": 85,
|
||||
"excrd": 0.25
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"初级法袍": {
|
||||
"Id": 12501,
|
||||
"Name": "初级法袍",
|
||||
|
Loading…
x
Reference in New Issue
Block a user