mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix chat command not working.
This commit is contained in:
parent
776d993589
commit
a64273bd73
1 changed files with 8 additions and 7 deletions
|
|
@ -333,6 +333,7 @@ public class Penumbra : IDalamudPlugin
|
|||
}
|
||||
|
||||
string? characterName = null;
|
||||
var identifier = ActorIdentifier.Invalid;
|
||||
if( type is CollectionType.Individual )
|
||||
{
|
||||
var split = collectionName.Split( '|', 2, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries );
|
||||
|
|
@ -344,6 +345,13 @@ public class Penumbra : IDalamudPlugin
|
|||
|
||||
collectionName = split[ 0 ];
|
||||
characterName = split[ 1 ];
|
||||
|
||||
identifier = Actors.CreatePlayer( ByteString.FromStringUnsafe( characterName, false ), ushort.MaxValue );
|
||||
if( !identifier.IsValid )
|
||||
{
|
||||
Dalamud.Chat.Print( $"{characterName} is not a valid character name." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
collectionName = collectionName.ToLowerInvariant();
|
||||
|
|
@ -356,13 +364,6 @@ public class Penumbra : IDalamudPlugin
|
|||
return false;
|
||||
}
|
||||
|
||||
var identifier = Actors.CreatePlayer( ByteString.FromStringUnsafe( characterName, false ), ushort.MaxValue );
|
||||
if( !identifier.IsValid )
|
||||
{
|
||||
Dalamud.Chat.Print( $"{characterName} is not a valid character name." );
|
||||
return false;
|
||||
}
|
||||
|
||||
var oldCollection = CollectionManager.ByType( type, identifier );
|
||||
if( collection == oldCollection )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue