public override void PerformAction(EntityPlayer player) { LocalPlayerUI uiforPlayer = LocalPlayerUI.GetUIForPlayer(player as EntityPlayerLocal); // The respondent is an EntityNPC, and we don't have that. Check for the patch scripted otherEntitySDX. Entity respondent = uiforPlayer.xui.Dialog.Respondent; if (respondent == null) { respondent = uiforPlayer.xui.Dialog.otherEntitySDX; } if (respondent != null) { EntityAliveSDX myEntity = player.world.GetEntity(respondent.entityId) as EntityAliveSDX; if (myEntity != null) { myEntity.ExecuteCMD(base.ID, player); } } }