Additional checks in ActorAssignmentUi
This commit is contained in:
@@ -133,19 +133,25 @@ public class ActorAssignmentUi
|
|||||||
}
|
}
|
||||||
|
|
||||||
var npcCombo = GetNpcCombo(_newKind);
|
var npcCombo = GetNpcCombo(_newKind);
|
||||||
switch(_newKind)
|
|
||||||
|
if (npcCombo.CurrentSelection.Ids == null || npcCombo.CurrentSelection.Ids.Length == 0)
|
||||||
|
NpcIdentifier = ActorIdentifier.Invalid;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
case ObjectKind.BattleNpc:
|
switch (_newKind)
|
||||||
case ObjectKind.EventNpc:
|
{
|
||||||
NpcIdentifier = _actorManager.CreateNpc(_newKind, npcCombo.CurrentSelection.Ids[0]);
|
case ObjectKind.BattleNpc:
|
||||||
break;
|
case ObjectKind.EventNpc:
|
||||||
case ObjectKind.MountType:
|
NpcIdentifier = _actorManager.CreateNpc(_newKind, npcCombo.CurrentSelection.Ids[0]);
|
||||||
case ObjectKind.Companion:
|
break;
|
||||||
var currentPlayer = _actorManager.GetCurrentPlayer();
|
case ObjectKind.MountType:
|
||||||
NpcIdentifier = _actorManager.CreateOwned(currentPlayer.PlayerName, currentPlayer.HomeWorld, _newKind, npcCombo.CurrentSelection.Ids[0]);
|
case ObjectKind.Companion:
|
||||||
break;
|
var currentPlayer = _actorManager.GetCurrentPlayer();
|
||||||
default:
|
NpcIdentifier = _actorManager.CreateOwned(currentPlayer.PlayerName, currentPlayer.HomeWorld, _newKind, npcCombo.CurrentSelection.Ids[0]);
|
||||||
throw new NotImplementedException();
|
break;
|
||||||
|
default:
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user