fix(types): Fixes casting spell by type and [Add keyword search (#668)
* Fixes `[cast` * Fixes `[add` search
This commit is contained in:
parent
4bad733366
commit
ebac984543
3 changed files with 44 additions and 19 deletions
|
|
@ -156,9 +156,9 @@ namespace Server.Spells
|
|||
|
||||
for (var i = 0; i < m_CircleNames.Length; ++i)
|
||||
{
|
||||
var t =
|
||||
AssemblyHandler.FindTypeByName($"Server.Spells.{m_CircleNames[i]}.{name}") ??
|
||||
AssemblyHandler.FindTypeByName($"Server.Spells.{m_CircleNames[i]}.{name}Spell");
|
||||
var t = name.InsensitiveEndsWith("spell") ?
|
||||
AssemblyHandler.FindTypeByFullName($"Server.Spells.{m_CircleNames[i]}.{name}") :
|
||||
AssemblyHandler.FindTypeByFullName($"Server.Spells.{m_CircleNames[i]}.{name}Spell");
|
||||
|
||||
if (t?.IsSubclassOf(typeof(SpecialMove)) == false)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue